feat(cli): Add clean command for IP limiter

This commit is contained in:
ReturnFI
2025-11-07 07:25:26 +00:00
parent 6a1de4c43b
commit 570ff6fcf2
2 changed files with 13 additions and 0 deletions

View File

@ -768,6 +768,10 @@ def stop_ip_limiter():
'''Stops the IP limiter service.'''
run_cmd(['bash', Command.LIMIT_SCRIPT.value, 'stop'])
def clean_ip_limiter():
"""Cleans the IP limiter database and unblocks all IPs."""
run_cmd(['bash', Command.LIMIT_SCRIPT.value, 'clean'])
def config_ip_limiter(block_duration: Optional[int] = None, max_ips: Optional[int] = None):
'''Configures the IP limiter service.'''
if block_duration is not None and block_duration <= 0: