Commit Graph
1705 Commits
Author SHA1 Message Date
Dushnilin 2c31a62e4d fix: same-release SHA prefix compare + sing-box generator error detail
- action.uc: compare release target_commitish (full 40-char SHA) with
  installed short SHA by prefix instead of exact match; fixes false
  'same release update found' when commit is actually the same
- runtime.uc: generator_failure_reason now returns the first error line
  instead of the ucode 'Near here ---^' position marker, and logs full
  generator output at debug level on failure for better diagnostics
2026-08-04 11:31:51 +03:00
Dushnilin ea40ce1e93 fix: upgrade postcss 8.5.20 → 8.5.23 (GHSA-6g55-p6wh-862q)
Arbitrary .map file read via untrusted sourceMappingURL when from is
unset. Added npm overrides to force postcss@8.5.23 across all transitive
deps (tsup, vitest→vite).
2026-08-04 09:12:20 +03:00
Dushnilin 56480443b4 feat: dynamic sing-box repo links + expanded README
- runtime.uc: add sing_box_repo_url to build_system_info() based on
  installed variant (extended→shtorm-7, lx→Leadaxe, stable→SagerNet)
- main.js: use systemInfo.sing_box_repo_url instead of hardcoded URL
- README.md / README.en.md: expanded Watchdog section with all 14 fixes,
  atomic operations, restart protection, data correctness, Telegram
  rate limits, firewall improvements, dynamic repo links, commit-level
  update tracking
2026-08-03 21:52:49 +03:00
Dushnilin 22a236e5d1 feat: commit-level version tracking for same-release updates
Backend:
- constants.uc: add TACHYON_COMMIT_SHA constant (placeholder __COMPILED_COMMIT_SHA__)
- build.sh: capture git rev-parse HEAD and sed-replace commit SHA placeholder
- Makefile: same commit SHA sed replacement for OpenWrt builds
- action.uc: modify check_tachyon() to compare installed commit SHA with
  target_commitish from GitHub release, new status 'outdated_same_release'
- action.uc: reuse release_json for both version and commit SHA extraction
- updater.uc: add release_commit_sha helper to extract target_commitish
- updates.uc: extend cacheable status to include outdated_same_release

Frontend:
- main.js: handle outdated_same_release status in renderComponentCard
- main.js: include outdated_same_release in shouldShowInstallAfterCheck
- main.js: include outdated_same_release in applyCachedCheckResults

i18n:
- Add 'Update is available for current release' and 'Update is available
  for current release:' to .pot and .ru.po files

78 tests pass.
2026-08-03 21:35:06 +03:00
Dushnilin e67cd066b2 feat(i18n): Russian translations for Remote Hosts Lists settings
- Remote Hosts Lists → Удалённые списки хостов
- Auto-update Hosts Lists → Автообновление списков хостов
- Hosts Lists Update Interval → Интервал обновления списков хостов
- Description strings translated
2026-08-03 20:43:09 +03:00
Dushnilin a1c6cdd86a fix: migration.uc uses warn() not log_message() (undefined function) 2026-08-03 20:14:10 +03:00
Dushnilin 2d13e295b8 chore: gitignore tmp test artifacts 2026-08-03 20:07:10 +03:00
Dushnilin 6c7ceb0873 chore: remove test artifacts from tracking 2026-08-03 20:06:42 +03:00
Dushnilin a3f877c960 fix: file handle safety, orphan cleanup, error logging edge cases
generator.uc: try/catch around hosts cache file read with guaranteed close
hosts.uc: try/catch around parse_hosts_file with guaranteed close
migration.uc: try/catch around remove_cache_path, checked unlink in remove_legacy
runtime.uc: cleanup stale temp config files on init_config startup
lifecycle.uc: log warning on nft table delete failure in stop_main
2026-08-03 20:06:18 +03:00
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