fix: sniff domain don't match geosite when override-destination value is false
This commit is contained in:
parent
4fe798ec3b
commit
2d806df9b9
1 changed files with 2 additions and 2 deletions
|
@ -135,7 +135,7 @@ type Metadata struct {
|
||||||
SpecialRules string `json:"specialRules"`
|
SpecialRules string `json:"specialRules"`
|
||||||
RemoteDst string `json:"remoteDestination"`
|
RemoteDst string `json:"remoteDestination"`
|
||||||
// Only domain rule
|
// Only domain rule
|
||||||
SniffHost string
|
SniffHost string
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Metadata) RemoteAddress() string {
|
func (m *Metadata) RemoteAddress() string {
|
||||||
|
@ -165,7 +165,7 @@ func (m *Metadata) SourceDetail() string {
|
||||||
|
|
||||||
func (m *Metadata) AddrType() int {
|
func (m *Metadata) AddrType() int {
|
||||||
switch true {
|
switch true {
|
||||||
case m.Host != "" || !m.DstIP.IsValid():
|
case m.Host != "" || m.SniffHost != "" || !m.DstIP.IsValid():
|
||||||
return socks5.AtypDomainName
|
return socks5.AtypDomainName
|
||||||
case m.DstIP.Is4():
|
case m.DstIP.Is4():
|
||||||
return socks5.AtypIPv4
|
return socks5.AtypIPv4
|
||||||
|
|
Loading…
Reference in a new issue