Meow authored and GitHub committed 2026-10-28 23:45:22 +00:00
1 parent 613d8147bb
commit 43c29f8eb1
2 files changed
+62 -19

No files matched your search

+3 -2
View File
@@ -237,10 +237,11 @@ type OutboundDetourConfig struct {
func requiresTransportSecurity(address *Address) bool {
if address == nil || address.Address == nil {
return false
return true
}
if address.Family().IsIP() {
return !geodata.GetPrivateIPMatcher().Match(address.IP())
ip := address.IP()
return !ip.IsPrivate() && !ip.IsLoopback() && !ip.IsLinkLocalUnicast()
}
domain := strings.TrimSuffix(strings.ToLower(address.Domain()), ".")
return !geodata.GetPrivateDomainMatcher().MatchAny(domain)