Commit Graph
87 Commits
Author SHA1 Message Date
Dushnilin 383b426e46 feat: локализация исключений GeoIP по секциям и мониторинг памяти DNS-кэша dnsmasq 2026-09-17 20:48:14 +03:00
Dushnilin e2c90ed6ea fix(singbox): fix p2p isolation rule matching for transport network and port directions 2026-09-17 18:17:44 +03:00
Dushnilin 0efa47abdc fix(dns): preserve 127.0.0.42 during restart and add local DNS cache support
- decouple restart() from stop_impl() in lifecycle.uc to avoid premature dnsmasq_restore
- keep dhcp.@dnsmasq[0].server locked to 127.0.0.42 throughout service restarts
- add atomic restart_service hooks in init.d/tachyon and initd.uc
- fix dns_turbo_cache path resolution to promote default cache to /etc/sing-box/cache.db
- add Local DNS Cache support in dnsmasq (dns_local_cache, dns_cache_size)
- add comprehensive behavioral regression test tests/service_restart_lifecycle.sh
2026-09-17 08:45:24 +03:00
Dushnilin 5eeaa91864 fix: resolve zapret2 fuzzer daemon startup, premature self-update completion, and component visibility cache 2026-09-16 19:54:36 +03:00
Dushnilin e10509033c fix(fe): resolve eslint any errors and format frontend files 2026-09-16 16:33:03 +03:00
Dushnilin 0f5967e51c fix(routing): scope excluded_ips to section rules, humanize section names, and add component visibility 2026-09-16 16:16:32 +03:00
Dushnilin 6978601d4d fix: resolve Discord Cloudflare voice ports #55, smart detect proxy sections #56, and UI enhancements 2026-09-15 19:15:57 +03:00
Dushnilin 2d00141696 feat(routing): route router's own traffic through designated section 2026-09-15 09:30:04 +03:00
Dushnilin 7375e26b44 fix(qos): harmonize SQM and CAKE cooperation, resolve bufferbloat degradation 2026-09-14 17:03:45 +03:00
Dushnilin 70bb7280c1 fix(fuzzer): eliminate fuzzer hangs, preserve DNS flags, and optimize probing performance 2026-09-13 10:03:56 +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 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 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 d07e2c599f feat: add Guest Mode isolation with quotas and fix Telegram bot language switching 2026-09-08 09:10:00 +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 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 84658d84dc feat(dns): add intelligent DNS Benchmark, Auto-Tuner & clean defaults
- Implement ucode module dns/benchmark.uc:
  * Probes major DNS servers (Yandex, Cloudflare, Google, Quad9, AdGuard, Comss, Mullvad, Control D) across UDP 53 and DoH.
  * Measures latency, packet loss, and detects ISP DNS poisoning/hijacking.
  * Intelligent recommendation engine computes optimal primary DNS (prefers encrypted DoH if fast), bootstrap plain UDP, fallback plain UDP from independent provider, and upstream mode (sequential/parallel).
  * Supports CLI execution (tachyon dns_benchmark, tachyon dns_autotune --apply) and background async worker mode for LuCI UI.
- LuCI Web UI modal (renderDnsBenchmarkModal.ts):
  * Real-time progress bar, responsive results table with latency rating badges.
  * Recommendation summary card with one-click 'Apply Recommended DNS' action.
  * Added '⚡ Auto-Tune & Benchmark DNS' button in Settings -> DNS tab.
- Added comprehensive unit tests in vitest (538/538 passed) and tests/dns_benchmark.sh.
- Added Russian PO translations.
2026-09-02 15:28:23 +03:00
Dushnilin 557058c772 fix(ui): reject DoH URLs and path-style DoH in dns_fallback_server field
Mirror the backend validator.uc checks in the LuCI settings UI.
Previously the validate function used validateDNS() which accepts
DoH path format (e.g. 'cloudflare-dns.com/dns-query'); now we gate
before that call with explicit checks matching the backend:
  - '://' → DoH/DoT URL (e.g. 'https://cloudflare-dns.com/...')
  - '/'   → path-style DoH (e.g. 'cloudflare-dns.com/dns-query')

