Commit Graph
1696 Commits
Author SHA1 Message Date
Dushnilin 4e12681179 fix: migration error handling + updates retry mechanism
migration.uc:
- try/catch around migration.run() with error logging
- try/catch around apply_operations() with error logging
- Error checking for UCI cursor operations in apply_operations
- Checked fs.writefile return values in ensure_runtime_cache_format

updates.uc:
- Write pending marker on lock acquisition failure for next retry
2026-08-03 20:01:09 +03:00
Dushnilin 5f5031e4db fix: watchdog remaining bugs + atomic writes across 6 files
watchdog.uc:
- H-8: keepalive timestamp for init.d supervision
- H-14: save config backup after successful start
- M-1: empty_sections check domain/domain_suffix/ip_cidr
- M-2: dns_loop re-enable cooldown (5 min)
- M-11: reload_firewall always dedup
- M-12: merge wan+gateway heal into one function
- M-13: telegram rate limit (max 10 per 5 min)

nft/apply.uc: background reload_firewall to avoid blocking
subscription/cache.uc: write_text → write_text_if_changed (atomic)
dns_prefetch.uc: blocking sleep 10 → poll with early exit
diagnostics/runtime.uc: atomic uci_backup_save/restore, atomic scale writes, nslookup -port fix
wan-monitor: rate limit notifications (60s cooldown)
2026-08-03 19:54:50 +03:00
Dushnilin c7febcb0dc fix: atomic writes, crash safety, deadlock prevention across 10 files
watchdog.uc:
- H-4: ai_heal_uci_config atomic write (tmp → rename)
- H-5: backup validation via uci valid before restart
- H-6: proxy restart cooldown (max 3 per 10 min)
- H-7: restart lock file prevents parallel restarts
- H-13: ai_heal_wan_interface reads 'network' not 'tachyon' config
- M-3: nslookup -port=53 → plain nslookup (BusyBox compat)

generator.uc: atomic_write_json_file for main config output
hosts.uc: atomic cache write (tmp + mv), TOCTOU double stat fix
telegram.uc: atomic config restore, persistent /etc/.tachyon/ paths
migration.uc: UCI commit before cache removal
updates.uc: background reload inside locked section (deadlock prevention)
lifecycle.uc: uci commit return check, watchdog/telegram failure logging
package.uc: postinst_restore returns actual start result
build.sh/install.sh: Wave 1 backup/restore fixes
2026-08-03 19:43:10 +03:00
Dushnilin 0a428083af fix: watchdog/state/telegram crash bugs (ucode JS-isms + SIGHUP race)
- watchdog: fix 'left-hand side is not a function' tick crashes
  - safe_call: replace String(e)/instanceof Error with as_string(e)
  - ai_heal_empty_sections: list_option/read_json_file -> common.*
  - read_dns_recovery_state/ai_heal_dns_loop: read_json_file -> common.*
  - common.is_connections_action -> connections.is_connections_action
    (add missing 'config.connections' module import)
  - wrap check_singbox_process/check_auto_resume_pause/ai_full_health_audit
    in safe_call to prevent uncaught exceptions in tick loop
- state: SIGHUP race condition: fall back to sing-box start instead of
  exit(1) when process dies between config generation and signal delivery
- telegram: fix String(e)/instanceof Error crash in update catch block
2026-08-03 16:50:08 +03:00
Dushnilin 2965277877 feat: custom hosts lists — remote URL download, dnsmasq addn-hosts, sing-box DNS rules, LuCI UI 2026-08-03 16:05:53 +03:00
Dushnilin 51f9f1e43e installer: fix shellcheck SC1072 in tui_progress 2026-08-03 15:17:49 +03:00
Dushnilin 0cbbf3bd15 installer: fix TUI colors on OpenWrt busybox, clean output 2026-08-03 15:13:26 +03:00
Dushnilin 7a10fc9486 installer: inline TUI, remove tools dir, remove installer_tui.sh 2026-08-03 14:55:02 +03:00
Dushnilin e371f7a52e installer: TUI without ASCII logo 2026-08-03 14:48:04 +03:00
Dushnilin 280aa2bfac fix(install): tolerate apk non-critical errors when package is actually installed
On some OpenWrt builds (e.g., FriendlyWRT with ip-full conflict), apk
reports '1 error' even though the package installed successfully
(pre/post scripts ran). The install script now checks if the package
is actually installed after apk returns non-zero, and continues if so.
2026-08-03 14:22:20 +03:00
Dushnilin 5eef78b877 fix: DNS петля + watchdog автоисправление + централизация file_is_usable
Ключевые изменения:

