Commit Graph
1980 Commits
Author SHA1 Message Date
Dushnilin d6df03e1f2 fix: prevent double update modal after Tachyon self-update page reload
After a self-update completes and the page reloads, the state watcher
finds the old action and opens a second modal. Save the job_id to
sessionStorage before reload, and restore it into handledComponentJobs
on page load so the watcher skips it.
2026-08-20 20:00:39 +03:00
Dushnilin b53b93786a chore: sync locales after adding enable_rag and warp_proxy_section 2026-08-20 19:48:24 +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 a9790f5638 fix: remove premature version check during tachyon self-update
The version-based early exit in waitComponentActionJob fired while
the state file still showed running: true and RPC was healthy. This
caused the frontend to declare install complete while the backend
was still restarting services, triggering a page reload before the
install finished.

Now version detection only fires when RPC fails (backend unreachable)
or when state is done with success=false. Normal installs always wait
for the state file to confirm completion.
2026-08-20 17:39:36 +03:00
Dushnilin 364b79ee27 fix: loop unknown inbound field stripping in sing-box config check
The graceful degradation for unknown sing-box inbound fields (e.g.
prefer_ip, tolerate_time_skewness) only retried once. When an older
sing-box version doesn't support multiple new fields, the first
unknown field gets stripped and the retry fails on the second one.

Now loops the check-strip-retry cycle until either:
- sing-box check passes
- no more unknown inbound fields are detected
- no stripping occurred (break to avoid infinite loop)

Fixes: 'Generated sing-box configuration is invalid: inbounds[8].
tolerate_time_skewness: json: unknown field' on older sing-box versions.
2026-08-20 13:57:11 +03:00
Dushnilin c6104289c7 fix: WARP generator proxy-first mode + helpful error message
call_api():
- If warp_proxy_section is set: try proxy FIRST, skip direct entirely
  (saves 32s when CF API is only reachable via tunnel)
- If no section: try direct first, then fallback to proxy (as before)
- Error hint: 'Cloudflare API may be blocked on WAN. Try setting
  warp_proxy_section in Advanced Settings to route through a tunnel.'

Addresses GitHub issue #39 requirements:
- Section/outbound selection for WARP registration: DONE
- No hardcoded Clash API IP: DONE
- Quick fail on dead WAN IPs: DONE (proxy-first mode)
- Helpful error message: DONE
2026-08-20 10:58:41 +03:00
Dushnilin 162171e692 fix: remove hardcoded 192.168.2.1, add WARP proxy section, simplify dashboard
warp_generator.uc:
- Replace hardcoded 192.168.2.1:9090 with dynamic Clash API URL
  (reads /etc/sing-box/config.json external_controller)
- Add warp_proxy_section UCI option for registration proxy routing
- Reduce curl timeouts: connect 3s, max 8s (was 6s/12s)
- Only try socks5 proxy if it's actually reachable (2s probe)
- Total worst-case: 4 direct attempts (32s) vs old 8 attempts (96s)

renderSections.ts:
- Revert connection node display from latency numbers to simple
  'Connected' / 'Not connected' (user: 'какой нахуй там пинг')

renderAdvancedSettings.ts:
- Add WARP Proxy Section text input (UCI: warp_proxy_section)
- Section name for WARP registration proxy routing

UCI config:
- Add warp_proxy_section option (commented out by default)

