From 37c44a8bdcb1c4c549d12c3d7f5c9dd34a597a67 Mon Sep 17 00:00:00 2001 From: Dushnilin Date: Thu, 10 Sep 2026 21:26:48 +0300 Subject: [PATCH] fix(singbox): correct http_clients detour field and clarify RKN domain list label MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - fix(singbox): fix http_clients[0].detour field name (was incorrectly dial_detour, causing fatal decode config unknown field error on sing-box 1.14+) - fix(ui): rename community list 'Block' to 'Block (RKN)' / 'Реестр РКН' in DOMAIN_LIST_OPTIONS and PO catalogs to prevent confusion with parental control action 'Блокировать' - fix(ui): fix domain hint for adult content to pornhub.com in section.js - test(ruleset): update http_clients detour check in ruleset_download_detour.sh --- fe-app-tachyon/locales/tachyon.ru.po | 3 +++ fe-app-tachyon/src/constants.ts | 2 +- .../htdocs/luci-static/resources/view/tachyon/main.js | 2 +- .../htdocs/luci-static/resources/view/tachyon/section.js | 2 +- luci-app-tachyon/po/ru/tachyon.po | 3 +++ tachyon/files/usr/lib/singbox/generator.uc | 2 +- tests/ruleset_download_detour.sh | 6 +++--- 7 files changed, 13 insertions(+), 7 deletions(-) diff --git a/fe-app-tachyon/locales/tachyon.ru.po b/fe-app-tachyon/locales/tachyon.ru.po index a764c58f..ebe93976 100644 --- a/fe-app-tachyon/locales/tachyon.ru.po +++ b/fe-app-tachyon/locales/tachyon.ru.po @@ -713,6 +713,9 @@ msgstr "BitTorrent / P2P" msgid "Block" msgstr "Блокировать" +msgid "Block (RKN)" +msgstr "Реестр РКН" + msgid "Block / Disable in scheduled hours (Standard)" msgstr "Блокировать / Отключать в указанные часы (Стандарт)" diff --git a/fe-app-tachyon/src/constants.ts b/fe-app-tachyon/src/constants.ts index d0fee7cc..ff8c88f8 100644 --- a/fe-app-tachyon/src/constants.ts +++ b/fe-app-tachyon/src/constants.ts @@ -17,7 +17,7 @@ export const DOMAIN_LIST_OPTIONS = { russia_outside: 'Russia outside', ukraine_inside: 'Ukraine', geoblock: 'Geo Block', - block: 'Block', + block: 'Block (RKN)', porn: 'Porn', news: 'News', anime: 'Anime', diff --git a/luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/main.js b/luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/main.js index 7d6de0e4..936149d5 100644 --- a/luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/main.js +++ b/luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/main.js @@ -1232,7 +1232,7 @@ var DOMAIN_LIST_OPTIONS = { russia_outside: "Russia outside", ukraine_inside: "Ukraine", geoblock: "Geo Block", - block: "Block", + block: "Block (RKN)", porn: "Porn", news: "News", anime: "Anime", diff --git a/luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/section.js b/luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/section.js index 3d6c984c..bc1c971c 100644 --- a/luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/section.js +++ b/luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/section.js @@ -7410,7 +7410,7 @@ var DOMAIN_LIST_HINTS = { geoblock: "Домены, заблокированные снаружи России (геоблокировка зарубежными сервисами)", block: "Домены, заблокированные внутри России (полный реестр блокировок РКН)", - porn: "Pornhub, xvideos, xhamster, ...", + porn: "pornhub.com, xvideos.com, xhamster.com, ...", news: "meduza.io, bbc.com, pravda.com.ua, ...", anime: "bato.to, mangadex.org, myanimelist.net, ...", youtube: "youtube.com, youtu.be, googlevideo.com, ...", diff --git a/luci-app-tachyon/po/ru/tachyon.po b/luci-app-tachyon/po/ru/tachyon.po index a764c58f..ebe93976 100644 --- a/luci-app-tachyon/po/ru/tachyon.po +++ b/luci-app-tachyon/po/ru/tachyon.po @@ -713,6 +713,9 @@ msgstr "BitTorrent / P2P" msgid "Block" msgstr "Блокировать" +msgid "Block (RKN)" +msgstr "Реестр РКН" + msgid "Block / Disable in scheduled hours (Standard)" msgstr "Блокировать / Отключать в указанные часы (Стандарт)" diff --git a/tachyon/files/usr/lib/singbox/generator.uc b/tachyon/files/usr/lib/singbox/generator.uc index e2fc4919..ab89d4e7 100644 --- a/tachyon/files/usr/lib/singbox/generator.uc +++ b/tachyon/files/usr/lib/singbox/generator.uc @@ -1299,7 +1299,7 @@ function generate_config(output_path, service_address, mwan3_active, supports_xh if (type(config.http_clients) == "array" && length(config.http_clients) > 0) { let detour = download_detour_tag(settings, "lists"); if (detour != "" && generator_routes.is_valid_detour(config, detour)) - config.http_clients[0].dial_detour = detour; + config.http_clients[0].detour = detour; } assert_unique_outbound_tags(config); diff --git a/tests/ruleset_download_detour.sh b/tests/ruleset_download_detour.sh index f59ad793..5e632797 100644 --- a/tests/ruleset_download_detour.sh +++ b/tests/ruleset_download_detour.sh @@ -147,7 +147,7 @@ if grep -q '"download_detour": "zapret_sec-out"' "$output_zapret"; then fail "zapret-out must never be selected as download_detour due to routing_mark" fi -# 5. Verify mieru outbound is rejected as download_detour and http_clients dial_detour +# 5. Verify mieru outbound is rejected as download_detour and http_clients detour cat >"$WORK_DIR/fixture_mieru.json" <<'JSON' { "settings": { @@ -186,8 +186,8 @@ SB_VERSION_STATE_FILE="$WORK_DIR/sb_v14" \ ucode -L "$TACHYON_LIB" "$GENERATOR_UC" generate-config-fixture \ "$WORK_DIR/fixture_mieru.json" "$output_mieru_v14" "127.0.0.1" "0" "1" -if grep -q '"dial_detour": "mieru_sec-out"' "$output_mieru_v14"; then - fail "mieru outbound must never be assigned as http_clients dial_detour" +if grep -q '"detour": "mieru_sec-out"' "$output_mieru_v14"; then + fail "mieru outbound must never be assigned as http_clients detour" fi printf "ruleset download detour checks passed\n"