Commit Graph
271 Commits
Author SHA1 Message Date
Dushnilin fadfbc2511 fix(parental): resolve daily quota from profile in nft/singbox rules and harden cron tick invocation 2026-09-12 18:52:46 +03:00
Dushnilin 12b07fd2fb fix(section): preserve user-defined subscription order in UCI and backend 2026-09-12 17:38:07 +03:00
Dushnilin 2019ddd12a release: 1.3.26 — Watchdog proxy restart protection, WAN monitor debounce, and subscription bootstrap resilience
- Fix #52: Watchdog proxy restart on single URL failure:
  * Validate failure against secondary independent probe URL before declaring proxy down
  * Skip restart when direct WAN is also degraded or down (!direct_ok)
  * Implement 120s cooldown between automated proxy restarts
  * Fix Telegram notification to accurately state 'Перезапуск sing-box' instead of 'Перезапуск роутера'
- Fix #51: Telegram bot spamming WAN up/down notifications:
  * Filter hotplug events strictly by badwan_monitored_interfaces (defaults to wan)
  * Add atomic directory lock with debounce delay and real ubus state query
  * Prevent repeated notifications when interface state has not transitioned
- Feat: 2-VPN deadlock elimination & self-download subscription proxy:
  * Isolate unbootstrapped dependent subscription sections on initial boot (deferred_sections)
  * Allow self-download proxy target for subscriptions with explicit UI hint '(текущее правило при активности)'
  * Enable automatic local proxy fallback for subscription refresh when direct WAN download fails while sing-box is active
  * Add regression test in tests/subscription_bootstrap_deadlock.sh
- Fix: Parental control quota enforcement:
  * Correct route rule filtering when daily quota minutes are exhausted without a fixed time interval
- i18n & Version bump:
  * Bump fe-app-tachyon to 1.3.26 and update Russian PO/POT translations