1. core/helpers.uc: file_is_usable(path, min_bytes) + file_size_value(path)
   для единообразной проверки файлов (минимальный размер порог).

2. singbox/dns.uc: WAN fallback DNS серверы (fallback_wan_main) теперь
   используют прямой UDP без detour — исправлена петля когда
   DNS шёл через мёртвую прокси-секцию.
   Health probes для ВСЕХ DNS серверов (включая DoH) идут direct —
   failover может определить доступность DNS серверов.

3. watchdog.uc: ai_heal_empty_sections() — автообнаружение пустых
   proxy-секций с подписками → запуск subscription_update_async.
   ai_heal_dns_loop() — при обнаружении DNS-петли (dead proxy +
   dead DNS) → временно отключает DNS detour → загружает подписку →
   восстанавливает настройки.

4. Единая file_is_usable: nft/apply.uc, generator_routes.uc,
   components/{updates,action}.uc, config/validator.uc,
   subscription/cache.uc — все используют helpers.file_is_usable.

5. Тест tests/file_usable.sh для проверки helpers CLI.

6. Исправлен components_updater_job.sh mock lib — добавлен core/helpers.uc
2026-08-03 14:07:57 +03:00
Dushnilin 9b956e1bb4 fix(singbox+nft): skip broken local .srs/.lst rulesets and raise size guards
- generator_routes.uc: ensure_custom_ruleset() returns null and local
  file references with size <100 bytes are skipped (previously would
  silently reference a nonexistent/broken path, leaving sing-box with
  no domain matchers)
- generator_routes.uc: ruleset/rule_sets_with_subnets loops guard
  against null ensured result before accessing .tag/.kind
- nft/apply.uc: community-subnets .lst files with size <50 bytes are
  skipped before handing data to nftables
