Commit Graph
93 Commits
Author SHA1 Message Date
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 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 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 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 a254cfc8b6 fix(components): robust version installation and updates across Docker, APK v3 and OPKG
- fix(updater): support single release JSON object for specific tag queries and unblock prereleases on explicit selection
- fix(action): replace wget --header with -U for uclient-fetch compatibility on OpenWrt 23.05
- fix(action): make package list updates best-effort to prevent failures on snapshot kmod feeds
- fix(action): add offline/corrupt extract fallbacks (apk extract and opkg data.tar.gz) for kernel dependency mismatch
- fix(action): ensure /var/lock and /tmp/run directories exist before opkg/procd operations
- fix(action): fix fallback asset URL pattern for remittor zapret releases
- fix(packages): add binary presence and --version detection fallbacks for zapret, zapret2, byedpi, sing-box
- fix(byedpi): support direct apk list parsing for installed package version
- fix(state): include schedule, profile, and guest_mode in reload state signatures
- fix(imports): fix missing command_status_from_args, write_json, and remove_file imports
- fix(updates): extract meaningful ucode errors and strip trailing caret lines
2026-09-10 19:38:26 +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 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 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 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 f92c931a72 fix: zapret2 runtime resolution, tailscale proxy installation and protocol labels in server lists 2026-09-08 21:57:42 +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 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 dd6b877adb feat: поддержка AmneziaWG 3.1, keepalive ranges, безопасный ruleset HTTP client и Source-Aware DNS 2026-09-07 10:14:12 +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
Dushnilin 9927c04a6f fix: resolve crash on geoip_country selection and harden hosts list download (1.3.20) 2026-09-04 17:46:48 +03:00
Dushnilin e901f9d41a fix: zapret2 startup, dnsmasq fakeip rebind protection, dns detour routes (1.3.19) 2026-09-04 13:56:48 +03:00
Dushnilin 943ee1321d feat(ui): добавить управление порядком, видимостью и стартовой вкладкой меню в Настройки 2026-09-01 18:31:31 +03:00
Dushnilin 3532fa4280 fix(ui): уточнить подсказки news и anime в community-списках
- news: gordonua.com → pravda.com.ua (gordonua.com нет в списке)
- anime: crunchyroll.com, anilist.co → bato.to, mangadex.org (crunchyroll в geoblock, anilist.co нет в списке)
2026-08-25 21:58:40 +03:00
Dushnilin 75147a1d4c fix(ui): исправить описания community-списков в section.js
- russia_inside/russia_outside: описания были перепутаны местами
- hodca: исправлено описание (домены на CDN, а не HDRezka)
2026-08-25 21:56:19 +03:00
Dushnilin 1062982070 fix(ui): отображение всех условий маршрутизации (списки сообщества, IP, устройства, порты) для секций AWG, WARP и расширенных прокси 2026-08-16 17:50:58 +03:00
Dushnilin 7def6e556f i18n: fix Russian-source translation keys in AmneziaWG .conf import
section.js had 10 _() calls with Russian strings as keys instead of English.
This is a i18n antipattern: source keys must be language-neutral (English).

Changes:
- section.js: replace 10 Russian msgids with English equivalents
  - 'Загрузить конфиг .conf' -> 'Load .conf config'
  - 'Импортировать настройки AmneziaWG из файла .conf' -> 'Import AmneziaWG settings from .conf file'
  - 'Загрузить .conf' -> 'Load .conf'
  - 'Ошибка' (3x) -> 'Error' (reuses existing key)
  - 'Выберите файл с расширением .conf' -> 'Select a file with .conf extension'
  - 'Не удалось разобрать файл:' -> 'Failed to parse file:'
  - 'Загружено!' -> 'Loaded!'
  - 'Готово' -> 'Done'
  - 'Конфиг AmneziaWG успешно загружен!' -> 'AmneziaWG config loaded successfully!'
  - 'Ошибка чтения' -> 'Read error'

- tachyon.ru.po: add RU translations for 9 new English keys
- calls.json / tachyon.pot / tachyon.po: regenerated via locales:actualize

Result: 1108/1108 translated (no orphaned Russian-source entries)
2026-08-10 14:00:35 +03:00
Dushnilin 55e0f9b303 fix: исправить список серверов в URLTest, ACL для rpcd, Telegram-бот
UI (section.js):
- showUrlTestSettingsModal и showPriorityLevelSettingsModal: предзагрузка
  кэша outbound-имён до открытия модала — CBINamedSection.render() не
  вызывает section.load(), из-за чего DynamicList рендерился без данных
- renderStackedJsonSettingsModal: вызов map.load() перед map.render()

LuCI ACL (luci-app-tachyon.json):
- Добавлены пути /tmp/run/tachyon/... наряду с /var/run/tachyon/...
  На OpenWrt /var — симлинк на /tmp; rpcd резолвит симлинки перед
  проверкой ACL, поэтому /var/run/... никогда не давал прав чтения
  и fs.read() возвращал PermissionError

Postinstall (50_luci-tachyon):
- Добавлен перезапуск rpcd после установки пакета, чтобы новые ACL
  вступали в силу без ручного logout/login в LuCI

Telegram-бот (telegram.uc):
- handle_toggle_mac(): блокировка/разблокировка устройств теперь
  через правила firewall (fw4), а не через UCI blocked_macs
- /cb команда: разрешение токенизированных коллбэков для oversized
  inline-клавиатур (лимит Telegram 64 байта на callback_data)
- /qh_start, /qh_end: интерактивная настройка часов тихого режима
- in_quiet_hours() и daily report: исправлен localtime(time())
  вместо clock() — clock() возвращает [сек, мксек], а не tm-структуру
