Limit the tracker per address and harden its plain HTTP path

Per address and minute: connects and forwarded signaling, so reconnecting
doesn't reset a client's allowance. X-Forwarded-For only counts from PROXIES,
checked with net.BlockList, with one warning when an uncovered peer sends it.
Plain requests get timeouts and a closing 404, silent connections go after
30 s and all queues together share a budget.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
SchluffeandClaude Opus 5.5 committed 2026-10-29 20:27:50 +01:00
1 parent ae1e3bef9b
commit b102e55495
5 files changed
+340 -34

No files matched your search

+5
View File
@@ -7,3 +7,8 @@ ORIGINS=https://hellcon.example.org
# The external network Caddy is on, "caddy" if unset.
#CADDY_NETWORK=caddy
# Whose X-Forwarded-For the tracker believes, addresses or CIDRs separated by commas or spaces. Every
# private range if unset, see compose.yaml. Narrow it to Caddy's address in CADDY_NETWORK, but keep it
# covered: otherwise all clients count as Caddy's and share its limits, nearly all are refused.
#PROXIES=172.16.0.0/12 192.168.0.0/16 10.0.0.0/8 fd00::/8