From: qydysky Date: Sat, 13 Apr 2024 08:45:33 +0000 (+0000) Subject: 1 X-Git-Tag: v0.28.20240413085100 X-Git-Url: http://127.0.0.1:8081/?a=commitdiff_plain;h=27e3fc8646640e0053575258abdaa9344e9d7d2d;p=part%2F.git 1 --- diff --git a/Net.go b/Net.go index 8815459..d586e5a 100644 --- a/Net.go +++ b/Net.go @@ -387,11 +387,11 @@ func ForwardUdp(targetaddr, network, listenaddr string, acceptCIDRs []string) (c continue } - var accpet bool - for i := 0; i < len(matchfunc); i++ { - accpet = accpet || matchfunc[i](cliAddr.IP) + var deny bool + for i := 0; !deny && i < len(matchfunc); i++ { + deny = deny && !matchfunc[i](cliAddr.IP) } - if !accpet { + if deny { //返回Deny select { default: