harden(relay): gate forwarded-IP on trusted proxies, bound queue flush
Rate limiting and the per-IP WebSocket cap trusted X-Forwarded-For and X-Real-Ip unconditionally. Onion traffic bypasses the reverse proxy, so a client could set the header itself and slip past every limit. Forwarded headers are now honoured only from peers inside SEPOT_TRUSTED_PROXIES; everyone else is keyed by peer address, and onion clients share one bucket. The queue flush also read the whole backlog into memory at once, and the certificate authority kept the trust-root private key in the database even though it is only ever needed offline.
This commit is contained in:
@@ -22,6 +22,8 @@ sqlx = { version = "0.8", default-features = false, features = [
|
||||
"macros",
|
||||
] }
|
||||
dashmap = "6"
|
||||
# CIDR match trusted proxy sítí pro anti-abuse klíč (viz net.rs)
|
||||
ipnet = "2"
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
base64 = "0.22"
|
||||
|
||||
Reference in New Issue
Block a user