Fix the manage jails functions over ssh, also improve the speed or remote connections

This commit is contained in:
2025-11-12 16:25:16 +01:00
parent 9c3713bb41
commit 3b118cb616
6 changed files with 445 additions and 78 deletions

View File

@@ -21,6 +21,14 @@ type Connector interface {
GetFilterConfig(ctx context.Context, jail string) (string, error)
SetFilterConfig(ctx context.Context, jail, content string) error
FetchBanEvents(ctx context.Context, limit int) ([]BanEvent, error)
// Jail management
GetAllJails(ctx context.Context) ([]JailInfo, error)
UpdateJailEnabledStates(ctx context.Context, updates map[string]bool) error
// Filter operations
GetFilters(ctx context.Context) ([]string, error)
TestFilter(ctx context.Context, filterName string, logLines []string) ([]string, error)
}
// Manager orchestrates all connectors for configured Fail2ban servers.