From 207a9498351e676b2faec9cdbc9c9ebc306e1782 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 24 Feb 2026 14:18:27 -0400 Subject: [PATCH] v1.2.29 - Added idle connection ban system - bans IPs that connect but never send REQ/EVENT (idle timeout or early disconnect) with separate rate limiting from auth failures --- api/index.html | 93 +++++ api/index.js | 239 +++++++++++- plans/idle_connection_ban_plan.md | 585 ++++++++++++++++++++++++++++++ relay.pid | 2 +- src/api.c | 17 + src/config.c | 61 ++++ src/default_config_event.h | 8 + src/embedded_web_content.c | 8 +- src/ip_ban.c | 172 +++++++-- src/ip_ban.h | 5 + src/main.h | 4 +- src/nip042.c | 4 +- src/websockets.c | 87 ++++- src/websockets.h | 4 + tests/nip42_test.log | 88 +++++ 15 files changed, 1322 insertions(+), 55 deletions(-) create mode 100644 plans/idle_connection_ban_plan.md create mode 100644 tests/nip42_test.log diff --git a/api/index.html b/api/index.html index 9e589ed..fc9529c 100644 --- a/api/index.html +++ b/api/index.html @@ -16,6 +16,7 @@
  • +
  • @@ -382,6 +383,94 @@ WEB OF TRUST + + +