mirror of
https://github.com/SunBK201/UA3F.git
synced 2025-12-16 16:57:08 +00:00
fix: replace slices.Contains with manual iteration for whitelist check
This commit is contained in:
parent
e34de96116
commit
1ce1d4a401
@ -7,7 +7,6 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"net"
|
||||
"slices"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@ -446,8 +445,11 @@ func CopyPileline(dst io.Writer, src io.Reader, destAddrPort string) {
|
||||
isMatchUaPattern = true
|
||||
}
|
||||
}
|
||||
if slices.Contains(whitelist, uaStr) {
|
||||
for _, v := range whitelist {
|
||||
if v == uaStr {
|
||||
isInWhiteList = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if isInWhiteList || !isMatchUaPattern {
|
||||
if !isMatchUaPattern {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user