mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-12-18 05:04:40 +03:00
Removed ipLimit from the panel, changed the code to work with fail2ban (#580)
* Logging for fail2ban service
Removed limitDevice and other unnecessary functions
* Logging for fail2ban service
Removed limitDevice and other unnecessary functions
* fixed shouldCleanLog
* last fix
* reduced ip limit detection frequency to 30 sec (less logging, more precise)
changed maxretry in fail2ban jail config to 2 to fit above
* fixed check delay
* added 5 seconds delay before cleaning logs
This commit is contained in:
@@ -250,8 +250,8 @@ func (s *Server) startTask() {
|
||||
// Check the inbound traffic every 30 seconds that the traffic exceeds and expires
|
||||
s.cron.AddJob("@every 30s", job.NewCheckInboundJob())
|
||||
|
||||
// check client ips from log file every 10 sec
|
||||
s.cron.AddJob("@every 10s", job.NewCheckClientIpJob())
|
||||
// check client ips from log file every 30 sec
|
||||
s.cron.AddJob("@every 30s", job.NewCheckClientIpJob())
|
||||
|
||||
// Make a traffic condition every day, 8:30
|
||||
var entry cron.EntryID
|
||||
|
||||
Reference in New Issue
Block a user