* refactor
This commit is contained in:
parent
4a05ab0057
commit
5a3de2a276
@ -531,16 +531,7 @@ func (s *Server) genDNSFilterMessage(d *proxy.DNSContext, result *dnsfilter.Resu
|
|||||||
return s.genBlockedHost(m, s.conf.ParentalBlockHost, d)
|
return s.genBlockedHost(m, s.conf.ParentalBlockHost, d)
|
||||||
default:
|
default:
|
||||||
if result.IP != nil {
|
if result.IP != nil {
|
||||||
if m.Question[0].Qtype == dns.TypeA {
|
return s.genResponseWithIP(m, result.IP)
|
||||||
return s.genARecord(m, result.IP)
|
|
||||||
} else if m.Question[0].Qtype == dns.TypeAAAA {
|
|
||||||
return s.genAAAARecord(m, result.IP)
|
|
||||||
}
|
|
||||||
|
|
||||||
// empty response
|
|
||||||
resp := dns.Msg{}
|
|
||||||
resp.SetReply(m)
|
|
||||||
return &resp
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if s.conf.BlockingMode == "null_ip" {
|
if s.conf.BlockingMode == "null_ip" {
|
||||||
|
Loading…
Reference in New Issue
Block a user