From 4e89c71095614ff2207f71925e18e5a8cd2cd830 Mon Sep 17 00:00:00 2001 From: somebodywashere <68244480+somebodywashere@users.noreply.github.com> Date: Thu, 15 Jun 2023 22:15:34 +0300 Subject: 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 --- web/web.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'web/web.go') diff --git a/web/web.go b/web/web.go index 3d8f0242..a70ae3c8 100644 --- a/web/web.go +++ b/web/web.go @@ -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 -- cgit v1.2.3