diff --git a/src/default_config_event.h b/src/default_config_event.h index d84e97a..0646edf 100644 --- a/src/default_config_event.h +++ b/src/default_config_event.h @@ -103,8 +103,8 @@ static const struct { // Ban IPs that connect but never send REQ or EVENT (idle or early disconnect) {"idle_connection_timeout_sec", "30"}, // Seconds before idle connection is closed (0 = disabled) {"idle_ban_enabled", "true"}, // Whether to ban IPs with idle failures - {"idle_ban_threshold", "3"}, // Idle failures before ban - {"idle_ban_window_sec", "60"}, // Window to count idle failures in + {"idle_ban_threshold", "1"}, // Idle failures before ban (1 = ban on first offense) + {"idle_ban_window_sec", "30"}, // Window to count idle failures in {"idle_ban_duration_sec", "300"}, // Initial ban duration (doubles each time, max 24h) // SQLite Performance Tuning diff --git a/src/ip_ban.c b/src/ip_ban.c index 86aec4d..125cae9 100644 --- a/src/ip_ban.c +++ b/src/ip_ban.c @@ -360,8 +360,8 @@ void ip_ban_record_idle_failure(const char* ip) { if (!ip || !g_initialized) return; if (!get_config_bool("idle_ban_enabled", 1)) return; - int threshold = get_config_int("idle_ban_threshold", 3); - int window_sec = get_config_int("idle_ban_window_sec", 60); + int threshold = get_config_int("idle_ban_threshold", 1); + int window_sec = get_config_int("idle_ban_window_sec", 30); int ban_duration = get_config_int("idle_ban_duration_sec", 300); pthread_mutex_lock(&g_ban_mutex); diff --git a/src/main.h b/src/main.h index 6d1149f..9896669 100644 --- a/src/main.h +++ b/src/main.h @@ -13,8 +13,8 @@ // Using CRELAY_ prefix to avoid conflicts with nostr_core_lib VERSION macros #define CRELAY_VERSION_MAJOR 1 #define CRELAY_VERSION_MINOR 2 -#define CRELAY_VERSION_PATCH 31 -#define CRELAY_VERSION "v1.2.31" +#define CRELAY_VERSION_PATCH 32 +#define CRELAY_VERSION "v1.2.32" // Relay metadata (authoritative source for NIP-11 information) #define RELAY_NAME "C-Relay"