- Уведомления об обновлениях: current_version вместо installed_version
- Описание команды /restart исправлено

Backend (api.uc, state.uc):
- http_probe(): выделена функция с проверкой HTTP-статуса
  (curl выходит 0 даже при 4xx/5xx — теперь проверяем код явно)
- run_speedtest(): учёт curl exit status
- Math.random() заменён на clock()[1] (Math недоступен без import)
- current_year(): убрано +1900 — localtime().year уже полный год
2026-08-07 20:45:06 +03:00
Dushnilin 138a3831b9 fix(tests): restore exact dashboardFilterChoiceRefreshers registration signature for tests 2026-08-07 17:58:24 +03:00
Dushnilin 7c0959a969 fix(ui): dynamic refresh of outbound choices when focusing or loading section cache 2026-08-07 17:34:42 +03:00
Dushnilin ff92e79c5b fix(ui): resolve empty server list in subscription and urltest filter dropdowns 2026-08-07 17:30:50 +03:00
Dushnilin 37569768d8 fix(tracer): fix rpcd ACL permissions for ruleset files and add source URL display for external .lst lists 2026-08-07 13:35:01 +03:00
Dushnilin 1599a7239c fix(tracer): implement resilient 3-way ruleset reading for domain/IP lists in routing tracer 2026-08-07 13:21:49 +03:00
Dushnilin f2a22a6730 fix(tracer): fix fs.readfile call for domain/IP lists and implement sing-box SIGHUP graceful recovery 2026-08-07 13:14:06 +03:00
Dushnilin 131d8ea8c5 feat(awg): add j1-j3 and itime support for sing-box-extended v1.13.16-extended-2.6.0 2026-08-06 16:57:34 +03:00
Dushnilin 89ae37ea4b fix(ci): synchronize PO catalogs, fix DNS action UI, state aggregate signature, and uci array parsing 2026-08-06 16:39:53 +03:00
Dushnilin 7125e1a48e feat: карточки сервисов на дашборде + секция Hosts в правилах + скрытие вкладки Conditions для Hosts
Дашборд:
- Добавлены карточки статуса Zapret, Zapret2, ByeDpi на панель мониторинга
- Показывают статус (работает/остановлен), количество перезапусков, предупреждения
- Баг: API возвращает boolean а не число — исправлено сравнение

Секция Hosts:
- Перенесены опции hosts из глобальных настроек в отдельный тип секции (action=hosts)
- Опции: пользовательские DNS записи, удалённые списки хостов, автообновление, интервал
- Миграция: автоматический перенос глобальных настроек hosts в секцию
- Вкладка «Условия» скрыта для секций типа Hosts (hosts записи применяются глобально)
- Возвращена кнопка «Import Hosts File» с модальным окном загрузки из файла
- Убраны неиспользуемые опции из settings.js (~280 строк)

Локализация:
- Переведены 6 новых строк для превью импорта hosts
2026-08-06 14:16:18 +03:00
Dushnilin 207f77954a fix: auto-switch DNS servers on protocol change in settings and per-rule 2026-07-31 20:05:33 +03:00
Dushnilin 6061c92571 fix: read dns_type from DOM select instead of UCI for dynamic DNS server filtering 2026-07-31 19:01:07 +03:00
Dushnilin bc04794b73 feat: DoQ в UI + динамическая фильтрация DNS серверов по протоколу (UDP/DoT/DoH/DoQ) 2026-07-31 18:41:58 +03:00
Dushnilin b057e0a48d refactor: удаление неиспользуемого автоподбора Zapret2 и чистка файлов локализации 2026-07-30 16:42:30 +03:00
Dushnilin 6c1d3dc7be LuCI: Remove express/deep scan dropdown, use single deep scan 2026-07-29 22:39:45 +03:00
Dushnilin 4422416227 fix(ui): native rules button layout and tracer community match logic 2026-07-29 18:32:17 +03:00
Dushnilin 3821e92148 style(luci): complete visual redesign of zapret2 strategy tuner with 1-click automated section domain optimization 2026-07-29 13:41:41 +03:00
Dushnilin 03f6699099 feat(zapret2): fully automated 1-click strategy tuner for section domains and fix state directory creation 2026-07-29 13:19:15 +03:00
Dushnilin a8187270ca fix(luci): use async background polling for strategy tuner to prevent XHR timeouts 2026-07-29 13:02:26 +03:00
Dushnilin b82f98288a ux(luci): render strategy auto-tuner inline inside section modal with visual textarea feedback 2026-07-29 12:59:44 +03:00
Dushnilin 14270430d2 fix(zapret2): improve strategy probe connectivity and winner evaluation logic 2026-07-29 12:02:51 +03:00
Dushnilin dc695ff2d5 fix(luci): use renderWidget for native LuCI dependency handling 2026-07-29 11:52:43 +03:00
Dushnilin 3c4efea11b fix(luci): add zapret2 strategy tuner UI widget and fix AWG obfuscation visibility 2026-07-29 11:43:01 +03:00
Dushnilin 53e3f1f041 feat(routing): add traffic type / protocol filtering and exclusion per section 2026-07-28 21:46:18 +03:00
Dushnilin 698ef4dd33 fix(ui): fix AWG group render argument signature to (option_index, section_id, in_table) 2026-07-28 11:35:09 +03:00
Dushnilin a54607a6e7 fix(ui): remove duplicate realSid declaration 2026-07-28 11:29:30 +03:00
Dushnilin 297ffd0975 fix(ui): resolve real UCI section name from CBI section_id in AWG group render 2026-07-28 11:22:10 +03:00