From 655724a76224db3dbf5f5a3f2a08b2e8c8224bea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Sun, 24 Mar 2024 19:05:40 +0800 Subject: [PATCH] FIx 2 --- route/rule_item_ip_is_private.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/route/rule_item_ip_is_private.go b/route/rule_item_ip_is_private.go index d7341645..6592a9d3 100644 --- a/route/rule_item_ip_is_private.go +++ b/route/rule_item_ip_is_private.go @@ -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