2026-08-03 09:37:37 +03:00
Dushnilin f98819b1e9 fix(singbox): guard against broken/truncated .srs rulesets (min 100 bytes)
Tiny or zero-byte .srs files can appear after interrupted downloads or
failed remote fetches. If such a file is picked as a local ruleset, the
section silently loses its domain matchers. Raise the size threshold to
100 bytes so damaged snapshots fall back to the remote rule_set URL.
2026-08-02 21:49:07 +03:00
Dushnilin 1e1f19d7b4 telegram bot: 12 новых фич + updates panel: кнопки GitHub репозиториев 2026-08-02 10:41:04 +03:00
Dushnilin a7bbd746db fix: 6 telegram/watchdog bugs found in code audit 2026-08-02 09:38:32 +03:00
Dushnilin 98cad5eb17 fix: telegram bot callback_query offset never saved (infinite loop) 2026-08-01 22:58:45 +03:00
Dushnilin 336db69429 fix: convert dns_hosts from list to option format in UCI 2026-08-01 22:41:05 +03:00
Dushnilin 7345515902 fix(po2lmo): исправлена хеш-функция sfh_hash в po2lmo.js 2026-08-01 18:43:22 +03:00
Dushnilin 1c535dd1b9 fix: исправлены переводы описаний AI Watchdog в LuCI settings.js 2026-08-01 17:11:23 +03:00
Dushnilin 0a3ef0dff2 feat: AI Watchdog — 11 новых фич с полной настройкой из LuCI 2026-08-01 14:41:59 +03:00
Dushnilin c1e6b6363e fix(watchdog): fix ai_heal_wan_interface false positive on PPPoE — check pppoe-wan instead of eth0, add cooldowns 2026-08-01 11:03:14 +03:00
Dushnilin 3752439895 Tachyon Doctor: новые проверки, авто-фиксы, расширенный AI Doctor 2026-08-01 09:24:44 +03:00
Dushnilin 55d52ee713 docs: rewrite SECURITY.md in English, fix pronouns in READMEs 2026-07-31 21:52:00 +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 ac1ff6bbb7 fix: кнопки активны после обновления + перевод Reinstall → Переустановить 2026-07-31 18:15:28 +03:00
Dushnilin ac209457d7 feat: кнопка Переустановить для Tachyon на странице обновлений 2026-07-31 17:34:11 +03:00
Dushnilin ed0def7886 test: обновить фикстур sing-box signature для TUIC state полей 2026-07-31 17:05:47 +03:00
Dushnilin a8cf31c9cd feat: DNS пресеты — рекомендованные серверы по протоколам (UDP/DoT/DoH/DoQ) 2026-07-31 17:01:50 +03:00
Dushnilin 448267335b feat: добавлена поддержка TUIC протокола и DNS over QUIC (DoQ) с ECH 2026-07-31 16:49:55 +03:00
Dushnilin ce0256528b fix(security): харденинг Telegram-бота, DNS failover и ACL 2026-07-31 14:31:13 +03:00
Dushnilin 866c04cdd5 chore: replace hardcoded version with timeless STABLE RELEASE badge in hero SVG 2026-07-30 22:45:14 +03:00
Dushnilin 7757ceae6a feat: implement WebRTC Leak Protection and Strict DNS DoQ Enforcer 2026-07-30 21:43:56 +03:00
Dushnilin 7e64eb10b1 Fix updates: split arch.candidates string into array for zapret2 release resolution 2026-07-30 20:24:17 +03:00
Dushnilin 79ed7b03cf fix: add cortex-a53 fallback for zapret2 generic aarch64 resolution 2026-07-30 18:39:07 +03:00
Dushnilin 7bcf7590ea fix(tests): актуализация сигнатур nftables и паритета хэшей в state.uc 2026-07-30 18:04:27 +03:00
Dushnilin af620a2f45 fix: исправление резолвинга пакета zapret2 для роутеров и поиск релизов 2026-07-30 17:52:16 +03:00
Dushnilin b057e0a48d refactor: удаление неиспользуемого автоподбора Zapret2 и чистка файлов локализации 2026-07-30 16:42:30 +03:00
Dushnilin f3d8c5a264 fix: решение зацикливания TPROXY FakeIP для ip.podkop.fyi и синхронизация тестов с локалями 2026-07-30 10:39:55 +03:00
Dushnilin 16d06fc9cc docs: обновление README.md (Forkop, Zapret v1/v2, OpenWrt 25+, донат) 2026-07-30 10:10:05 +03:00
Dushnilin 2bbc041686 docs: обновление README.md и добавление англоязычной версии README.en.md 2026-07-30 10:01:42 +03:00
Dushnilin bd4c686479 refactor(zapret2): исправление правил nftables, отказ от автоподбора и переход на zapret2-mcp 2026-07-30 09:37:46 +03:00
Dushnilin 93eac2002e Zapret2 Auto-Tune: Remove baseline_none and add generic UDP bypass for Discord voice 2026-07-29 22:45:01 +03:00
Dushnilin 6c1d3dc7be LuCI: Remove express/deep scan dropdown, use single deep scan 2026-07-29 22:39:45 +03:00
Dushnilin f48258ef2e Zapret2: Implement dynamic combinatorial strategy generator (tune) 2026-07-29 22:39:04 +03:00
Dushnilin 28b3a98ec2 Fix AI Watchdog QoS parsing issue with nftables DSCP names 2026-07-29 22:10:55 +03:00
Dushnilin d52c1bf6a2 Fix zapret2 tuner: use nftables for bypass, DoH for real IPs and fs.popen to avoid stdout corruption 2026-07-29 21:28:48 +03:00
Dushnilin 0100935f3d Fix zapret2 tuner: use nftables for bypass and DoH for real IPs 2026-07-29 21:18:29 +03:00
Dushnilin cc41864d2d fix(test): sync po file 2026-07-29 19:58:35 +03:00