diff --git a/Cargo.lock b/Cargo.lock index f2c00e9..87346d4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -516,7 +516,7 @@ dependencies = [ [[package]] name = "dpi-core" -version = "5.0.0-alpha.12" +version = "5.0.0-alpha.13" dependencies = [ "base64", "brotli", @@ -548,7 +548,7 @@ dependencies = [ [[package]] name = "dpi-detector" -version = "5.0.0-alpha.12" +version = "5.0.0-alpha.13" dependencies = [ "clap", "comfy-table", diff --git a/Cargo.toml b/Cargo.toml index 39c76b9..4cf330e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,7 @@ h2 = { path = "vendor/h2" } hyper = { path = "vendor/hyper" } [workspace.package] -version = "5.0.0-alpha.12" +version = "5.0.0-alpha.13" edition = "2021" authors = ["runnin"] license = "MIT" diff --git a/README.md b/README.md index dc752c1..2e16c7a 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,7 @@ curl -fsSL https://raw.githubusercontent.com/Runnin4ik/dpi-detector/rust/install --tcp16 Путь к файлу целей TCP16 --ascii Только ASCII для старых консолей (без Unicode-глифов и рамок) --fingerprint Профиль отпечатка (rustls|firefox|chrome|safari): ClientHello, User-Agent и заголовки, преамбула HTTP/2. firefox — форма Firefox 133, chrome — Chrome 107 / Edge 99-101, safari — Safari 15.5-18.4 из curl-impersonate; все предлагают h2 - --burst Fingerprint/Сибирская блокировка (тест 6): соединений на домен, одно за другим [по умолчанию: 4] + --burst Fingerprint/Сибирская блокировка (тест 6): соединений на домен, одно за другим [по умолчанию: 5] --burst-timeout Тест 6: таймаут одного рукопожатия, секунды [по умолчанию: 8] --burst-profiles Fingerprint для теста 6: all|rustls,firefox(firefox133),chrome(chrome107),safari(safari155) [по умолчанию: all] --burst-tls TLS для теста 6: 1.3+1.2 (предложение браузера, ответ должен быть 1.3)|1.3 (только 1.3)|1.2 (только 1.2) [по умолчанию: 1.3+1.2] @@ -142,7 +142,7 @@ curl -fsSL https://raw.githubusercontent.com/Runnin4ik/dpi-detector/rust/install В таблице `M/N` по каждому отпечатку: зелёный — все попытки прошли целиком, жёлтый — часть, красный — никто. В колонке «Детали» — **все** вердикты строки, сгруппированные по статусу, самые частые первыми (`TLS ALERT ×8 · TLS RST ×4`), так что двенадцать потерянных рукопожатий не схлопываются в одну «победившую» ошибку. Из-за последовательности `M` теперь ещё и номер первой сорвавшейся попытки: `3/5` значит «первые три прошли, дальше перестало». -Раунд одной формы на одном домене идёт `N` попыток подряд, поэтому в худшем случае (хост молча глотает пакеты) он длится `N × --burst-timeout` плюс время на запросы — при `--burst 4` и таймауте 8 это до ~32 секунд на домен. Домены идут параллельно, поэтому общее время прогона ≈ самое медленное домен-раунд, а не сумма. +Раунд одной формы на одном домене идёт `N` попыток подряд, поэтому в худшем случае (хост молча глотает пакеты) он длится `N × --burst-timeout` плюс время на запросы — при `--burst 5` и таймауте 8 это до ~40 секунд на домен. Домены идут параллельно, поэтому общее время прогона ≈ самое медленное домен-раунд, а не сумма. Во время прогона печатается одна живая строка `Тестируем: CHROME 107 3/4 12/35 · 00:04` — какая форма сейчас в эфире, который это раунд из скольких, сколько хостов раунда готово и сколько идёт время. diff --git a/crates/dpi-core/src/probe/burst.rs b/crates/dpi-core/src/probe/burst.rs index 0bf6d72..06873bb 100644 --- a/crates/dpi-core/src/probe/burst.rs +++ b/crates/dpi-core/src/probe/burst.rs @@ -60,10 +60,12 @@ pub const BURST_PORT: u16 = 443; /// Bounds of the per-round attempt count — the connections one shape fires at /// one host, one after another. Two is the smallest number that can differ from /// a single probe; the upper bound keeps a stray keystroke from turning the test -/// into a flood. +/// into a flood. The default sits one above the commonest throttle (a link that +/// cuts the fourth connection): at four, the run ends exactly where the answer +/// starts. pub const BURST_MIN_ATTEMPTS: usize = 2; pub const BURST_MAX_ATTEMPTS: usize = 16; -pub const BURST_DEFAULT_ATTEMPTS: usize = 4; +pub const BURST_DEFAULT_ATTEMPTS: usize = 5; /// Bounds of the per-attempt timeout, in whole seconds. pub const BURST_MIN_TIMEOUT_SECS: u64 = 1; pub const BURST_MAX_TIMEOUT_SECS: u64 = 60; diff --git a/crates/dpi-detector/src/i18n/en.rs b/crates/dpi-detector/src/i18n/en.rs index ad79f7b..6b4a3cb 100644 --- a/crates/dpi-detector/src/i18n/en.rs +++ b/crates/dpi-detector/src/i18n/en.rs @@ -214,7 +214,7 @@ pub(crate) fn messages() -> Messages { cli_concurrency: "Concurrency limit for parallel requests", cli_domain: "Specific domain(s) to test (repeat the flag: -d vk.com -d ya.ru)", cli_output: "Output file path to save report", - cli_burst: "Fingerprint stress (test 6): connections per host, one after another [default: 4]", + cli_burst: "Fingerprint stress (test 6): connections per host, one after another [default: 5]", cli_burst_timeout: "Test 6: handshake timeout, seconds [default: 8]; the request that follows waits read_timeout", cli_burst_profiles: "Test 6 fingerprints: all|rustls,firefox(firefox133),chrome(chrome107),safari(safari155) [default: all]", cli_burst_tls: "Test 6 TLS: 1.3+1.2 (the browser's own offer, must answer 1.3)|1.3 (offers 1.3 only)|1.2 (offers 1.2 only) [default: 1.3+1.2]", diff --git a/crates/dpi-detector/src/i18n/fa.rs b/crates/dpi-detector/src/i18n/fa.rs index 286bc25..d3ce38b 100644 --- a/crates/dpi-detector/src/i18n/fa.rs +++ b/crates/dpi-detector/src/i18n/fa.rs @@ -207,7 +207,7 @@ pub(crate) fn messages() -> Messages { cli_concurrency: "Hadde aksar-e darkhast haye hamzaman", cli_domain: "Domain haye khass baraye barresi (mitavanid tekrar konid: -d vk.com -d ya.ru)", cli_output: "Masir-e file baraye zakhire-ye report", - cli_burst: "Fingerprint/Sibir blocking (test 6): darkhast be har host, yeki pas az digari [pishfarz: 4]", + cli_burst: "Fingerprint/Sibir blocking (test 6): darkhast be har host, yeki pas az digari [pishfarz: 5]", cli_burst_timeout: "Test 6: timeout-e mosafehe, sanie [pishfarz: 8]; darkhast-e baad az aan montazer-e read_timeout mimanad", cli_burst_profiles: "Fingerprint haye test 6: all|rustls,firefox(firefox133),chrome(chrome107),safari(safari155) [pishfarz: all]", cli_burst_tls: "TLS baraye test 6: 1.3+1.2 (pishnahad-e browser, pasokh bayad 1.3 bashad)|1.3 (faghat 1.3)|1.2 (faghat 1.2) [pishfarz: 1.3+1.2]", diff --git a/crates/dpi-detector/src/i18n/ru.rs b/crates/dpi-detector/src/i18n/ru.rs index 4261ce5..78ccc45 100644 --- a/crates/dpi-detector/src/i18n/ru.rs +++ b/crates/dpi-detector/src/i18n/ru.rs @@ -214,7 +214,7 @@ pub(crate) fn messages() -> Messages { cli_concurrency: "Лимит параллельных запросов", cli_domain: "Конкретные домены для проверки (флаг можно повторять: -d vk.com -d ya.ru)", cli_output: "Путь к файлу отчёта", - cli_burst: "Fingerprint/Сибирская блокировка (тест 6): соединений на домен, одно за другим [по умолчанию: 4]", + cli_burst: "Fingerprint/Сибирская блокировка (тест 6): соединений на домен, одно за другим [по умолчанию: 5]", cli_burst_timeout: "Тест 6: таймаут рукопожатия, секунды [по умолчанию: 8]; запрос после него ждёт read_timeout", cli_burst_profiles: "Fingerprint для теста 6: all|rustls,firefox(firefox133),chrome(chrome107),safari(safari155) [по умолчанию: all]", cli_burst_tls: "TLS для теста 6: 1.3+1.2 (предложение браузера, ответ должен быть 1.3)|1.3 (только 1.3)|1.2 (только 1.2) [по умолчанию: 1.3+1.2]", diff --git a/crates/dpi-detector/src/i18n/zh.rs b/crates/dpi-detector/src/i18n/zh.rs index aca8645..ace62c6 100644 --- a/crates/dpi-detector/src/i18n/zh.rs +++ b/crates/dpi-detector/src/i18n/zh.rs @@ -214,7 +214,7 @@ pub(crate) fn messages() -> Messages { cli_concurrency: "并行请求的并发上限", cli_domain: "要测试的指定域名(可重复指定: -d vk.com -d ya.ru)", cli_output: "保存报告的输出文件路径", - cli_burst: "Fingerprint/西伯利亚封锁 (测试 6): 每主机依次连接数 [默认: 4]", + cli_burst: "Fingerprint/西伯利亚封锁 (测试 6): 每主机依次连接数 [默认: 5]", cli_burst_timeout: "测试 6: 握手超时, 秒 [默认: 8]; 之后的请求等待 read_timeout", cli_burst_profiles: "测试 6 的 Fingerprint: all|rustls,firefox(firefox133),chrome(chrome107),safari(safari155) [默认: all]", cli_burst_tls: "测试 6 的 TLS: 1.3+1.2(浏览器提议,应答必须为 1.3)|1.3(仅提供 1.3)|1.2(仅提供 1.2)[默认: 1.3+1.2]",