Merge: + dnsforward: disable Mozilla DoH - block use-application-dns.net
#988 * commit '47e29f96dfb9f254babcf4763912dc5e9a07ee2a': + dnsforward: disable Mozilla DoH - block use-application-dns.net
This commit is contained in:
commit
df5b41458f
|
@ -408,6 +408,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.
|
||||||
|
|
Loading…
Reference in New Issue