1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-11-14 08:15:55 -05:00

Fix: logic of domain override

This commit is contained in:
秋のかえで 2022-11-29 09:54:15 +08:00
parent 82495d092b
commit 3c0aff73e8
No known key found for this signature in database
GPG Key ID: 15FE3C27897EC4B5

View File

@ -182,7 +182,7 @@ func shouldOverride(result SniffResult, domainOverride []string) bool {
protocolString = resComp.ProtocolForDomainResult()
}
for _, p := range domainOverride {
if strings.HasPrefix(protocolString, p) && strings.HasSuffix(protocolString, p) {
if strings.HasPrefix(protocolString, p) || strings.HasSuffix(protocolString, p) {
return true
}
if resultSubset, ok := result.(SnifferIsProtoSubsetOf); ok {