2026-09-12 16:50:04 +03:00
Dushnilin f987e88d23 fix(wan_monitor,dns): eliminate invalid regex group in resolve_domain and harden wan monitor locking
- Replace invalid POSIX non-capturing group in diagnostics/runtime.uc with standard POSIX ERE pattern.
- Harden 99-tachyon-wan-monitor with stale PID directory lock cleanup and dynamic badwan_reload_delay support.
- Make is_cloudflare_shared_cidr in core/ip.uc case-insensitive.
- Add default wan to badwan_monitored_interfaces in settings.js.
2026-09-11 23:16:22 +03:00
Dushnilin 0ea1c73832 fix: sanitize Discord community subnets and resolve WAN monitor hotplug spam (fixes #50, #51)
- Fix #50: Discord community subnets hijacking Cloudflare Anycast traffic:
  * Filter broad Cloudflare shared subnets (104.16.0.0/12, 172.64.0.0/13, etc.) for Discord preset in generator_routes.uc, nft/apply.uc, and updates.uc.
  * Add tachyon resolve_domain CLI and runtime.uc helper for DNS queries with rpcd ACL support.
  * Update LuCI Routing Rule Tracer to resolve queried domains against section subnets/CIDRs (including community subnets) and show shared CDN/Anycast warnings.
  * Add unit tests in tests/community_subnets_sanitization.sh.

- Fix #51: Telegram bot spamming WAN up/down notifications on hotplug:
  * Check enable_badwan_interface_monitoring, telegram.enabled, and badwan_monitored_interfaces list in 99-tachyon-wan-monitor.
  * Add background debounce with atomic directory locking and ubus interface status verification.
  * Implement state transition tracking to only notify on actual UP->DOWN and DOWN->UP changes without duplicates.
  * Preserve retry_start_on_wan_up behavior on ifup.
  * Add comprehensive integration test suite in tests/wan_monitor_hotplug.sh.
2026-09-11 23:07:10 +03:00
Dushnilin 5933fd2f0c fix: parental control global network block, luci save&apply reload, and fuzzer localization 2026-09-11 22:35:59 +03:00
Dushnilin 94708d8251 fix: resolve MAC routing crash in sing-box, fallback dashboard on secondary nodes, and unify dashboard naming 2026-09-11 20:34:18 +03:00
Dushnilin 26431f50d3 feat: per-section MAC/DNS exclusions, boot latency sweep, WDTT/OlcRTC providers, DNS hijack socket collision fix
Features:
- Per-Section MAC Exclusions: nft, generator_routes, section.js, i18n
- Per-Section Routed DNS: connections, generator_routes, nft, validator,
  types.ts, section.js, state.uc, reload.uc
- Boot Latency Sweep: ui.uc latency boot sweep with fixture dispatchers
- WDTT provider: full backend (common, validator, runtime), sing-box
  outbound, diagnostics, component install, updater, i18n, section.js UI
- OlcRTC provider: full backend (common, validator, runtime), sing-box
  outbound, diagnostics, component install, updater, i18n, section.js UI
- WireGuard-over-TURN tunnel (WDTT) and TCP-over-WebRTC tunnel (OlcRTC)
  as sidecar processes with local SOCKS5, routed through sing-box outbound

Bug fixes:
- route.uc: restrict hijack-dns to local DNS inbounds only (dns-in,
  source-dns-in, dns-health-*) — fixes socket collision between sing-box
  and dnsmasq on port 53 via SO_REUSEADDR transparent write-back sockets
- runtime.uc: add Port 53 socket collision diagnostic with auto-fix
  (sing-box restart to clear parasitic UNCONN sockets with Recv-Q)
- runtime.uc: add dnsmasq dns_redirect check with auto-fix — disables
  firewall4 DNAT that causes TProxy to rewrite destination to router :53
- failover.uc: add wdtt/olcrtc to failover candidate actions
- telegram.uc: show WDTT/OlcRTC installed status in /info

Tests: 135/155 shell + 591/591 frontend
2026-09-11 18:04:03 +03:00
Dushnilin 2cfb81f680 release: 1.3.25 - fix sing-box 1.14+ http_clients detour schema and prevent startup crash 2026-09-10 21:47:02 +03:00
Dushnilin 37c44a8bdc fix(singbox): correct http_clients detour field and clarify RKN domain list label
- 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
2026-09-10 21:26:48 +03:00
Dushnilin bc4f12913f fix(providers): resolve zapret2 startup crash, nft desync EPERM, and mieru ruleset crash loop
- fix(zapret2): add safe_str fallback and avoid default --filter-tcp=443 injection on UDP rules in prepare_strategy_args()
- fix(providers): make individual rule failures non-fatal in start_runtime() so one bad rule does not rollback all running rules
- fix(binaries): dynamic candidate resolution for nfqws and nfqws2 across standard OpenWrt and custom paths (/opt/zapret2/nfq2, /opt/zapret2/nfq, /opt/zapret2, /usr/bin)
- fix(nft): add raw_output notrack chain and mangle_output/forward counter return rules for desync marks (0x40000000, 0x20000000) and musl/nobody skuid (2147483647, 65534) to prevent EPERM rawsend failure on reload
- fix(reload): ensure nft_rebuild is triggered on zapret and zapret2 runtime updates
- fix(singbox): reject mieru outbounds from rule_set download_detour and http_clients dial_detour to prevent fatal startup crash loop
- fix(singbox): detect sing-box 1.14+ and omit deprecated download_detour on remote rule-sets when http_clients is active
- fix(action): pre-seed /etc/config/zapret2 with enabled=0 via core.uci before package install to prevent conflicting upstream daemon startup
- test(ruleset): add verification tests for mieru download_detour and dial_detour rejection
2026-09-10 20:18:00 +03:00
Dushnilin 240a939bbe fix(routing): resolve real IP for zapret routes, add IPv6 sniffing, and fix monitoring route display 2026-09-10 11:02:51 +03:00
Dushnilin 01468b3a42 fix(diagnostics): resolve leak test XHR timeout with parallel probes and async polling 2026-09-10 10:11:25 +03:00
Dushnilin 10cde183e1 test(validator): update detour tests for AmneziaWG support 2026-09-10 09:46:21 +03:00
Dushnilin 0f6561ad57 fix(migration,dns,ui): restore domain suffix matching, fix comma split, bypass AdGuardHome on 53, and support AWG detours 2026-09-10 09:43:00 +03:00
Dushnilin 5e24cd9ae6 fix(nft,telegram): fix terminal redirect counter syntax error in dns_block rules and table name 2026-09-09 22:56:55 +03:00
Dushnilin b51809c81d feat: add DoH blocking, subscription keyword filtering, bulk proxy text inputs, and insecure TLS flag 2026-09-09 22:36:12 +03:00
Dushnilin 3ee5cf2598 fix(singbox): cascade section-level server exclusions to URLTest and Priority groups (#89) 2026-09-09 21:56:00 +03:00
Dushnilin 7fe6a84f80 fix(validator,migration,fuzzer): resilient domain validation, strip prefixed comments and fix zapret1 fuzzer fwmark 2026-09-09 21:44:43 +03:00
Dushnilin ef45d93311 fix(core,nft,singbox,luci): resolve parental domain blocking priority, client bypass and CI apt hash mismatch 2026-09-09 21:01:43 +03:00
Dushnilin f2865b4bb2 fix: resolve parental & profile blocklists saving and enforcement, add dashboard support for missing protocols 2026-09-09 20:10:30 +03:00
Dushnilin 3d2a950bad fix(migration): seamless zero-defect migration from NetShift, Forkop, and Podkop 2026-09-09 17:53:33 +03:00
Dushnilin e523474631 release: 1.3.24 — тест утечки IP/DNS из роутера, оптимизация запуска списков хостов и локализация
- feat(diagnostics): router-level IP & DNS leak detection
  * одновременный опрос прямого WAN сокета (SO_MARK 0x08000000) и локального прокси (127.0.0.1:4534)
  * выявление утечки реального публичного IP адреса
  * тестирование восходящих DNS-резолверов по протоколу bash.ws и обнаружение DNS провайдера
  * CLI команды: tachyon leak_check [--pretty], check_ip_leak, check_dns_leak
  * LuCI модальное окно с детализированными таблицами изоляции IP и анализа резолверов
- fix(hosts): устранение ложного предупреждения [warn] No hosts list URLs configured
  * запуск HOSTS_UC в lifecycle.uc только при наличии активных списков хостов
  * hosts.uc возвращает success:true и код 0 без лишних записей в syslog при отсутствии URL
  * добавлена проверка has-hosts-list-update-sources в state.uc
- i18n: полная синхронизация русской локализации в каталогах gettext PO/POT
- bump: версия пакета 1.3.24
2026-09-09 17:28:51 +03:00
Dushnilin a54917501c fix(snapshot): background service restart after restore to prevent rpcd timeout 2026-09-09 15:11:18 +03:00
Dushnilin 70f09e8ea9 fix: support Forkop and Netshift configuration migration in install.sh (#47) 2026-09-09 14:26:07 +03:00
Dushnilin c0d24ddae9 fix(installer): delegate fresh-install defaults to reset_settings while guarding existing config 2026-09-09 13:45:31 +03:00
Dushnilin 695a2bfe36 fix: cascade delete child UCI sections and harden installer against config reset 2026-09-09 13:30:24 +03:00
Dushnilin 142fff6b4a fix: zapret2 strategy args, snapshot restore output leak, and opkg update lock handling
- providers/zapret2/common.uc: import core.common and declare as_string helper to resolve type error during zapret2 strategy argument preparation.
- service/snapshot.uc: redirect command output to /dev/null in command_success_from_args to prevent stdout leakage breaking LuCI JSON parsing on snapshot restore.
- settings.js: robustly parse JSON from snapshot command output using regex delimiter.
- components/action.uc: add --force-depends to opkg install arguments, detect opkg lock contention and retry with backoff, and log non-zero exit stdout as warning.
- providers/nfqueue/runtime.uc: ensure standalone services are cleanly stopped and disabled before starting Tachyon-managed runtime.
- section.js, generator_routes.uc, apply.uc: add community_subnets option to conditionally include community CIDRs in routing and nftables.
2026-09-09 11:55:12 +03:00
Dushnilin 8a56361bfd fix: prevent package removal during web update and fix zapret2 installation
- Fix package postrm scripts to strictly require \ to be 'remove' or 'purge' before running cleanup, preventing destructive cleanup when opkg runs postrm with empty arguments during reinstalls/upgrades.
- In action.uc install_files, ensure tachyon backend package is installed before luci-app-tachyon to prevent opkg dependency removal races.
- In action.uc install_zapret2, ensure ::1 localhost exists in /etc/hosts before package installation to prevent nftables IPv6 resolution errors, and cleanly stop/disable standalone zapret2 daemon.
- In zapret2 provider common.uc and nfqueue runtime.uc, automatically resolve required blob binary payloads and default filter parameters for strategies.
- In fe-app-tachyon, add 'access denied' / 'Доступ запрещён' to transient RPC error patterns and track install_version as self-update so rpcd reload during self-update does not abort the progress modal with an error.
- In tests/package_lifecycle.sh, avoid grep -q in pipefail pipelines to prevent upstream SIGPIPE failures.
2026-09-09 07:37:55 +03:00
Dushnilin 625fa1e9b3 fix(guest_mode,telegram): fix guest mode view, translations and bot language switcher 2026-09-08 09:58:43 +03:00
Dushnilin 4ed85f5b30 feat: add mixed proxy support for AmneziaWG sections and allow UDP on tunnel endpoints 2026-09-08 09:22:06 +03:00
Dushnilin d07e2c599f feat: add Guest Mode isolation with quotas and fix Telegram bot language switching 2026-09-08 09:10:00 +03:00
Dushnilin 203bb9b433 fix(singbox): prevent cold-start crash loop on missing community rulesets (#46)
- Bundle universal 17-byte empty SRS stub and add is_valid_srs_file/ensure_empty_srs_stub in rulesets.uc
- Add prepare_community_rulesets in lifecycle.uc to pre-fetch via gh-proxy mirrors or initialize safe local stub before sing-box start
- Support local community rulesets and stubs in generator_routes.uc
- Add fallback to component proxy for list downloads in updates.uc and preserve cached stubs
- Skip non-functional jsdelivr for release downloads and prioritize gh-proxy mirrors in core/url.uc
- Add tests/cold_boot_community_stub.sh testing cold boot fallback behavior
2026-09-07 23:50:01 +03:00
Dushnilin 5539b9701f fix(singbox): prevent UDP routing to HTTP outbounds (#45) and improve dashboard metadata
- Ensure selector and urltest groups require all member outbounds to support UDP
- Add explicit reject rule for UDP on non-UDP outbounds to avoid sing-box router log spam
- Add http/s:// to connection URL description in LuCI settings and update localization
- Display transport protocol badges on dashboard outbound cards and modal rows
- Deduplicate and collapse UDP routing error lines in telegram logs and bug report
2026-09-07 22:50:10 +03:00
Dushnilin 394c717bf9 fix(diagnostics): prevent sing-box listening ports check failure when IPv6 is disabled 2026-09-07 17:27:29 +03:00
Dushnilin 7256814b0a fix(nft): prevent startup verification failure when IPv6 is disabled and treat awg as download section 2026-09-07 12:35:36 +03:00
Dushnilin 06abdd984b fix(packaging): install tachyon-torrserver-direct init script 2026-09-07 11:09:51 +03:00
Dushnilin dd6b877adb feat: поддержка AmneziaWG 3.1, keepalive ranges, безопасный ruleset HTTP client и Source-Aware DNS 2026-09-07 10:14:12 +03:00
Dushnilin e8c1d9d382 feat: стабильность подписок, порог DNS failover, прямой порт прокси и TorrServer Direct
- subscription: детерминированная сортировка аутбаундов при расчете сигнатуры кэша (защита от перезапусков при shuffle)
- dns: порог последовательных ошибок dns_failover_failure_threshold (защита от флаппинга)
- singbox: выделенный direct_bypass inbound (mixed port 2080) для прямого выхода устройств в обход TPROXY
- torrserver: автоматический bypass cgroups v2 services/torrserver прямо в WAN
- zapret: нормализация устаревших параметров conntrack --ctrack-timeouts
- ui: интеграция управления службами TorrServer Direct и Direct Proxy в LuCI
- tests: новые тесты subscription_order_independence и direct_bypass_torrserver
2026-09-06 21:19:42 +03:00
Dushnilin 510fb48dd8 fix(packaging): предотвращение сброса служб и зависания LuCI при обновлении пакетов 2026-09-06 20:15:23 +03:00
Dushnilin fbeadb48ed fix: разделение правил маршрутизации секции (fix коллизии AND) и поддержка http/https ссылок 2026-09-06 19:23:07 +03:00
Dushnilin 625715fed0 feat: асинхронное обновление списков в LuCI (fix XHR timeout) и форматированный config.json
- backend: добавлены команды list_update_async и list_update_status с отслеживанием шагов в /var/run/tachyon/list-update.status
- ui: кнопка ручного обновления списков теперь запускает операцию в фоне, показывает модалку с индикатором и опрашивает статус (устранен таймаут LuCI XHR в 30 сек)
- json: sing-box config.json теперь форматируется с отступами в 2 пробела (sprintf '%.2J') для удобства чтения
- tests: обновлены тесты и добавлены проверки для list-update-status (122/122 passed)
2026-09-06 17:55:40 +03:00
Dushnilin 2fd8c2dca3 fix(singbox): экспорт COMMUNITY_SERVICES для загрузки ruleset и исправление RAG эмбеддингов AI Doctor 2026-09-06 17:06:41 +03:00
Dushnilin 85df236727 feat: автоопределение low-RAM роутеров и zram-swap, парсинг @ в URL query и устойчивость к отключенному IPv6 2026-09-06 14:31:45 +03:00
Dushnilin fd79c4e317 feat: поддержка HTTP/HTTPS прокси (#45), комплексная доработка деинсталляции и отката конфигурации (1.3.22) 2026-09-06 14:12:27 +03:00
Dushnilin 547d4aa6ba fix(cli): защита аргументов ucode от перестановок опций GNU getopt
- Добавлен разделитель '--' перед модулем в run_spec (/usr/bin/tachyon) и module_args (diagnostics/runtime.uc), чтобы аргументы стратегий не интерпретировались как флаги ucode
- В tests/cli_entrypoint.sh передан безопасный аргумент strategy_dummy
2026-09-06 09:44:00 +03:00
Dushnilin 381b63d31f test(cli): перенос теста вызова validate_byedpi_strategy_json в cli_entrypoint 2026-09-06 09:41:12 +03:00
Dushnilin e9cf4744f3 fix(byedpi): исправление валидации стратегий ByeDPI и сохранение в веб-интерфейсе LuCI
- Зарегистрирована команда validate_byedpi_strategy_json в command_spec CLI (/usr/bin/tachyon)
- Добавлена функция validate_byedpi_strategy_json и режим validate-byedpi-strategy-json в diagnostics/runtime.uc с вызовом providers/byedpi/validator.uc
- Исправлена ошибка 'Unexpected token U' в LuCI, из-за которой отменялось сохранение стратегии ByeDPI в UCI и сбрасывалось на дефолтное значение
- Добавлены тесты CLI-валидации стратегий в tests/byedpi_validator.sh
2026-09-06 09:33:02 +03:00
Dushnilin bcd1616aac test: isolate sing-box version/variant state files in component_backup_rollback 2026-09-05 13:26:56 +03:00
Dushnilin a4a757223f fix(awg): support AmneziaWG 2.0/3.0/3.1, fix WARP generator safety & update release 1.3.20 2026-09-05 12:00:14 +03:00