Change: remove redir-host as config

This commit is contained in:
Dreamacro
2023-02-01 15:19:36 +08:00
parent 81b1e9f931
commit 9af6d498e7
3 changed files with 10 additions and 12 deletions

View File

@ -87,9 +87,15 @@ func withMapping(mapping *cache.LruCache) middleware {
case *D.A:
ip = a.A
ttl = a.Hdr.Ttl
if !ip.IsGlobalUnicast() {
continue
}
case *D.AAAA:
ip = a.AAAA
ttl = a.Hdr.Ttl
if !ip.IsGlobalUnicast() {
continue
}
default:
continue
}
@ -181,9 +187,6 @@ func newHandler(resolver *Resolver, mapper *ResolverEnhancer) handler {
if mapper.mode == C.DNSFakeIP {
middlewares = append(middlewares, withFakeIP(mapper.fakePool))
}
if mapper.mode != C.DNSNormal {
middlewares = append(middlewares, withMapping(mapper.mapping))
}