Expose usedns, date_pattern, and prefregex in jail config UI
- Add use_dns and prefregex fields to JailConfig model (backend + frontend types) - Add prefregex to JailConfigUpdate; validate as regex before writing - Fetch usedns and prefregex in get_jail_config via asyncio.gather - Write usedns and prefregex in update_jail_config - ConfigPage JailAccordionPanel: editable date_pattern input, dns_mode Select dropdown (yes/warn/no/raw), and prefregex input - 8 new service unit tests + 3 new router integration tests - 628 tests pass; 85% line coverage; ruff/mypy/tsc/eslint clean
This commit is contained in:
@@ -50,6 +50,10 @@ export interface JailConfig {
|
||||
date_pattern: string | null;
|
||||
log_encoding: string;
|
||||
backend: string;
|
||||
/** DNS look-up mode reported by fail2ban: "yes" | "warn" | "no" | "raw". */
|
||||
use_dns: string;
|
||||
/** Prefix regex prepended to every failregex; empty string means disabled. */
|
||||
prefregex: string;
|
||||
actions: string[];
|
||||
bantime_escalation: BantimeEscalation | null;
|
||||
}
|
||||
@@ -69,6 +73,8 @@ export interface JailConfigUpdate {
|
||||
find_time?: number | null;
|
||||
fail_regex?: string[] | null;
|
||||
ignore_regex?: string[] | null;
|
||||
/** Prefix regex; undefined/null = skip, "" = clear, non-empty = set. */
|
||||
prefregex?: string | null;
|
||||
date_pattern?: string | null;
|
||||
dns_mode?: string | null;
|
||||
enabled?: boolean | null;
|
||||
|
||||
Reference in New Issue
Block a user