diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2026-01-14 11:42:05 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2026-01-14 13:40:03 +0000 |
| commit | 50000cd9d47681390c3c45feef98fe51c7b79a0f (patch) | |
| tree | 53ede8cb63ac2c5fe2321a6ecd9c87956537bbc7 /.env.example | |
| parent | e3792b9abefd43b4594af2640ad4665c006fa3b0 (diff) | |
Add explicit rate limits and total connection limit
- Make RateLimit explicit in relay builder (500 subs, 60 events/min)
- Add NGIT_MAX_CONNECTIONS config option (default: 500)
- Update all 4 config locations (src, nix, docs, .env.example)
- Fix documentation error: filter limit 5000→500
- Document Phase 2 deferral decision (per-IP enforcement)
Addresses primary DoS vector (connection exhaustion) with minimal code.
Per-IP rate limiting deferred until abuse detected in production.
Related: issue ff38 (git endpoint throttling - separate concern)
Diffstat (limited to '.env.example')
| -rw-r--r-- | .env.example | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/.env.example b/.env.example index 707efd4..953ae93 100644 --- a/.env.example +++ b/.env.example | |||
| @@ -277,4 +277,14 @@ | |||
| 277 | # Examples: | 277 | # Examples: |
| 278 | # NGIT_EVENT_BLACKLIST=npub1spam... | 278 | # NGIT_EVENT_BLACKLIST=npub1spam... |
| 279 | # NGIT_EVENT_BLACKLIST=npub1spam...,npub1abuser... | 279 | # NGIT_EVENT_BLACKLIST=npub1spam...,npub1abuser... |
| 280 | # NGIT_EVENT_BLACKLIST= \ No newline at end of file | 280 | # NGIT_EVENT_BLACKLIST= |
| 281 | |||
| 282 | # ============================================================================ | ||
| 283 | # RATE LIMITING & DOS PROTECTION | ||
| 284 | # ============================================================================ | ||
| 285 | |||
| 286 | # Maximum total connections to the relay | ||
| 287 | # Prevents connection exhaustion DoS attacks | ||
| 288 | # CLI: --max-connections <count> | ||
| 289 | # Default: 500 | ||
| 290 | # NGIT_MAX_CONNECTIONS=500 \ No newline at end of file | ||