Skip to content

Instantly share code, notes, and snippets.

@chantra
Created February 23, 2018 05:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chantra/d29bf407fa731ab1078de4c56a54a05c to your computer and use it in GitHub Desktop.
Save chantra/d29bf407fa731ab1078de4c56a54a05c to your computer and use it in GitHub Desktop.
diff --git a/dohproxy/httpproxy.py b/dohproxy/httpproxy.py
index 66d1feb..750618c 100755
--- a/dohproxy/httpproxy.py
+++ b/dohproxy/httpproxy.py
@@ -65,6 +65,8 @@ class DOHApplication(aiohttp.web.Application):
async def resolve(self, request, dnsq):
qid = dnsq.id
+ # Force RD bit
+ dnsq.flags |= dns.flags.RD
queue = asyncio.Queue(maxsize=1)
await self.loop.create_datagram_endpoint(
lambda: DNSClientProtocol(dnsq, queue, logger=self.logger),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment