mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-09-13 05:30:06 +00:00
Update check_client_ip_job.go
This commit is contained in:
parent
33a36ada4b
commit
cbf316db31
1 changed files with 9 additions and 7 deletions
|
@ -40,17 +40,19 @@ func (j *CheckClientIpJob) Run() {
|
||||||
f2bInstalled := j.checkFail2BanInstalled()
|
f2bInstalled := j.checkFail2BanInstalled()
|
||||||
isAccessLogAvailable := j.checkAccessLogAvailable(iplimitActive)
|
isAccessLogAvailable := j.checkAccessLogAvailable(iplimitActive)
|
||||||
|
|
||||||
if iplimitActive {
|
if isAccessLogAvailable {
|
||||||
if runtime.GOOS == "windows" {
|
if runtime.GOOS == "windows" {
|
||||||
if isAccessLogAvailable {
|
if iplimitActive {
|
||||||
shouldClearAccessLog = j.processLogFile()
|
shouldClearAccessLog = j.processLogFile()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if f2bInstalled && isAccessLogAvailable {
|
if iplimitActive {
|
||||||
shouldClearAccessLog = j.processLogFile()
|
if f2bInstalled {
|
||||||
} else {
|
shouldClearAccessLog = j.processLogFile()
|
||||||
if !f2bInstalled {
|
} else {
|
||||||
logger.Warning("[LimitIP] Fail2Ban is not installed, Please install Fail2Ban from the x-ui bash menu.")
|
if !f2bInstalled {
|
||||||
|
logger.Warning("[LimitIP] Fail2Ban is not installed, Please install Fail2Ban from the x-ui bash menu.")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue