Files
NeoTachyon/tachyon/files/etc/config/tachyon
T
hacker07 617107ef15 feat(adguard): add AdGuard Home component with DNS modes, failover and section upstream
Add AdGuard Home as an installable Tachyon component (component card with
check/update/remove/rollback/enable/disable) backed by providers/adguard
(validator + runtime) and an init.d service.

Backend:
- action.uc: install/remove/enable/backup/rollback/dispatch/releases for
  'adguard' (tar.gz from AdguardTeam/AdGuardHome, OpenWrt->AdGuard arch map)
- updater.uc: adguard asset selection; updates.uc: valid_component_name and
  automatic update checks
- runtime.uc: generates AdGuardHome.yaml from UCI (upstream=single-box DNS,
  fallback_dns for failover, web UI on LAN, filters), manages the daemon
- dns/apply.uc: dns_main_mode (dnsmasq->AdGuard->sing-box chain, or AdGuard on
  :53 with dnsmasq DHCP-only)
- settings: dns_main_mode (Main DNS) + dns_adguard_failover_enabled
- sections: routed_dns_type/dns_type 'adguard' resolve via the AdGuard provider
  upstreams; validator accepts the new type
- system-info: adguard_version/installed/enabled/backup fields

Frontend:
- component card 'AdGuard Home' with enable/disable + version actions
- LuCI DNS settings tab: Main DNS selector and failover flag
- section.js: AdGuard Home routed DNS protocol option

Tests: tests/adguard_validator.sh, tests/adguard_runtime.sh
2026-09-17 14:22:13 +03:00

334 lines
14 KiB
Plaintext

