Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authormhsanaei <ho3ein.sanaei@gmail.com>2025-01-05 20:58:51 +0300
committermhsanaei <ho3ein.sanaei@gmail.com>2025-01-05 20:58:51 +0300
commitee946ceab20def23a4ef2188271a297725ec4909 (patch)
treeaeb9ceeb4da9b7d37fad6d8018f5da8281befa0a /web
parentb6500641771b3cc727d72efe64f90700d4aaca22 (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')
-rw-r--r--web/job/check_client_ip_job.go2
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()