From 967932d02c14d45914c9dc106c483c55e380712f Mon Sep 17 00:00:00 2001 From: Dreamacro <8615343+Dreamacro@users.noreply.github.com> Date: Mon, 18 Oct 2021 22:58:16 +0800 Subject: [PATCH] Fix: set dnsmode behavior --- tunnel/tunnel.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tunnel/tunnel.go b/tunnel/tunnel.go index dd64b015..1c007554 100644 --- a/tunnel/tunnel.go +++ b/tunnel/tunnel.go @@ -133,13 +133,13 @@ func preHandleMetadata(metadata *C.Metadata) error { if exist { metadata.Host = host metadata.AddrType = C.AtypDomainName + metadata.DNSMode = C.DNSMapping if resolver.FakeIPEnabled() { metadata.DstIP = nil metadata.DNSMode = C.DNSFakeIP } else if node := resolver.DefaultHosts.Search(host); node != nil { // redir-host should lookup the hosts metadata.DstIP = node.Data.(net.IP) - metadata.DNSMode = C.DNSMapping } } else if resolver.IsFakeIP(metadata.DstIP) { return fmt.Errorf("fake DNS record %s missing", metadata.DstIP)