diff options
| author | mhsanaei <ho3ein.sanaei@gmail.com> | 2025-01-05 20:58:51 +0300 |
|---|---|---|
| committer | mhsanaei <ho3ein.sanaei@gmail.com> | 2025-01-05 20:58:51 +0300 |
| commit | ee946ceab20def23a4ef2188271a297725ec4909 (patch) | |
| tree | aeb9ceeb4da9b7d37fad6d8018f5da8281befa0a /web/job | |
| parent | b6500641771b3cc727d72efe64f90700d4aaca22 (diff) | |
iplimit: ipRegex improved
When the client has MUX enabled, a TCP or UDP prefix appears before the IP address. We initially weren’t aware of this behavior, but we have now resolved the issue.
Diffstat (limited to 'web/job')
| -rw-r--r-- | web/job/check_client_ip_job.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/web/job/check_client_ip_job.go b/web/job/check_client_ip_job.go index 61f8b724..c960268d 100644 --- a/web/job/check_client_ip_job.go +++ b/web/job/check_client_ip_job.go @@ -106,7 +106,7 @@ func (j *CheckClientIpJob) hasLimitIp() bool { func (j *CheckClientIpJob) processLogFile() bool { - ipRegex := regexp.MustCompile(`from \[?([0-9a-fA-F:.]+)\]?:\d+ accepted`) + ipRegex := regexp.MustCompile(`from (?:tcp:|udp:)?\[?([0-9a-fA-F\.:]+)\]?:\d+ accepted`) emailRegex := regexp.MustCompile(`email: (.+)$`) accessLogPath, _ := xray.GetAccessLogPath() |
