Added http proxy list link port

- Added port number and http proto to http proxy list link #635
This commit is contained in:
Toby Chui
2025-04-12 11:32:22 +08:00
parent 76e2861fea
commit 0c8dfd8aa0
3 changed files with 18 additions and 8 deletions

View File

@@ -57,7 +57,7 @@ func GetRequesterIP(r *http.Request) string {
//e.g. [15c4:cbb4:cc98:4291:ffc1:3a46:06a1:51a7]
requesterRawIp = requesterRawIp[1 : len(requesterRawIp)-1]
}
return requesterRawIp
}
@@ -91,7 +91,7 @@ func MatchIpCIDR(ip string, cidr string) bool {
if i := strings.Index(ip, "%"); i != -1 {
ip = ip[:i]
}
// parse the CIDR string
_, cidrnet, err := net.ParseCIDR(cidr)
if err != nil {