parsedmarc icon indicating copy to clipboard operation
parsedmarc copied to clipboard

Add Support for DNS-over-HTTPS (DOH)

Open leonardo0014 opened this issue 3 years ago • 1 comments

The longer I work with the script, the more small optimizations I can think of. One would be very helpful for me. My Server has no direct Internet access and I can only access the Internet via WEB Proxy. I would appreciate it if I could use DNS-over-HTTPS via proxy instead of direct DNS lookup to get the reverse DNS lookups. From what I can tell you are using Python's standard DNS libraries. According to the manual, these should already support DOH.

I'll try it myself and if my adaptation succeeds I'll send you the DIFF.

I would like to say thank you for reading

leonardo0014 avatar Feb 01 '22 21:02 leonardo0014

Are you sure that it doesn't already work? I think just having

[general]
nameservers=https://cloudflare-dns.com/dns-query

should do the trick based on my read of the code. (Completely untested though.)

The resolver logic appears to check if it's an inet address or not, and uses https if it's not:

https://github.com/rthalley/dnspython/blob/e8194e185c10fa1b7cd021c3b2f46501167fd688/dns/resolver.py#L1206

imirkin avatar Jul 14 '23 03:07 imirkin