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-09-11 12:05:06 +0300
committermhsanaei <ho3ein.sanaei@gmail.com>2025-09-11 12:10:17 +0300
commitcbf316db31bac79f7d497ce92f8aa899f3f4de08 (patch)
tree51a97cab7736119770ea7fe97d47f2f39e6e5153 /web
parent33a36ada4b681800677d6f9a140a6d7140ccd97a (diff)
Update check_client_ip_job.go
Diffstat (limited to 'web')
-rw-r--r--web/job/check_client_ip_job.go16
1 files changed, 9 insertions, 7 deletions
diff --git a/web/job/check_client_ip_job.go b/web/job/check_client_ip_job.go
index c839a876..a9b7302b 100644
--- a/web/job/check_client_ip_job.go
+++ b/web/job/check_client_ip_job.go
@@ -40,17 +40,19 @@ func (j *CheckClientIpJob) Run() {
f2bInstalled := j.checkFail2BanInstalled()
isAccessLogAvailable := j.checkAccessLogAvailable(iplimitActive)
- if iplimitActive {
+ if isAccessLogAvailable {
if runtime.GOOS == "windows" {
- if isAccessLogAvailable {
+ if iplimitActive {
shouldClearAccessLog = j.processLogFile()
}
} else {
- 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.")
+ 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.")
+ }
}
}
}