From 4d106b36b3fba08c5efc3c3d06c7838f0b536c3a Mon Sep 17 00:00:00 2001 From: qydysky Date: Sat, 13 Apr 2024 08:37:41 +0000 Subject: [PATCH] 1 --- Net.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Net.go b/Net.go index 8c89074..8815459 100644 --- a/Net.go +++ b/Net.go @@ -209,11 +209,11 @@ func Forward(targetaddr, network, listenaddr string, acceptCIDRs []string) (clos ip := net.ParseIP(strings.Split(proxyconn.RemoteAddr().String(), ":")[0]) - var accpet bool - for i := 0; i < len(matchfunc); i++ { - accpet = accpet || matchfunc[i](ip) + var deny bool + for i := 0; !deny && i < len(matchfunc); i++ { + deny = deny && !matchfunc[i](ip) } - if !accpet { + if deny { //返回Deny select { default: -- 2.39.2