rt: add per-IP concurrent-connection limiter (F6) · KarpelesLab/httpsd@ef3f1b4 · GitHub
Skip to content

Commit ef3f1b4

Browse files
MagicalTuxclaude
andcommitted
rt: add per-IP concurrent-connection limiter (F6)
Add PeerLimiter + RAII PeerGuard in rt/common: bounds concurrent connections per client IP so one source cannot consume the whole global connection budget. A cap of 0 disables limiting; an unattributable peer (no address) always admits. Poisoned-mutex-safe throughout. Rejected connections are shed silently, matching the existing global caps. Addresses audit finding F6 (per-IP connection limits). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent c1afcea commit ef3f1b4

1 file changed

Lines changed: 115 additions & 2 deletions

File tree

‎src/rt/common.rs‎

Lines changed: 115 additions & 2 deletions

0 commit comments

Comments
 (0)