From 5ea33ba967ebe313fa134e6adb3b9de27a7b6ff1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BF=83=E9=9A=A8=E7=B7=A3=E5=8B=95?= Date: Thu, 11 Sep 2025 21:43:25 +0800 Subject: [PATCH] update Xray Core on Windows --- web/job/check_client_ip_job.go | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/web/job/check_client_ip_job.go b/web/job/check_client_ip_job.go index 48a82c3b..1c2e51d0 100644 --- a/web/job/check_client_ip_job.go +++ b/web/job/check_client_ip_job.go @@ -8,6 +8,7 @@ import ( "os" "os/exec" "regexp" + "runtime" "sort" "time" "sync" @@ -356,12 +357,20 @@ func (j *CheckClientIpJob) Run() { f2bInstalled := j.checkFail2BanInstalled() isAccessLogAvailable := j.checkAccessLogAvailable(iplimitActive) - if iplimitActive { - if f2bInstalled && isAccessLogAvailable { - shouldClearAccessLog = j.processLogFile() + if isAccessLogAvailable { + if runtime.GOOS == "windows" { + if iplimitActive { + shouldClearAccessLog = j.processLogFile() + } } else { - if !f2bInstalled { - logger.Warning("[LimitIP] Fail2Ban is not installed, Please install Fail2Ban from the x-ui bash menu.") + if iplimitActive { + if f2bInstalled { + shouldClearAccessLog = j.processLogFile() + } else { + if !f2bInstalled { + logger.Warning("[LimitIP] Fail2Ban is not installed, Please install Fail2Ban from the x-ui bash menu.") + } + } } } }