Also add Russian translations for both new error messages.
2026-09-02 14:20:33 +03:00
Dushnilin 8b3c3e365f feat(dns): upstream mode (sequential/parallel) & explicit fallback DNS servers, bump 1.3.13 2026-09-01 20:49:21 +03:00
Dushnilin 79a4d477db fix(ui): заменить input[checkbox] на button-тогл в виджете порядка вкладок (починить кликабельность) 2026-09-01 19:21:06 +03:00
Dushnilin 324569aa53 fix(ui): исправить чекбоксы виджета порядка вкладок (DummyValue→renderWidget) 2026-09-01 18:46:07 +03:00
Dushnilin 943ee1321d feat(ui): добавить управление порядком, видимостью и стартовой вкладкой меню в Настройки 2026-09-01 18:31:31 +03:00
Dushnilin c432220af5 feat(updates): добавить локальный бэкап и оффлайн-откат компонентов 2026-09-01 12:24:58 +03:00
Dushnilin 84cdf9d2f8 feat(updates): 1.3.10 - Автоматическое обновление компонентов (сразу при выходе и по расписанию)
- Backend: реализован запуск автоматического обновления компонентов в фоновом режиме (trigger_component_auto_update, component_auto_update_apply)
- Cron: поддержка окна обслуживания (schedule mode) с регистрацией задачи в crontab по заданному времени (HH:MM)
- UCI: новые опции component_auto_update_enabled, component_auto_update_mode, component_auto_update_time, component_auto_update_targets
- Web UI: элементы управления во вкладке настроек «Обновления» (чекбокс включения, переключатель режима, время и мультиселект разрешенных компонентов)
- Тесты: добавлен интеграционный тест component_auto_update.sh, обновлены cron-тесты updates_due.sh, все 118 тестов успешно пройдены в Docker
- Локализация: добавлены русские переводы для всех новых элементов интерфейса
2026-09-01 10:58:46 +03:00
Dushnilin dfb32722bf release: 1.3.8 - OpenWrt network interfaces for WARP generator, DoH doctor URL normalization & doctor lock fixes 2026-08-30 20:05:16 +03:00
Dushnilin 7ddb7f6d4d fix(warp): timeout при прокси, четная длина hex для awg_i1..i5, исправление выбора секции прокси (#43) 2026-08-27 13:06:31 +03:00
Dushnilin 9bc6fe28fd feat(failover): автоматическое переключение прокси-секций
- генератор: при section_failover_enabled catch-all указывает на селектор tachyon-failover со всеми секциями-кандидатами
- выбор по умолчанию переживает рестарты через /etc/tachyon/failover_section, устаревшее имя откатывается на первую секцию
- service/failover.uc: пробер каждой секции через Clash API delay, порог N подряд — переключение на живую, TG-уведомление
- watchdog: вызов проверки в slow-тире (модуль сам отключён при выключенной опции)
- настройки: флаг + порог во вкладке Advanced, RU-локализация
- тесты: генерация вкл/выкл/персист/устаревшее состояние + логика переключения со стабом Clash API
2026-08-26 14:15:23 +03:00
Dushnilin c5bd7ce197 fix(dashboard): отображение AmneziaWG вместо WireGuard, отображение пинга на карточках соединений и фикс генератора WARP 2026-08-21 10:37:27 +03:00
Dushnilin 83e1a82e71 feat: add telegram_diagnose backend command and connection test button
Backend: telegram_diagnose returns JSON with 8 checks (token, admin_ids,
sing-box, port, DNS with FakeIP support, direct API, proxy API, send
test message). Registered in CLI dispatcher.

Frontend: Test Connection button in Telegram settings calls
telegram_diagnose and renders results with check/cross icons.

DNS check accepts sing-box FakeIP range (198.18.x.x/198.19.x.x).
2026-08-20 22:17:09 +03:00
Dushnilin 66ffb50a1a feat: add Telegram API connection test button to settings
Runs 7-step diagnostic: token check, sing-box running, port 4534
listening, DNS resolution, direct IPv4 API, proxy API, send test
message. Shows green/red indicators with actionable advice for each.
2026-08-20 21:56:12 +03:00
Dushnilin 2a87db172b fix: add missing enable_rag and warp_proxy_section to LuCI settings form
The custom renderAdvancedSettings panel was never connected to the UI.
Added enable_rag checkbox to AI tab and warp_proxy_section dropdown
to Advanced tab in the standard LuCI settings.js form.

Also fixed warp_proxy_section load function to use map data instead of
uci.sections() which returns an array (for...in iterated indices).

Added Russian translations for new strings.
2026-08-20 19:39:39 +03:00
Dushnilin 0964b79171 fix(ai-chat): fix AI Chat and Assistant to work with LM Studio
- Fix response parsing: check report field, not just message
- Pass user query text to LLM instead of ignoring it
- Append user question to diagnostic prompt with system context
- Increase timeout to 120s for LM Studio responses
- Add command_status_from_args to core/common.uc exports

Closes #38
2026-08-19 15:57:42 +03:00
Dushnilin e325ac0092 feat(settings): add manual list update button to LuCI settings tab 2026-08-18 12:54:21 +03:00
Dushnilin c35380200f fix(tailscale, ai): исправить скрытие полей Tailscale-сервера и добавить готовый пресет провайдера OpenRouter 2026-08-17 11:18:36 +03:00
Dushnilin 85ce7f98c7 feat(snapshots): сохранение и восстановление рабочих конфигов из расширенных настроек 2026-08-14 11:36:48 +03:00
Dushnilin 65b216b6a2 feat(p2p): поле портов торрент-клиента для изоляции P2P (issue #31) 2026-08-14 09:46:15 +03:00
Dushnilin 305e14d44e feat(reset): кнопка сброса настроек в LuCI и дефолтное состояние при чистой установке
- новый модуль service/reset.uc (режим reset-settings, флаг no-start): остановка сервиса, чистка runtime/кэшей, сохранение tailscale, запись дефолтного конфига
2026-08-13 21:06:39 +03:00
Dushnilin 2b4d8cd4e0 fix(i18n): wrap Ollama and LM Studio labels in _() with English defaults and update po/pot 2026-08-11 22:29:34 +03:00
Dushnilin 1a1fd7f4c3 fix(settings): add Ollama & LM Studio to CBI settings tab options and make API key optional for local LLMs 2026-08-11 22:27:57 +03:00
Dushnilin be5f41a52e feat(ai-stack-2026): add OpenAPI 3.0.3 schema, Telegram /ai_doctor & /fix integration, AI language selector, and log deduplication
- Agent REST API (agent_api.uc): Added GET /openapi.json returning OpenAPI 3.0.3 spec for ChatGPT Custom GPTs, N8N, Dify, and LLM Agents
- AI Doctor (runtime.uc): Added compress_log_snippet() for deduplicating repeated log entries and ai_doctor_lang support (ru/en prompt selection)
- Telegram Bot (telegram.uc): Added /ai_doctor and /fix commands with Inline Keyboards for instant quick-fix execution
- Settings (renderAdvancedSettings.ts, settings.js): Added AI Doctor Language selector (ru/en)
- Documentation: Updated README.md and README.en.md with 2026 AI features
2026-08-11 16:10:31 +03:00
Dushnilin 3d48a22e3c feat(ai-doctor): add model selection per provider
Backend (runtime.uc):
- query_llm() accepts model_override (5th param), falls back to provider default
- ai_doctor() reads ai_doctor_model from UCI and passes to query_llm

Frontend (renderAdvancedSettings.ts):
- aiDoctorModel state field (type / init / load / save)
- Model dropdown per provider with sensible defaults:
  openai: gpt-4o-mini(default)/gpt-4o/gpt-4.1-mini/gpt-4.1/o4-mini
  anthropic: claude-3-5-haiku(default)/claude-3-5-sonnet/claude-3-7-sonnet
  deepseek: deepseek-chat(default)/deepseek-reasoner
  custom: free-text input
- Switching provider resets model to '' (use new provider default)

Legacy LuCI (settings.js):
- ai_doctor_model Value field with placeholder '(provider default)'
2026-08-11 12:37:31 +03:00
Dushnilin 31c36118ef refactor(ui): сгруппировать все параметры Settings по вкладкам (cbi-tabgroup)
- Настройки разделены на 6 категорий: DNS, Сеть, Сервисы, Обновления, ИИ и Системные
- Устранена длинная простыня прокрутки — каждая категория открывается во вкладке
2026-08-10 19:30:51 +03:00
Dushnilin c930c15dc3 feat(ai): добавить поддержку Anthropic Claude API в AI Doctor
- В query_llm (runtime.uc) добавлена интеграция с Anthropic Messages API (https://api.anthropic.com/v1/messages) с заголовком x-api-key
- В настройки Settings и Dashboard добавлен выпадающий выбор провайдера 'Anthropic (Claude API)'
- Добавлен русский перевод для опций AI Doctor
2026-08-10 19:16:19 +03:00
Dushnilin 8a71a5a1a4 feat(luci): добавить поле AI Agent REST API Token в стандартную вкладку Settings
- Добавлена опция agent_api_token (AI Agent REST API Bearer Token) в CBI-форму настроек settings.js
- Сохраняет токен через стандартную кнопку Save & Apply в LuCI
2026-08-10 19:13:51 +03:00
Dushnilin 90980917e4 feat(telegram): выбор секции прокси для Telegram-бота + фикс краша при null cb.from
- get_proxy_args() теперь поддерживает опцию UCI bot_proxy_section:
  если sing-box запущен и секция указана, переключает GLOBAL outbound через REST API
- Исправлен краш 'left-hand side expression is null' при обработке
  callback_query без поля from (например channel_post callbacks)
- В LuCI settings.js добавлен ListValue 'bot_proxy_section' с выпадающим
  списком активных секций (паттерн аналогичен download_via_proxy_section)
- Локализация: ru/tachyon.po и templates/tachyon.pot синхронизированы
- Пересборка main.js через npm run build
2026-08-09 22:34:06 +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 ab606ff166 hosts: restyle remote hosts lists widget to native LuCI look
Replaced custom colored rows/badges with standard CBI table layout:
cbi-section-table, cbi-input-checkbox, cbi-input-text,
cbi-button-action, cbi-button-remove. No custom colors or borders.
2026-08-05 12:45:31 +03:00
Dushnilin d38d42b08a hosts: rewrite remote hosts lists widget with per-URL toggle
Completely replaced DynamicList with a custom renderWidget that shows
each URL as a row with: checkbox toggle, URL label, ON/OFF badge, and
delete button. Disabled URLs are stored in hosts_list_disabled UCI list.
Backend filters them out before downloading. URLs stay in settings
when disabled — they just don't get applied.
2026-08-05 12:27:49 +03:00
Dushnilin 969937428f hosts: add per-URL enable/disable toggle for remote hosts lists
- Backend: get_hosts_urls() now reads hosts_list_disabled list and
  filters out disabled URLs before downloading.
- Backend: hosts_list_status() now returns total and disabled counts.
- Frontend: Added hidden hosts_list_disabled DynamicList option.
- Frontend: Overrode renderWidget on hosts_list_urls to prepend a
  toggle switch (ON/OFF) next to each URL. Toggle syncs with
  hosts_list_disabled via uci.set().
2026-08-05 12:24:39 +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