This commit is contained in:
世界 2024-03-24 19:05:40 +08:00
parent dd47163bea
commit 655724a762
No known key found for this signature in database
GPG Key ID: CD109927C34A63C4

View File

@ -27,11 +27,13 @@ func (r *IPIsPrivateItem) Match(metadata *adapter.InboundContext) bool {
if destination.IsValid() { if destination.IsValid() {
return !N.IsPublicAddr(destination) return !N.IsPublicAddr(destination)
} }
if !r.isSource {
for _, destinationAddress := range metadata.DestinationAddresses { for _, destinationAddress := range metadata.DestinationAddresses {
if !N.IsPublicAddr(destinationAddress) { if !N.IsPublicAddr(destinationAddress) {
return true return true
} }
} }
}
return false return false
} }