623 tests pass
2026-08-20 10:51:12 +03:00
Dushnilin 421a4fd796 feat: add RAG (Retrieval-Augmented Generation) for AI Doctor
New files:
- tools/rag_build_index.sh: build-time ingestion pipeline
  Chunks docs/knowledge-base/*.md into 2000-char chunks with 200-char overlap
  Produces rag_index.json (39 chunks, ~74KB) for runtime embedding
- tachyon/files/usr/lib/diagnostics/rag.uc: runtime RAG module
  Embeds chunks via same LLM provider API (OpenAI-compatible /v1/embeddings)
  Cosine similarity search, top-3 retrieval, 24h cache in /tmp
  Graceful fallback if embedding API unavailable
- tachyon/files/usr/lib/tachyon/rag_index.json: pre-built chunk index

Modified files:
- runtime.uc: integrated RAG into ai_doctor() function
  Retrieves relevant docs based on user query or diagnostic context
  Injects 'Relevant Documentation' section into LLM prompt
- renderAdvancedSettings.ts: added 'Enable RAG' toggle in AI Doctor settings
- tachyon config: added enable_rag option (default '1')
- build.sh: added rag_build_index.sh step

Architecture:
- Provider-agnostic: uses same API key/provider as LLM for embeddings
- Embedding model: text-embedding-3-small (OpenAI), nomic-embed-text (Ollama),
  local-model (LMStudio), deepseek-embedding (DeepSeek)
- Cache: embeddings cached in /tmp/tachyon_rag_embeddings.json (24h TTL)
- Fallback: if embedding fails, AI Doctor works without RAG (as before)
- 39 chunks from 14 docs, ~66K chars, cosine search <1ms

623 tests pass (101 backend + 522 frontend)
2026-08-20 10:27:56 +03:00
Dushnilin 1137e96b0d de-AI phase 3: inline redundant variables and null checks
TypeScript:
- getDashboardSections.ts: value === undefined || value === null -> value == null
- renderAdvancedSettings.ts: remove redundant Boolean() on boolean

ucode (10 inlined variables):
- helpers.uc: inline trailing_dot
- runtime.uc: inline ping_ok, enable_watchdog
- nft/apply.uc: inline rtmtu_ok, qos_enabled
- byedpi/runtime.uc: inline matched
- api.uc: inline deleted, added
- subscription.uc: inline has_source_markers
- watchdog.uc: inline is_healthy

522 frontend tests pass
2026-08-19 22:38:26 +03:00
Dushnilin 4094a41b5d de-AI: remove AI comments and boolean theater across TypeScript + ucode 2026-08-19 18:15:35 +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 a161ae4845 feat(subscription): добавлена поддержка пользовательских заголовков устройства и генератор HWID 2026-08-18 14:40:25 +03:00
Dushnilin bc10fff538 fix(i18n): синхронизировать fe-app и luci-app каталоги русской локализации 2026-08-18 14:25:45 +03:00
Dushnilin 3fb6a4b643 fix(nft): разрешать TPROXY-трафик с меткой в цепочке input fw4 для работы в изолированных зонах (Guest/VLAN) 2026-08-18 14:22:38 +03:00
Dushnilin 5fc9dda229 fix(i18n): fix corrupted Bad WAN Russian translation string 2026-08-18 12:55:14 +03:00
Dushnilin e325ac0092 feat(settings): add manual list update button to LuCI settings tab 2026-08-18 12:54:21 +03:00
Dushnilin 49dab2b8b9 fix(singbox): включать inet6_range в fakeip при prefer_ipv6, ipv6_only или ipv6_enabled 2026-08-18 08:09:52 +03:00
Dushnilin fe74578158 fix(singbox): добавлять inet6_range в fakeip только при включенном ipv6_enabled 2026-08-18 08:00:22 +03:00
Dushnilin fe0099a32a fix(singbox): использовать password вместо secret в объектах пользователей inbounds и расширить fallback неизвестных полей 2026-08-18 07:36:03 +03:00
Dushnilin 6a5ae8e692 fix(validator): исправить вызов valid_ip_or_cidr в validate_schedule 2026-08-18 07:02:41 +03:00
Dushnilin e695da1fb7 feat(parental): добавить поддержку фильтрации как по IP, так и по MAC-адресам 2026-08-17 21:52:28 +03:00
Dushnilin 7a9c87622e fix(parental): исправить рендеринг ячеек таблицы через cfgvalue/textvalue в form.DummyValue 2026-08-17 21:42:48 +03:00
Dushnilin d034c78b20 fix(nft): удалить конфликтную цепочку dstnat и предотвратить дублирование правил fw4 forward 2026-08-17 21:27:19 +03:00
Dushnilin fa9d294991 fix(dns): использовать полноценный рестарт dnsmasq при применении настроек 2026-08-17 21:11:19 +03:00
Dushnilin a4bb9d060d fix(watchdog): исправить вызов json-парсера в probe_wan 2026-08-17 21:09:22 +03:00
Dushnilin 6324d001cf ci: добавить allowUpdates в action-gh-release для корректного перевыпуска релизов 2026-08-17 20:52:28 +03:00
Dushnilin 47b10d8932 ci: убрать кастомный codeql.yml в пользу стандартного сканирования 2026-08-17 20:45:13 +03:00
Dushnilin 5f143f92dc ci: добавить явный CodeQL workflow для JavaScript/TypeScript 2026-08-17 20:42:26 +03:00
Dushnilin b435d965ed fix(parental): исправление отображения HTML-тегов в таблице и кнопок действий 2026-08-17 20:38:16 +03:00
Dushnilin 1f116e571d feat: родительский контроль по расписанию, мультивыбор секций, перехват DNS и обновление локализации (1.2.86) 2026-08-17 20:34:42 +03:00
Dushnilin c35380200f fix(tailscale, ai): исправить скрытие полей Tailscale-сервера и добавить готовый пресет провайдера OpenRouter 2026-08-17 11:18:36 +03:00
Dushnilin bca948947e fix(updates): предотвратить повторные модальные окна и добавить активную проверку готовности сервисов роутера перед перезагрузкой страницы 2026-08-17 10:27:16 +03:00
Dushnilin beb132690e fix(server): добавить валидатор validatePositiveInteger для полей MTU и Keepalive сервера AWG 2026-08-16 20:35:23 +03:00
Dushnilin 9b5707982c feat(servers): полная поддержка генератора конфигураций AmneziaWG, QR-кода, скачивания .conf и расширенных настроек сервера 2026-08-16 19:37:14 +03:00
Dushnilin 1062982070 fix(ui): отображение всех условий маршрутизации (списки сообщества, IP, устройства, порты) для секций AWG, WARP и расширенных прокси 2026-08-16 17:50:58 +03:00
Dushnilin 5adda4bba7 fix(i18n,watchdog): полная актуализация русской локализации интерфейса и исправление детекции WAN в Watchdog 2026-08-16 16:01:37 +03:00
Dushnilin 61b34bb949 feat(diagnostics): автоматическая загрузка и обновление профилей сервисов из репозитория с зеркалами и правами доступа 2026-08-16 15:07:07 +03:00
Dushnilin 18be28ec03 fix(singbox): исправление генерации inbound для сервера AWG и диагностических проверок сервисов 2026-08-16 14:34:23 +03:00
Dushnilin a323d8c45f fix(tests): устранение SIGPIPE broken pipe при проверках пайплайнов под set -eo pipefail 2026-08-16 14:24:49 +03:00
Dushnilin fc45498a8b feat(singbox): поддержка составных длительностей и автоподнятие urltest idle_timeout, зеркала gh-proxy в README и расширение Knowledge Base 2026-08-16 10:56:27 +03:00
Dushnilin 7b215e5792 feat(uninstall): скрипт чистого удаления uninstall.sh с сохранением бэкапа конфигурации и документация 2026-08-15 21:31:56 +03:00
Dushnilin b1c336ccad docs(readme): единая визуальная система Tachyon с анимированными баннерами для Telegram-бота, Watchdog, LuCI UI, CLI API и футера 2026-08-15 20:33:15 +03:00
Dushnilin 954596c26f docs(readme): анимированные лазерные разделители разделов, ЭКГ-монитор AI Doctor и интерактивный терминал установки 2026-08-15 20:30:11 +03:00
Dushnilin 9280708363 fix(svg): исправление фильтров userSpaceOnUse для горизонтальных линий потоков Zapret v2 и LAN 2026-08-15 20:29:27 +03:00
Dushnilin 983c81b1e1 docs(readme): раздельные анимированные каналы для Zapret v1, Zapret v2 и ByeDPI в диаграмме архитектуры 2026-08-15 20:28:52 +03:00
Dushnilin d4121b191b docs(readme): анимированный SVG hero-баннер и диаграмма архитектуры, актуализация возможностей AI Doctor v2.5 и аварийного восстановления 2026-08-15 20:28:10 +03:00
Dushnilin 91c7d5f8ee fix(updates): стабильный диалог установки, сохранение баннеров и логов без паразитных автозакрытий 2026-08-15 20:07:21 +03:00
Dushnilin d2a4243aa2 feat(ui): постоянная кнопка аварийного возврата прямого интернета в окне AI Doctor и действиях диагностики 2026-08-15 19:24:44 +03:00
Dushnilin 528bc7b9db feat(doctor): расширенная офлайн-диагностика (NTP, conntrack, deadlock, MTU) и аварийный возврат интернета 2026-08-15 17:18:23 +03:00
Dushnilin 56e847eceb fix(ui): корректный выбор сервера в модальных окнах и скрытие недоступного выбора для URLTest 2026-08-15 16:18:34 +03:00