Update sing-box core, refactor MASQUE, update XHTTP

This commit is contained in:
Shtorm
2026-05-29 01:31:57 +03:00
parent 1cb7950810
commit b953954b60
111 changed files with 1291 additions and 1660 deletions

View File

@@ -2,6 +2,7 @@ package rule
import (
"net/netip"
"slices"
"strings"
"github.com/sagernet/sing-box/adapter"
@@ -80,12 +81,7 @@ func (r *IPCIDRItem) Match(metadata *adapter.InboundContext) bool {
return r.ipSet.Contains(metadata.Destination.Addr)
}
if len(metadata.DestinationAddresses) > 0 {
for _, address := range metadata.DestinationAddresses {
if r.ipSet.Contains(address) {
return true
}
}
return false
return slices.ContainsFunc(metadata.DestinationAddresses, r.ipSet.Contains)
}
return metadata.IPCIDRAcceptEmpty
}