v1.2.32 - Set idle_ban_threshold default to 1 and idle_ban_window_sec default to 30

This commit is contained in:
Your Name
2026-02-24 15:45:40 -04:00
parent 929bd09164
commit 76c9b3fcf0
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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);
+2 -2
View File
@@ -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"