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,13 +40,14 @@ func (j *CheckClientIpJob) Run() {
|
|||
f2bInstalled := j.checkFail2BanInstalled()
|
||||
isAccessLogAvailable := j.checkAccessLogAvailable(iplimitActive)
|
||||
|
||||
if iplimitActive {
|
||||
if runtime.GOOS == "windows" {
|
||||
if isAccessLogAvailable {
|
||||
if runtime.GOOS == "windows" {
|
||||
if iplimitActive {
|
||||
shouldClearAccessLog = j.processLogFile()
|
||||
}
|
||||
} else {
|
||||
if f2bInstalled && isAccessLogAvailable {
|
||||
if iplimitActive {
|
||||
if f2bInstalled {
|
||||
shouldClearAccessLog = j.processLogFile()
|
||||
} else {
|
||||
if !f2bInstalled {
|
||||
|
@ -55,6 +56,7 @@ func (j *CheckClientIpJob) Run() {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if shouldClearAccessLog || (isAccessLogAvailable && time.Now().Unix()-j.lastClear > 3600) {
|
||||
j.clearAccessLog()
|
||||
|
|
Loading…
Reference in a new issue