From e167d7df024687054dbfe63a635d2fa25e93e920 Mon Sep 17 00:00:00 2001 From: poli0981 <127664709+poli0981@users.noreply.github.com> Date: Tue, 27 Oct 2026 07:02:52 +0700 Subject: [PATCH] docs(security): a WAF check command that actually trips the rule The section 3a check ran 300 separate curls through xargs -P 30. Each one pays a TLS handshake, so from here it managed about 21 requests a second - 300 x 200 in 14 s - and never crossed 250 in 10 s: the rule looked broken when it was not. One `curl --parallel` with its URL list on stdin reuses its connections and does: 250 x 200 then 150 x 429, measured against the live site-wide rule on 2026-10-27. Co-Authored-By: Claude Opus 5.5 --- docs/SECURITY_SETUP.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/SECURITY_SETUP.md b/docs/SECURITY_SETUP.md index 3e2c219b..8d5a4309 100644 --- a/docs/SECURITY_SETUP.md +++ b/docs/SECURITY_SETUP.md @@ -299,12 +299,17 @@ count at all - the Worker limits cover `/api/*` either way: file, so no Worker invocation is spent): ```bash -seq 1 300 | xargs -P 30 -I{} curl -s -o /dev/null -w '%{http_code}\n' https://free-steam-games.win/robots.txt | sort | uniq -c +for i in $(seq 1 400); do printf 'url = "https://free-steam-games.win/robots.txt"\noutput = "/dev/null"\n'; done | curl -s --parallel --parallel-max 50 -w '%{http_code}\n' -K - | sort | uniq -c ``` -Expected: about 250 × `200`, then `429`s. With `public-proxies` instead, a -static file is never counted: use `/api/data/data/index.json` and expect about -150. Watch **Security → Events** for a week before changing the threshold. +Expected: about 250 × `200`, then `429`s (measured 2026-10-27: 250 and 150). +It has to be ONE `curl --parallel`, which reuses its connections: a loop or +`xargs` of separate `curl`s pays a TLS handshake per request, stays near 20 +requests a second from a home connection and never reaches the limit +(measured: 300 × `200`). On Windows `curl.exe`, write `NUL` for `/dev/null`. +With `public-proxies` instead, a static file is never counted: use +`/api/data/data/index.json` and expect about 150. Watch **Security → Events** +for a week before changing the threshold. ### 3b. The Worker limits — one budget per surface