Init
This commit is contained in:
parent
844d92e100
commit
fdc1bc8341
18
main.py
Executable file
18
main.py
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/python
|
||||||
|
from dnslib import server
|
||||||
|
import dnslib
|
||||||
|
from dns_over_https import SecureDNS
|
||||||
|
print("DoH Proxy resolver - <Written by Caleb Fontenot>")
|
||||||
|
|
||||||
|
class DoHProxy:
|
||||||
|
def resolve(self,request,handler):
|
||||||
|
reply = request.reply()
|
||||||
|
reply.add_answer(dnslib.dns.RR.fromZone("abc.def. 60 A 1.2.3.4"))
|
||||||
|
return reply
|
||||||
|
|
||||||
|
#Setup DNS server, this will listen for incoming DNS packets
|
||||||
|
resolver = DoHProxy()
|
||||||
|
logger = server.DNSLogger(prefix=True)
|
||||||
|
server = server.DNSServer(resolver,port=53,address="localhost",logger=logger, tcp=False)
|
||||||
|
#server.start_thread()
|
||||||
|
server.start()
|
Loading…
Reference in New Issue
Block a user