config settings 'settings'
option config_version '1.0.5'
list applied_migrations 'interface_sections'
list applied_migrations 'enable_component_checks'
list applied_migrations 'http_connection_urls'
list applied_migrations 'dns_hosts_to_option'
list applied_migrations 'global_hosts_to_section'
list applied_migrations 'orphan_section_interface_cleanup'
list applied_migrations 'ensure_dns_server_defaults'
option dns_type 'udp'
list dns_server '77.88.8.8'
list bootstrap_dns_server '77.88.8.8'
option dns_check_interval '10s'
option dns_recovery_check_interval '60s'
option dns_check_timeout '2s'
option dns_rewrite_ttl '60'
option dns_strategy 'prefer_ipv4'
option dns_detour_enabled '0'
#option dns_detour_section 'main'
list source_network_interfaces 'br-lan'
option enable_output_network_interface '0'
#option output_network_interface 'wan'
option enable_badwan_interface_monitoring '0'
#list badwan_monitored_interfaces 'wan'
#option badwan_reload_delay '2000'
option enable_yacd '0'
option disable_quic '0'
option block_doh '0'
option direct_bypass_enabled '0'
option direct_bypass_port '2080'
option list_update_enabled '1'
option update_interval '1d'
option download_all_presets '0'
option component_update_check_enabled '1'
option component_update_check_interval '1d'
option component_auto_update_enabled '0'
option component_auto_update_mode 'immediate'
option component_auto_update_time '04:00'
list component_auto_update_targets 'all'
option component_backup_enabled '0'
option latency_test_url 'https://www.gstatic.com/generate_204'
option download_lists_via_proxy '0'
option download_components_via_proxy '0'
#option download_lists_via_proxy_section 'main'
#option download_components_via_proxy_section 'main'
option dont_touch_dhcp '0'
option isolate_p2p '0'
#option p2p_ports 'tcp:6881,udp:6881-6889'
option config_path '/etc/sing-box/config.json'
option cache_path '/tmp/sing-box/cache.db'
option dns_local_cache '0'
option dns_cache_size '10000'
option dns_main_mode 'dnsmasq'
option dns_adguard_failover_enabled '0'
option show_component_adguard '1'
option log_level 'warn'
option exclude_ntp '0'
option shutdown_correctly '0'
option smart_detect '0'
option game_console_optimizer '0'
list game_console_ips ''
# smart_detect: auto-detects blocked domains from logs and adds them to the first
# remote proxy section in smart_detect_sections that works via proxy.
# list smart_detect_sections 'main-proxy'
# list smart_detect_sections 'backup-proxy'
# Ordered: first section where the domain works via proxy wins.
# ─── AI Watchdog settings ─────────────────────────────────────────────
option ai_proxy_health_enabled '1'
option ai_proxy_health_interval '30'
# ─── Navigation & Menu settings ───────────────────────────────────────
option default_tab 'dashboard'
list tab_order 'dashboard'
list tab_order 'section'
list tab_order 'server'
list tab_order 'profile'
list tab_order 'schedule'
list tab_order 'monitoring'
list tab_order 'diagnostic'
list tab_order 'updates'
list tab_order 'settings'
list tab_order 'telegram'
option show_tab_dashboard '1'
option show_tab_sections '1'
option show_tab_servers '0'
option show_tab_profiles '0'
option show_tab_parental '0'
option show_tab_monitoring '1'
option show_tab_diagnostic '1'
option show_tab_updates '1'
option show_tab_telegram '1'
option ai_proxy_health_fail_threshold '3'
option ai_proxy_health_url 'https://cp.cloudflare.com/generate_204'
option ai_dns_continuous_enabled '1'
option ai_dns_interval '60'
option ai_reload_dedup_enabled '1'
option ai_metrics_enabled '1'
option ai_metrics_retention_hours '24'
option ai_smart_cooldowns_enabled '1'
option ai_config_validation_enabled '1'
option ai_graceful_degradation_enabled '1'
option ai_telegram_status_enabled '1'
option ai_persistent_smart_detect '1'
option ai_adaptive_intervals_enabled '1'
option ai_anomaly_detection_enabled '1'
option ai_anomaly_reconnect_threshold '10'
option enable_rag '1'
#option warp_proxy_section ''
#config section 'subscription_example'
# option label 'Subscription'
# option enabled '1'
# option action 'connection'
# list selector_proxy_links 'vless://example'
# list community_lists 'russia_inside'
# list rule_set 'https://example.com/rules.srs'
# list rule_set_with_subnets 'https://example.com/rules-with-subnets.json'
# option dashboard_filter_mode 'disabled'
# option dashboard_detect_server_country 'flag_emoji'
# #list dashboard_include_outbounds 'Example server name'
# #list dashboard_include_groups 'Fastest'
# #list dashboard_exclude_outbounds 'Backup server name'
# #list dashboard_exclude_groups 'Backup'
# option outbound_detour_enabled '0'
# #option outbound_detour_section 'main'
# option sort_by_latency '0'
# #list fully_routed_ips '192.168.1.2'
#config section_interface
# option section 'subscription_example'
# option name 'awg0'
# option domain_resolver_enabled '0'
# option domain_resolver_dns_type 'udp'
# option domain_resolver_dns_server '8.8.8.8'
#config subscription_url
# option section 'subscription_example'
# option url 'https://example.com/api/sub'
# option auto_user_agent '0'
# option user_agent 'CustomAgent/1.0'
# option auto_hwid '1'
# option custom_device_headers '0'
# #option device_os 'iOS'
# #option ver_os '26.4'
# #option device_model 'iPhone 17 Pro Max'
# #option device_locale 'ru'
# #option app_version '4.6.0'
# #option accept_language 'ru-RU,ru;q=0.9'
# option subscription_update_enabled '1'
# option subscription_update_interval '1h'
# option download_via_proxy_enabled '0'
# option show_dashboard_metadata '1'
# option prefix_nodes '0'
# #option node_prefix 'Provider'
# option include_urltest_groups '1'
# option hide_urltest_group_outbounds '1'
# option hide_detour_outbounds '1'
#config urltest
# option section 'subscription_example'
# option name 'Fastest'
# option check_interval '3m'
# option tolerance '50'
# option testing_url 'https://www.gstatic.com/generate_204'
# option idle_timeout '30m'
# option interrupt_exist_connections '1'
# option pin_dashboard '1'
# option filter_mode 'disabled'
# option detect_server_country 'flag_emoji'
# list exclude_countries 'US'
# list exclude_outbounds 'Example server name'
# list exclude_regex '.*backup.*'
# list include_countries 'NL'
# list include_outbounds 'Example server name'
# list include_regex '.*primary.*'
#config section 'json_outbound_example'
# option label 'JSON outbound'
# option enabled '1'
# option action 'connection'
# list outbound_jsons '{"type":"socks","tag":"Local SOCKS","server":"127.0.0.1","server_port":1080,"version":"5"}'
# list community_lists 'russia_inside'
#config server 'server_json_inbound_example'
# option label 'JSON inbound'
# option enabled '1'
# option protocol 'json_inbound'
# option routing_mode 'rules'
# option inbound_json '{"type":"mixed","listen":"0.0.0.0","listen_port":1080}'
#config server 'server_vless_reality_example'
# option label 'VLESS Reality server'
# option enabled '1'
# option protocol 'vless'
# option listen '0.0.0.0'
# option listen_port '443'
# option public_host 'vpn.example.com'
# option routing_mode 'rules'
# option security 'reality'
# option server_uuid '00000000-0000-0000-0000-000000000000'
# option vless_flow 'none'
# option tls_server_name 'www.microsoft.com'
# option client_fingerprint 'chrome'
# option reality_handshake_server 'www.microsoft.com'
# option reality_handshake_server_port '443'
# option reality_private_key 'PRIVATE_KEY_FROM_sing-box_generate_reality-keypair'
# option reality_public_key 'PUBLIC_KEY_FROM_sing-box_generate_reality-keypair'
# option reality_short_id '5a'
# option reality_max_time_difference '1m'
# option transport 'tcp'
# # Restrict LAN / private network access for specific guest users:
# #option isolate_lan_for_users '1'
# #list isolated_users 'friend-1'
# #list isolated_users 'friend-2'
# # sing-box-extended only:
# #option transport 'xhttp'
# #option transport_path '/xhttp'
# #option transport_xhttp_mode 'auto'
#config server 'server_mtproto_example'
# option label 'MTProto proxy'
# option enabled '1'
# option protocol 'mtproto'
# option listen '0.0.0.0'
# option listen_port '443'
# option public_host 'vpn.example.com'
# option routing_mode 'rules'
# option mtproto_secret '11111111111111111111111111111111'
# option mtproto_faketls 'google.com'
# option mtproto_padding '1'
# option mtproto_domain_fronting_port '443'
# option mtproto_prefer_ip 'prefer-ipv4'
# option mtproto_tolerate_time_skewness '3s'
# option mtproto_idle_timeout '5m'
# option mtproto_handshake_timeout '10s'
#config server 'server_tailscale_example'
# option label 'Tailscale endpoint'
# option enabled '1'
# option protocol 'tailscale'
# option routing_mode 'rules'
# # tailscale_mode: singbox (userspace endpoint inside sing-box, default)
# # or native (system tailscaled: tailnet reachable from LAN without client,
# # requires Tailscale component installed on the Updates tab)
# option tailscale_mode 'singbox'
# option tailscale_control_url 'https://controlplane.tailscale.com'
# option tailscale_hostname 'tachyon-server-tailscale-example'
# option tailscale_auth_key 'tskey-auth-...'
# option tailscale_accept_routes '0'
# option tailscale_advertise_exit_node '1'
# # Native mode only:
# #option tailscale_masquerade '1'
# #option tailscale_use_exit_node '0'
# #list tailscale_advertise_routes '192.168.1.0/24'
config telegram 'telegram'
option enabled '0'
option bot_token ''
option admin_ids ''
option poll_interval '5'
option notify_crash '1'
option notify_restart '1'
option notify_server_switch '1'
option notify_subscription '1'
option notify_cert '1'
option notify_dns_leak '1'
#option language 'ru'
# language: auto-detected from LuCI if not set.
# Values: ru (default), en
#config profile 'profile_kids_example'
# option label 'Kids Devices'
# option avatar '👶'
# option enabled '1'
# list device_ip '192.168.1.150'
# list device_ip 'AA:BB:CC:DD:EE:FF'
# option safe_search '1'
# option block_doh '1'
# option daily_quota_minutes '120'
# list blocked_domains 'tiktok.com'
# list blocked_domains 'roblox.com'
# option notify '1'
#config schedule 'schedule_bedtime_example'
# option label 'Kids Bedtime'
# option enabled '1'
# list profile 'profile_kids_example'
# option target 'all'
# option action 'block'
# option start_time '22:00'
# option end_time '08:00'
# list days 'monday'
# list days 'tuesday'
# list days 'wednesday'
# list days 'thursday'
# list days 'friday'
config guest_mode 'guest_mode'
option enabled '0'
option mode 'selected'
# mode: 'selected' (explicit guest_devices) or 'inverted' (all devices except trusted_devices)
#list guest_devices '192.168.1.201'
#list guest_devices 'AA:BB:CC:DD:EE:01'
#list trusted_devices '192.168.1.100'
#list trusted_devices 'AA:BB:CC:DD:EE:FE'
option isolate_lan '1'
option block_router_admin '1'
option daily_time_limit '0'
option daily_traffic_limit '0'
#option start_time '08:00'
#option end_time '23:00'
#list days 'monday'
option notify '1'
#config provider 'adguard'
# option enabled '0'
# option webui_enabled '1'
# option webui_port '3000'
# option webui_username ''
# option webui_password ''
# # DNS servers used by AdGuard Home for fallback (when Tachyon DNS is down)
# # and as the resolver for sections that choose 'AdGuard Home':
# #list upstream_dns 'https://dns.google/dns-query'
# #list upstream_dns 'tls://1.1.1.1'
# #list bootstrap_dns '1.1.1.1'
# #list bootstrap_dns '8.8.8.8'
# # Ad-block filter lists (empty = the built-in AdGuard DNS filter):
# #list filter_lists 'https://adguardteam.github.io/AdGuardSDNSFilter/Filters/filter.txt'