From 3976bb6251e5d19427024049575a96007078abc0 Mon Sep 17 00:00:00 2001 From: Jaakko Vanhala Date: Mon, 6 Apr 2026 08:56:36 +0300 Subject: [PATCH] =?UTF-8?q?IP-yhteysraja=20nostettu=204=E2=86=9210:=20mahd?= =?UTF-8?q?ollistaa=20useamman=20laitteen=20samasta=20IP:st=C3=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Jokainen selain tarvitsee 2 WebSocket-yhteyttä (UI + coder-node). Vanha raja 4 esti toisen koneen yhdistämisen samasta IP:stä (esim. kotiverkko). Uusi raja 10 riittää 5 samanaikaiselle selaimelle / laitteelle. Co-Authored-By: Claude Opus 4.6 (1M context) --- network-poc/hub/src/main.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/network-poc/hub/src/main.rs b/network-poc/hub/src/main.rs index d733306..81f5193 100644 --- a/network-poc/hub/src/main.rs +++ b/network-poc/hub/src/main.rs @@ -486,15 +486,15 @@ async fn ws_handler( .and_then(|s| s.trim().parse::().ok()) .unwrap_or_else(|| addr.ip()); - // Max 2 yhteyttä per IP (dashboard-UI + selainsolmu) + // Max yhteyttä per IP: jokainen selain tarvitsee 2 (UI + coder-node) { let conns = state.ip_connections.lock().unwrap(); let count = conns.get(&ip).copied().unwrap_or(0); - if count >= 4 { - tracing::warn!("IP {} ylitti yhteysrajan ({}/4) — estetty", ip, count); + if count >= 10 { + tracing::warn!("IP {} ylitti yhteysrajan ({}/10) — estetty", ip, count); return ( axum::http::StatusCode::TOO_MANY_REQUESTS, - "Max 4 yhteyttä per IP", + "Max 10 yhteyttä per IP", ).into_response(); } }