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