Fix: unexpected proxy dial behavior on mapping mode
This commit is contained in:
@ -8,6 +8,7 @@ import (
|
||||
"github.com/Dreamacro/clash/common/cache"
|
||||
"github.com/Dreamacro/clash/component/fakeip"
|
||||
"github.com/Dreamacro/clash/component/trie"
|
||||
C "github.com/Dreamacro/clash/constant"
|
||||
"github.com/Dreamacro/clash/context"
|
||||
"github.com/Dreamacro/clash/log"
|
||||
|
||||
@ -178,11 +179,11 @@ func newHandler(resolver *Resolver, mapper *ResolverEnhancer) handler {
|
||||
middlewares = append(middlewares, withHosts(resolver.hosts))
|
||||
}
|
||||
|
||||
if mapper.mode == FAKEIP {
|
||||
if mapper.mode == C.DNSFakeIP {
|
||||
middlewares = append(middlewares, withFakeIP(mapper.fakePool))
|
||||
}
|
||||
|
||||
if mapper.mode != NORMAL {
|
||||
if mapper.mode != C.DNSNormal {
|
||||
middlewares = append(middlewares, withMapping(mapper.mapping))
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user