+ dnsforward: disable Mozilla DoH - block use-application-dns.net

This commit is contained in:
Simon Zolin 2019-09-12 18:23:33 +03:00
parent 8f9ca4cba7
commit 47e29f96df
1 changed files with 7 additions and 0 deletions

View File

@ -419,6 +419,13 @@ func (s *Server) handleDNSRequest(p *proxy.Proxy, d *proxy.DNSContext) error {
s.conf.OnDNSRequest(d) s.conf.OnDNSRequest(d)
} }
// disable Mozilla DoH
if (d.Req.Question[0].Qtype == dns.TypeA || d.Req.Question[0].Qtype == dns.TypeAAAA) &&
d.Req.Question[0].Name == "use-application-dns.net." {
d.Res = s.genNXDomain(d.Req)
return nil
}
// use dnsfilter before cache -- changed settings or filters would require cache invalidation otherwise // use dnsfilter before cache -- changed settings or filters would require cache invalidation otherwise
s.RLock() s.RLock()
// Synchronize access to s.dnsFilter so it won't be suddenly uninitialized while in use. // Synchronize access to s.dnsFilter so it won't be suddenly uninitialized while in use.