[blockcheck2] Add a way to test the size-based block without a real download

The "16 KB" block triggers based on how much data passes through the
connection, not on what that data actually is. Testing for it usually
means pointing at a page you know is big enough to download - but that
only works if your target actually has one.

Adds CURL_PAD_KB: set it to a number and every request gets padded
with that many KB of junk data, so the block can be triggered against
any target, even a bare server with nothing to download. Off by
default, and doesn't change anything unless you turn it on.

The padding is written to a temp file and attached from there, not
built inline: a large inline value can hit low, easy-to-reach limits
on some platforms (Cygwin among them).
This commit is contained in:
Alexander Golovanov committed 2026-09-17 12:57:31 +03:00
1 parent 2efdb70b1c
commit 34a95e8a41
3 files changed
+23

No files matched your search

+1
View File
@@ -4973,6 +4973,7 @@ CURL_MAX_TIME_DOH - curl timeout for DoH servers
CURL_CMD=1 - display curl commands
CURL_OPT - additional curl options. `-k` to ignore certificates, `-v` for verbose protocol output
CURL_HTTPS_GET=1 - use the GET method instead of HEAD for HTTPS
CURL_PAD_KB - pad every curl request with a junk header of this many KB. Useful for testing a "16 KB"-style whitelist block (see [below](#why-it-wont-open)) against a target with no large page of its own to download, since that block triggers on total bytes transferred rather than on how much of it was a real response. Independent of CURL_HTTPS_GET; use whichever fits the target
DOMAINS - space-separated list of domains or domains with URIs to test
TEST - name of the test
IPVS=4|6|46 - IP protocol versions to test
+1
View File
@@ -5161,6 +5161,7 @@ CURL_MAX_TIME_DOH - время таймаута curl для DoH серверов
CURL_CMD=1 - показывать команды curl
CURL_OPT - дополнительные параметры curl. `-k` - игнор сертификатов. `-v` - подробный вывод протокола
CURL_HTTPS_GET=1 - использовать метод GET вместо HEAD для https
CURL_PAD_KB - добавлять к каждому запросу curl мусорный заголовок на указанное число КБ. Полезно для проверки блока в стиле "16 кб" (см. [ниже](#почему-не-открывается)) на ресурсе без своей большой страницы для скачивания, поскольку этот блок срабатывает по суммарному числу переданных байт, а не по тому, сколько из них было настоящим ответом. Независимо от CURL_HTTPS_GET, используйте то, что подходит для конкретной цели
DOMAINS - список тестируемых доменов или доменов с URI через пробел
TEST - имя теста
IPVS=4|6|46 - тестируемые версии ip протокола