- dns rewrites: CNAME record didn't work
This commit is contained in:
parent
e04ffde105
commit
090f549833
|
@ -432,6 +432,7 @@ 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
|
||||||
|
|
Loading…
Reference in New Issue