* dns: enable DNS message compression
This commit is contained in:
parent
15e6311c63
commit
3b443bc9c8
|
@ -432,7 +432,6 @@ func (s *Server) handleDNSRequest(p *proxy.Proxy, d *proxy.DNSContext) error {
|
||||||
|
|
||||||
if res.Reason == dnsfilter.ReasonRewrite && len(res.CanonName) != 0 {
|
if res.Reason == dnsfilter.ReasonRewrite && len(res.CanonName) != 0 {
|
||||||
d.Req.Question[0] = originalQuestion
|
d.Req.Question[0] = originalQuestion
|
||||||
d.Res.Question[0] = originalQuestion
|
|
||||||
|
|
||||||
if len(d.Res.Answer) != 0 {
|
if len(d.Res.Answer) != 0 {
|
||||||
answer = append(answer, d.Res.Answer...) // host -> IP
|
answer = append(answer, d.Res.Answer...) // host -> IP
|
||||||
|
@ -441,6 +440,10 @@ func (s *Server) handleDNSRequest(p *proxy.Proxy, d *proxy.DNSContext) error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if d.Res != nil {
|
||||||
|
d.Res.Compress = true // some devices require DNS message compression
|
||||||
|
}
|
||||||
|
|
||||||
shouldLog := true
|
shouldLog := true
|
||||||
msg := d.Req
|
msg := d.Req
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue