Commit Graph
100 Commits
Author SHA1 Message Date
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
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
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 bf28dce4a8 fix(ui): prevent false worker exit timeout during deep scan strategy tuning 2026-07-29 13:28:51 +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 f28035393b i18n(fe-app): add Russian translations for zapret2 strategy tuner 2026-07-29 11:44:32 +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 8b8c4b7df1 feat(zapret2): add high-performance strategy generator and tuner 2026-07-29 11:30:23 +03:00
Dushnilin c7ff142a48 Release 1.2.43 - Pre-download and cache all preset rulesets & databases 2026-07-29 08:58:00 +03:00
Dushnilin 28f2a04f02 chore(locales): synchronize extracted translation templates and Russian PO catalog 2026-07-28 21:48:24 +03:00
Dushnilin 53e3f1f041 feat(routing): add traffic type / protocol filtering and exclusion per section 2026-07-28 21:46:18 +03:00
Dushnilin a3e9981d13 fix(backend): optimize plain-list domain import to O(N) deduplication and fast-path ASCII parsing for 100k+ domain lists 2026-07-28 21:19:44 +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
Dushnilin a06248cd6e fix(ui): read AWG params via cfgvalue() not uci.get() — fixes missing values in spoiler 2026-07-28 11:05:40 +03:00
Dushnilin 9dcb474228 feat(ui): AWG obfuscation params compact spoiler in OpenWRT style + ru translations; fix(types): add dns_turbo_cache to ConfigSection 2026-07-28 11:02:29 +03:00
Dushnilin 3e1c68f836 feat(ui): collapse AWG amnezia params (Jc/Jmin/Jmax/S1-4/H1-4/I1-5) into compact spoiler 2026-07-28 10:52:42 +03:00
Dushnilin e8fa171644 fix(protocols): WARP mtu=1280, AnyTLS SNI fallback to server, OpenVPN server validation 2026-07-28 10:47:01 +03:00
Dushnilin d2cb9d9e43 fix(awg): harden AmneziaWG validation, auto-convert plaintext headers to hex, and enforce optimal MTU/keepalive defaults 2026-07-28 09:22:54 +03:00
Dushnilin e936f39b53 fix(singbox): strip <b prefix from binary UCI buffer strings in uci_bin_to_hex 2026-07-28 01:02:28 +03:00
Dushnilin e9a9ead675 fix(updater): add fallback resolution for sing-box-extended when GitHub API rate-limits 2026-07-28 00:01:04 +03:00
Dushnilin b069e8f6a4 style(ui): remove emojis and clean up GeoIP mode labels 2026-07-27 18:47:04 +03:00
Dushnilin cc8cec4275 fix(ui): strip legacy all value and map non-ru in geoip_country load handler 2026-07-27 18:44:45 +03:00
Dushnilin eef4d587bd feat: custom multi-country GeoIP grouping and filter modes (include/exclude) 2026-07-27 18:30:02 +03:00
Dushnilin 1e82413022 style(ui): move GeoIP country routing option into section match conditions tab 2026-07-27 18:12:22 +03:00
Dushnilin 14507abaf0 fix(tests): add missing text_rule dscp field to nft_apply signature fixture 2026-07-27 17:30:35 +03:00
Dushnilin e11316f7d7 fix(tests): update nft signature fixtures in state.uc and tests for DSCP parity 2026-07-27 17:16:05 +03:00
Dushnilin 3c3a4b7035 feat(section): add DSCP mark matching for QoS application routing 2026-07-27 17:09:48 +03:00
Dushnilin f05a55c37e fix(core): remove hardcoded fallback version from constants.uc and use dynamic package lookup for APK and OPKG 2026-07-27 16:49:52 +03:00
Dushnilin 0eec769a90 fix(updates): fallback filenames without _all suffix to match actual release assets 2026-07-27 12:34:31 +03:00
Dushnilin 0adbbbdf03 fix(watchdog): prevent concurrent reload_firewall race with is_reload_in_progress() guard 2026-07-27 10:27:14 +03:00
Dushnilin 5e169a430b feat(watchdog): AI self-healing for community subnet sets, TPROXY port, /tmp cache restore + fix undefined check_firewall_rules 2026-07-27 10:23:53 +03:00
Dushnilin 5ff4c448bd fix: nft populate community subnets on reload + generator_routes return fix for Telegram 2026-07-27 09:02:44 +03:00
Dushnilin 197013f043 fix: persistent community subnet storage & reboot fallback for Telegram in section Main 2026-07-27 08:38:55 +03:00
Dushnilin b3e6fcd0c1 fix: load community subnets from /tmp/sing-box/rulesets path & bump v1.2.34 2026-07-26 22:56:16 +03:00
Dushnilin da55799a04 release: v1.2.33 - dynamic community subnets, AmneziaWG action support & flowtable bypass 2026-07-26 22:29:01 +03:00
Dushnilin c012a5710b refactor: remove hardcoded Telegram IP arrays in favor of fully dynamic community subnet loading
- updates.uc: cache downloaded built-in subnet lists (telegram, meta, twitter, etc.) to community-subnets-<service>.lst.
- generator_routes.uc: dynamically load community list IP CIDRs from cached subnet files for all community lists into sing-box route rules. Zero hardcoded IP arrays.
2026-07-26 21:45:15 +03:00
Dushnilin e9ad56df56 fix: complete Telegram routing, AmneziaWG action support & flowtable bypass
- nft/apply.uc: add 'awg' and 'warp' to action_captures_traffic so nftables
  creates priority sets for AmneziaWG / Cloudflare WARP sections.
- nft/apply.uc: insert flowtable bypass in fw4 forward for marked TPROXY packets
  so OpenWrt flow offloading doesn't hijack proxied connections.
- singbox/generator_routes.uc: include official Telegram IP CIDRs in route rules
  for telegram community list so direct IP connections match sing-box rules.
2026-07-26 21:31:31 +03:00
Dushnilin e98a2c325e fix: community subnets nftables population & Telegram IP ranges
- nft/apply.uc: nft_add_community_subnet_file_for_section now populates
  common_set (tachyon_subnets / tachyon_rule_<Section>_subnets) when section
  is not a priority rule section. Previously, community subnets for normal
  proxy/VPN sections were skipped completely.
- updates.uc: fix typo SUBNETS_TELERAM -> SUBNETS_TELEGRAM in BUILTIN_SUBNET_URLS
- bump version 1.2.31 -> 1.2.32
2026-07-26 21:18:26 +03:00
Dushnilin fa93ad4cd0 fix: sync Russian po catalogs and fix Unicode corruption in DNS Turbo Cache translations
- Both ru po files now byte-for-byte identical (cmp -s passes)
- Fixed Unicode corruption: u0411... literals replaced with actual UTF-8
- Unified description msgid between settings.js (LuCI) and fe-app
- Added Enable DNS Turbo Cache + Saving ellipsis entries to both files
- Updated pot files to match new description string
2026-07-26 20:52:50 +03:00
Dushnilin 399826f1f6 fix: dns_prefetch.uc - fix ucode syntax incompatibilities
- starts_with() not in ucode -> substr(line,0,1) != '#'
- push(arr, ...spread) not valid in ucode -> explicit for loop
2026-07-26 20:33:34 +03:00
Dushnilin ecb130cdb3 refactor: DNS Turbo Cache - dynamic domain extraction from UCI sections
Instead of relying only on a hardcoded list, now reads domains directly
from user's configured Tachyon sections:
  - user_domains (UCI list, type=dynamic)
  - user_domains_text (textarea, type=text)
  - domain / domain_suffix rule conditions

User's own proxy-routed domains are prefetched first, then the baseline
popular list fills in the rest. This means FakeIP cache is always warmed
for exactly the domains the user actually needs to bypass.
2026-07-26 20:32:30 +03:00