From b19601fc692cafe45b6088b8e957dc8d35a0892f Mon Sep 17 00:00:00 2001 From: gVisor bot Date: Tue, 7 Feb 2023 15:59:44 +0800 Subject: [PATCH] fix: sniff domain don't match geosite when override-destination value is false --- constant/metadata.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/constant/metadata.go b/constant/metadata.go index d57c21b6..f30426c1 100644 --- a/constant/metadata.go +++ b/constant/metadata.go @@ -135,7 +135,7 @@ type Metadata struct { SpecialRules string `json:"specialRules"` RemoteDst string `json:"remoteDestination"` // Only domain rule - SniffHost string + SniffHost string } func (m *Metadata) RemoteAddress() string { @@ -165,7 +165,7 @@ func (m *Metadata) SourceDetail() string { func (m *Metadata) AddrType() int { switch true { - case m.Host != "" || !m.DstIP.IsValid(): + case m.Host != "" || m.SniffHost != "" || !m.DstIP.IsValid(): return socks5.AtypDomainName case m.DstIP.Is4(): return socks5.AtypIPv4