fix: resolve zapret2 fuzzer daemon startup, premature self-update completion, and component visibility cache

This commit is contained in:
Dushnilin
2026-09-16 19:54:36 +03:00
parent 304a95de0a
commit 5eeaa91864
15 changed files with 5232 additions and 5141 deletions
+13
View File
@@ -0,0 +1,13 @@
#!/bin/sh
set -e
echo "==> [pre-commit] Actualizing locales and building frontend..."
cd fe-app-tachyon
npm run locales:actualize
npm run build
npm run format
cd ..
git add fe-app-tachyon/locales/ luci-app-tachyon/po/ luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/main.js
echo "==> [pre-commit] Frontend and locales actualized & staged."
+25
View File
@@ -0,0 +1,25 @@
#!/bin/sh
set -e
echo "==> [pre-push] Running pre-push checks..."
cd fe-app-tachyon
npm run locales:actualize
npm run ci
cd ..
# If only PO/POT creation dates changed, discard them to keep working tree clean
if git diff -I "POT-Creation-Date" -I "PO-Revision-Date" --quiet; then
git checkout -- fe-app-tachyon/locales/*.pot fe-app-tachyon/locales/*.po luci-app-tachyon/po/ 2>/dev/null || true
fi
# Verify that there are no meaningful uncommitted changes after building locales and frontend
if ! git diff --quiet || ! git diff --cached --quiet; then
echo "ERROR: Uncommitted changes detected after building locales and frontend."
echo "Please commit these changes before pushing to avoid breaking GitHub Actions:"
git status --short
exit 1
fi
echo "==> [pre-push] All checks passed! Proceeding with push."
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+15 -15
View File
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: TACHYON\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-09-16 16:15+0300\n"
"PO-Revision-Date: 2026-09-16 16:15+0300\n"
"POT-Creation-Date: 2026-09-16 19:54+0300\n"
"PO-Revision-Date: 2026-09-16 19:54+0300\n"
"Last-Translator: Dushnilin\n"
"Language-Team: none\n"
"Language: ru\n"
@@ -312,7 +312,7 @@ msgid "Adult content"
msgstr "Взрослый контент"
msgid "Advanced DPI bypass engine with Lua scripts (nfqws2)"
msgstr ""
msgstr "Продвинутый движок обхода DPI с Lua-скриптами (nfqws2)"
msgid "Advanced System"
msgstr "Расширенные настройки"
@@ -1083,7 +1083,7 @@ msgid "Component action timed out"
msgstr "Превышено время ожидания действия компонента"
msgid "Component Cards Visibility"
msgstr ""
msgstr "Видимость карточек компонентов"
msgid "Component update available"
msgstr "Доступно обновление компонента"
@@ -1191,7 +1191,7 @@ msgid "Core configuration and preferences"
msgstr "Основные настройки и параметры"
msgid "Core orchestration service and LuCI application"
msgstr ""
msgstr "Основной сервис маршрутизации и веб-интерфейс LuCI"
msgid "Could not compare FakeIP and control public IPs"
msgstr "Не удалось сравнить публичные IP FakeIP и контрольной проверки"
@@ -1263,7 +1263,7 @@ msgid "Customize the order and visibility of tabs in the main navigation menu. U
msgstr "Настройте порядок и видимость вкладок в главном меню навигации. Используйте стрелки для перемещения и галочки для показа или скрытия."
msgid "Customize which component cards are displayed in the Components tab. Checkboxes show or hide components."
msgstr ""
msgstr "Настройте отображение карточек на вкладке «Компоненты». Галочки показывают или скрывают компоненты."
msgid "Daily Quota"
msgstr "Дневная квота"
@@ -1299,7 +1299,7 @@ msgid "Dedicated cgroup unavailable"
msgstr "Выделенная cgroup недоступна"
msgid "Dedicated direct HTTP/SOCKS5 outbound proxy"
msgstr ""
msgstr "Выделенный прямой исходящий HTTP/SOCKS5 прокси"
msgid "Default"
msgstr "По умолчанию"
@@ -1386,7 +1386,7 @@ msgid "Direct Bypass"
msgstr "Прямой WAN"
msgid "Direct cgroup bypass for TorrServer"
msgstr ""
msgstr "Прямой обход через cgroup для TorrServer"
msgid "Direct connection"
msgstr "Прямое подключение"
@@ -1641,7 +1641,7 @@ msgid "DPI bandwidth throttling or delay detected — connection throttled durin
msgstr "Обнаружено замедление DPI — соединение заблокировано или задушено при передаче данных."
msgid "DPI bypass engine (nfqws v1)"
msgstr ""
msgstr "Движок обхода блокировок DPI (nfqws v1)"
msgid "DPI Detected"
msgstr "DPI обнаружен"
@@ -2148,7 +2148,7 @@ msgid "Family profiles and device grouping"
msgstr "Семейные профили и группировка устройств"
msgid "Fast packet transport network client"
msgstr ""
msgstr "Быстрый сетевой клиент передачи пакетов (FPTN)"
msgid "Faster DNS health monitoring than the default cycle. Switches bootstrap DNS on failure."
msgstr "Более быстрый мониторинг состояния DNS, чем стандартный цикл. Переключает bootstrap DNS при сбое."
@@ -3096,7 +3096,7 @@ msgid "Local Address"
msgstr "Локальный адрес"
msgid "Local SOCKS proxy desynchronizer (ciadpi)"
msgstr ""
msgstr "Локальный десинхронизатор SOCKS-прокси (ciadpi)"
msgid "Location"
msgstr "Местоположение"
@@ -3987,7 +3987,7 @@ msgid "Ready to benchmark DNS providers"
msgstr "Готов к тестированию DNS провайдеров"
msgid "Real-time WebRTC anti-censorship tunnel"
msgstr ""
msgstr "Антицензурный туннель реального времени на базе WebRTC"
msgid "Reality fake site"
msgstr "Фейковый сайт Reality"
@@ -5520,7 +5520,7 @@ msgid "United States (us)"
msgstr "США (us)"
msgid "Universal proxy platform routing engine"
msgstr ""
msgstr "Универсальный движок маршрутизации и проксирования"
msgid "unknown"
msgstr "неизвестно"
@@ -5868,7 +5868,7 @@ msgid "Weekends (Sat-Sun)"
msgstr "Выходные (Сб-Вс)"
msgid "Western Digital Tunnel Transport"
msgstr ""
msgstr "Транспортный туннель Western Digital"
msgid "What Tachyon should do when this section matches"
msgstr "Что должен делать Tachyon при совпадении этой секции"
@@ -5979,7 +5979,7 @@ msgid "Zapret2 sing-box route rules are not configured"
msgstr "Правила маршрутизации sing-box для Zapret2 не настроены"
msgid "Zero config mesh VPN daemon"
msgstr ""
msgstr "Mesh VPN-демон с нулевой конфигурацией"
msgid "Testing strategy"
msgstr "Тестирование стратегии"
@@ -976,6 +976,23 @@ export const TachyonShellMethods = {
const parsedResponse = parseComponentActionResult(statusResponse);
if ((statusResponse.code ?? 0) !== 0 || !parsedResponse) {
const failure = componentActionFailure(statusResponse, parsedResponse);
const isBackendStuck =
Date.now() - jobStartedAt >= COMPONENT_ACTION_TRANSIENT_RPC_GRACE_MS;
if (stateResponse?.running && !isBackendStuck) {
transientRpc.reset();
continue;
}
if (
!isBackendStuck &&
(await isComponentActionStillRunning(jobId, component, action))
) {
transientRpc.reset();
continue;
}
if (isSelfUpdate) {
const version =
(await confirmedByVersion()) ||
@@ -993,18 +1010,6 @@ export const TachyonShellMethods = {
continue;
}
if (stateResponse?.running) {
transientRpc.reset();
continue;
}
if (await isComponentActionStillRunning(jobId, component, action)) {
transientRpc.reset();
continue;
}
const failure = componentActionFailure(statusResponse, parsedResponse);
if (transientRpc.shouldContinue(failure.error)) {
continue;
}
@@ -384,6 +384,23 @@ export function showUpdateProgressModal(
try {
const res = await TachyonShellMethods.getSystemInfo();
if (res && res.success) {
const targetVer = currentModalVersions.targetVersion
?.replace(/^v/i, '')
.trim();
const currentVer = res.data?.tachyon_version
?.replace(/^v/i, '')
.trim();
if (
options.component === 'tachyon' &&
targetVer &&
currentVer &&
currentVer !== targetVer &&
attempt < maxAttempts - 2
) {
await new Promise((resolve) => setTimeout(resolve, 1500));
continue;
}
statusEl.textContent = _(
'Services are online and ready! Reloading page...',
);
@@ -3877,6 +3877,16 @@ var TachyonShellMethods = {
});
const parsedResponse = parseComponentActionResult(statusResponse);
if ((statusResponse.code ?? 0) !== 0 || !parsedResponse) {
const failure = componentActionFailure(statusResponse, parsedResponse);
const isBackendStuck = Date.now() - jobStartedAt >= COMPONENT_ACTION_TRANSIENT_RPC_GRACE_MS;
if (stateResponse?.running && !isBackendStuck) {
transientRpc.reset();
continue;
}
if (!isBackendStuck && await isComponentActionStillRunning(jobId, component, action)) {
transientRpc.reset();
continue;
}
if (isSelfUpdate) {
const version = await confirmedByVersion() || await confirmedSameVersionReinstall();
if (version) {
@@ -3888,15 +3898,6 @@ var TachyonShellMethods = {
transientRpc.reset();
continue;
}
if (stateResponse?.running) {
transientRpc.reset();
continue;
}
if (await isComponentActionStillRunning(jobId, component, action)) {
transientRpc.reset();
continue;
}
const failure = componentActionFailure(statusResponse, parsedResponse);
if (transientRpc.shouldContinue(failure.error)) {
continue;
}
@@ -21010,6 +21011,12 @@ function showUpdateProgressModal(options) {
try {
const res = await TachyonShellMethods.getSystemInfo();
if (res && res.success) {
const targetVer = currentModalVersions.targetVersion?.replace(/^v/i, "").trim();
const currentVer = res.data?.tachyon_version?.replace(/^v/i, "").trim();
if (options.component === "tachyon" && targetVer && currentVer && currentVer !== targetVer && attempt < maxAttempts - 2) {
await new Promise((resolve) => setTimeout(resolve, 1500));
continue;
}
statusEl.textContent = _(
"Services are online and ready! Reloading page..."
);
@@ -1401,6 +1401,7 @@ function createComponentsVisibilityWidget(option, section_id) {
}
});
}
wrapper._syncToUci = syncToUci;
function renderList() {
listEl.innerHTML = "";
@@ -1456,7 +1457,7 @@ function createComponentsVisibilityWidget(option, section_id) {
"div",
{
style:
"font-weight:600;font-size:0.875rem;color:var(--text-color,#212529);",
"font-weight:600;font-size:0.875rem;color:inherit;",
},
c.label,
),
@@ -1464,7 +1465,7 @@ function createComponentsVisibilityWidget(option, section_id) {
"div",
{
style:
"font-size:0.75rem;color:var(--text-color-medium,#6c757d);",
"font-size:0.75rem;opacity:0.75;",
},
c.desc,
),
@@ -1556,7 +1557,14 @@ function createSettingsContent(section, capabilities) {
);
return el ? JSON.stringify(el._vis) : "";
};
compVisOpt.write = function (_section_id) {};
compVisOpt.write = function (section_id) {
const el = document.getElementById(
"components-visibility-widget-" + section_id,
);
if (el && typeof el._syncToUci === "function") {
el._syncToUci();
}
};
compVisOpt.remove = function () {};
// ── DNS Settings ────────────────────────────────────────────────────────
+15 -15
View File
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: TACHYON\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-09-16 16:15+0300\n"
"PO-Revision-Date: 2026-09-16 16:15+0300\n"
"POT-Creation-Date: 2026-09-16 19:54+0300\n"
"PO-Revision-Date: 2026-09-16 19:54+0300\n"
"Last-Translator: Dushnilin\n"
"Language-Team: none\n"
"Language: ru\n"
@@ -312,7 +312,7 @@ msgid "Adult content"
msgstr "Взрослый контент"
msgid "Advanced DPI bypass engine with Lua scripts (nfqws2)"
msgstr ""
msgstr "Продвинутый движок обхода DPI с Lua-скриптами (nfqws2)"
msgid "Advanced System"
msgstr "Расширенные настройки"
@@ -1083,7 +1083,7 @@ msgid "Component action timed out"
msgstr "Превышено время ожидания действия компонента"
msgid "Component Cards Visibility"
msgstr ""
msgstr "Видимость карточек компонентов"
msgid "Component update available"
msgstr "Доступно обновление компонента"
@@ -1191,7 +1191,7 @@ msgid "Core configuration and preferences"
msgstr "Основные настройки и параметры"
msgid "Core orchestration service and LuCI application"
msgstr ""
msgstr "Основной сервис маршрутизации и веб-интерфейс LuCI"
msgid "Could not compare FakeIP and control public IPs"
msgstr "Не удалось сравнить публичные IP FakeIP и контрольной проверки"
@@ -1263,7 +1263,7 @@ msgid "Customize the order and visibility of tabs in the main navigation menu. U
msgstr "Настройте порядок и видимость вкладок в главном меню навигации. Используйте стрелки для перемещения и галочки для показа или скрытия."
msgid "Customize which component cards are displayed in the Components tab. Checkboxes show or hide components."
msgstr ""
msgstr "Настройте отображение карточек на вкладке «Компоненты». Галочки показывают или скрывают компоненты."
msgid "Daily Quota"
msgstr "Дневная квота"
@@ -1299,7 +1299,7 @@ msgid "Dedicated cgroup unavailable"
msgstr "Выделенная cgroup недоступна"
msgid "Dedicated direct HTTP/SOCKS5 outbound proxy"
msgstr ""
msgstr "Выделенный прямой исходящий HTTP/SOCKS5 прокси"
msgid "Default"
msgstr "По умолчанию"
@@ -1386,7 +1386,7 @@ msgid "Direct Bypass"
msgstr "Прямой WAN"
msgid "Direct cgroup bypass for TorrServer"
msgstr ""
msgstr "Прямой обход через cgroup для TorrServer"
msgid "Direct connection"
msgstr "Прямое подключение"
@@ -1641,7 +1641,7 @@ msgid "DPI bandwidth throttling or delay detected — connection throttled durin
msgstr "Обнаружено замедление DPI — соединение заблокировано или задушено при передаче данных."
msgid "DPI bypass engine (nfqws v1)"
msgstr ""
msgstr "Движок обхода блокировок DPI (nfqws v1)"
msgid "DPI Detected"
msgstr "DPI обнаружен"
@@ -2148,7 +2148,7 @@ msgid "Family profiles and device grouping"
msgstr "Семейные профили и группировка устройств"
msgid "Fast packet transport network client"
msgstr ""
msgstr "Быстрый сетевой клиент передачи пакетов (FPTN)"
msgid "Faster DNS health monitoring than the default cycle. Switches bootstrap DNS on failure."
msgstr "Более быстрый мониторинг состояния DNS, чем стандартный цикл. Переключает bootstrap DNS при сбое."
@@ -3096,7 +3096,7 @@ msgid "Local Address"
msgstr "Локальный адрес"
msgid "Local SOCKS proxy desynchronizer (ciadpi)"
msgstr ""
msgstr "Локальный десинхронизатор SOCKS-прокси (ciadpi)"
msgid "Location"
msgstr "Местоположение"
@@ -3987,7 +3987,7 @@ msgid "Ready to benchmark DNS providers"
msgstr "Готов к тестированию DNS провайдеров"
msgid "Real-time WebRTC anti-censorship tunnel"
msgstr ""
msgstr "Антицензурный туннель реального времени на базе WebRTC"
msgid "Reality fake site"
msgstr "Фейковый сайт Reality"
@@ -5520,7 +5520,7 @@ msgid "United States (us)"
msgstr "США (us)"
msgid "Universal proxy platform routing engine"
msgstr ""
msgstr "Универсальный движок маршрутизации и проксирования"
msgid "unknown"
msgstr "неизвестно"
@@ -5868,7 +5868,7 @@ msgid "Weekends (Sat-Sun)"
msgstr "Выходные (Сб-Вс)"
msgid "Western Digital Tunnel Transport"
msgstr ""
msgstr "Транспортный туннель Western Digital"
msgid "What Tachyon should do when this section matches"
msgstr "Что должен делать Tachyon при совпадении этой секции"
@@ -5979,7 +5979,7 @@ msgid "Zapret2 sing-box route rules are not configured"
msgstr "Правила маршрутизации sing-box для Zapret2 не настроены"
msgid "Zero config mesh VPN daemon"
msgstr ""
msgstr "Mesh VPN-демон с нулевой конфигурацией"
msgid "Testing strategy"
msgstr "Тестирование стратегии"
File diff suppressed because it is too large Load Diff
+12 -4
View File
@@ -390,10 +390,18 @@ function split_leading_assignments(command) {
while (true) {
let matched = match(rest, /^([A-Za-z_][A-Za-z0-9_]*=[^ \t]*)[ \t]+/);
if (!matched)
break;
assignments += matched[1] + " ";
rest = substr(rest, length(matched[0]));
if (matched) {
assignments += matched[1] + " ";
rest = substr(rest, length(matched[0]));
continue;
}
let cd_match = match(rest, /^(cd[ \t]+[^&;]+[ \t]*&&[ \t]*)/);
if (cd_match) {
assignments += cd_match[1];
rest = substr(rest, length(cd_match[0]));
continue;
}
break;
}
return { assignments, command: rest };
+4 -1
View File
@@ -3437,8 +3437,11 @@ if (op == "start") {
zapret: get_strategies_for_engine("zapret", strat_mode),
byedpi: get_strategies_for_engine("byedpi", strat_mode)
}));
} else if (op == "probe") {
let r = run_probe(ARGV[1], ARGV[2], ARGV[3], ARGV[4], ARGV[5]);
print(sprintf("%J\n", r));
} else {
warn("Usage: fuzzer.uc [start|status|stop|apply|strategies|generate|get_patterns|save_patterns|reset_patterns|ai_synthesize|detect_dpi|auto_apply|history|clear_history|worker] ...\n");
warn("Usage: fuzzer.uc [start|status|stop|apply|strategies|generate|get_patterns|save_patterns|reset_patterns|ai_synthesize|detect_dpi|auto_apply|history|clear_history|worker|probe] ...\n");
exit(1);
}
@@ -1018,6 +1018,9 @@ function system_info_cache_is_valid() {
let generated_at = arg_number(cache.generated_at || 0);
if (now > 0 && generated_at > 0 && SYSTEM_INFO_CACHE_TTL > 0 && now - generated_at >= SYSTEM_INFO_CACHE_TTL)
return false;
let cfg_st = fs.stat(TACHYON_CONFIG);
if (cfg_st && cfg_st.mtime > generated_at)
return false;
return cache.tachyon_version == TACHYON_VERSION && cache.luci_app_version == get_luci_app_version();
}
+2
View File
@@ -295,6 +295,8 @@ function remove_component_update_cache() {
for (let path in fs.glob(COMPONENT_UPDATE_CHECK_DIR + "/*.json"))
unlink_if_exists(path);
unlink_if_exists(COMPONENT_UPDATE_CHECK_TIMESTAMP);
unlink_if_exists(RUNTIME_STATE_DIR + "/system-info.json");
unlink_if_exists("/tmp/tachyon/system-info.json");
command_success_from_args([ "rm", "-rf", COMPONENT_ACTION_LOCK ]);
for (let path in fs.glob(COMPONENT_ACTION_DIR + "/*"))
if (!component_job_is_running(path))