diff options
| author | mhsanaei <ho3ein.sanaei@gmail.com> | 2025-09-10 22:12:37 +0300 |
|---|---|---|
| committer | mhsanaei <ho3ein.sanaei@gmail.com> | 2025-09-10 22:12:37 +0300 |
| commit | 82ddd106277420ff80093e6f014cf36c6c57a17b (patch) | |
| tree | 4d2bd002c3102a6c4e3e2b799226022f93452e17 /web/job | |
| parent | 2401c99817f1bafe42c3e90d2574198bbb33c9cf (diff) | |
Fixed: update Xray Core on Windows
Diffstat (limited to 'web/job')
| -rw-r--r-- | web/job/check_client_ip_job.go | 15 |
1 files changed, 11 insertions, 4 deletions
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.") + } } } } |
