From 82ddd106277420ff80093e6f014cf36c6c57a17b Mon Sep 17 00:00:00 2001 From: mhsanaei Date: Wed, 10 Sep 2025 21:12:37 +0200 Subject: Fixed: update Xray Core on Windows --- web/job/check_client_ip_job.go | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'web/job') diff --git a/web/job/check_client_ip_job.go b/web/job/check_client_ip_job.go index 5a30b616..c839a876 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" @@ -40,11 +41,17 @@ func (j *CheckClientIpJob) Run() { isAccessLogAvailable := j.checkAccessLogAvailable(iplimitActive) if iplimitActive { - if f2bInstalled && isAccessLogAvailable { - shouldClearAccessLog = j.processLogFile() + if runtime.GOOS == "windows" { + if isAccessLogAvailable { + shouldClearAccessLog = j.processLogFile() + } } else { - if !f2bInstalled { - logger.Warning("[LimitIP] Fail2Ban is not installed, Please install Fail2Ban from the x-ui bash menu.") + if f2bInstalled && isAccessLogAvailable { + shouldClearAccessLog = j.processLogFile() + } else { + if !f2bInstalled { + logger.Warning("[LimitIP] Fail2Ban is not installed, Please install Fail2Ban from the x-ui bash menu.") + } } } } -- cgit v1.2.3