From af41f6ddba53b3c686321846e370c2861f5e1e33 Mon Sep 17 00:00:00 2001 From: Dushnilin Date: Sun, 19 Jul 2026 12:04:33 +0300 Subject: [PATCH] =?UTF-8?q?Revert=20"FakeIP=20=D0=BA=D1=8D=D1=88=20=D0=BF?= =?UTF-8?q?=D0=B5=D1=80=D0=B5=D0=BD=D0=B5=D1=81=D1=91=D0=BD=20=D0=B2=20?= =?UTF-8?q?=D0=BF=D0=B5=D1=80=D1=81=D0=B8=D1=81=D1=82=D0=B5=D0=BD=D1=82?= =?UTF-8?q?=D0=BD=D0=BE=D0=B5=20=D1=85=D1=80=D0=B0=D0=BD=D0=B8=D0=BB=D0=B8?= =?UTF-8?q?=D1=89=D0=B5=20/etc/sing-box/"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 4e6b1d776cfacfbfa2ed8c249e576b38b3b0a7e4. --- .../luci-static/resources/view/tachyon/settings.js | 9 ++++++--- tachyon/files/usr/lib/service/lifecycle.uc | 5 +---- tachyon/files/usr/lib/service/state.uc | 2 +- tachyon/files/usr/lib/singbox/generator.uc | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js b/luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js index d1386b8d..9e02bdc8 100644 --- a/luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js +++ b/luci-app-tachyon/htdocs/luci-static/resources/view/tachyon/settings.js @@ -880,9 +880,12 @@ function createSettingsContent(section, capabilities) { "Select or enter path for sing-box cache file. Change this ONLY if you know what you are doing", ), ); - o.value("/etc/sing-box/cache.db", _("Persistent (/etc/sing-box/cache.db)")); - o.value("/tmp/sing-box/cache.db", _("RAM — lost on reboot (/tmp/sing-box/cache.db)")); - o.default = "/etc/sing-box/cache.db"; + o.value("/tmp/sing-box/cache.db", "RAM (/tmp/sing-box/cache.db)"); + o.value( + "/usr/share/sing-box/cache.db", + "Flash (/usr/share/sing-box/cache.db)", + ); + o.default = "/tmp/sing-box/cache.db"; o.rmempty = false; o.validate = function (section_id, value) { if (!value) { diff --git a/tachyon/files/usr/lib/service/lifecycle.uc b/tachyon/files/usr/lib/service/lifecycle.uc index e2b93954..7d95012c 100644 --- a/tachyon/files/usr/lib/service/lifecycle.uc +++ b/tachyon/files/usr/lib/service/lifecycle.uc @@ -725,9 +725,6 @@ function start_main() { module_success(BYEDPI_UC, [ "start-runtime" ]); - // Ensure persistent cache directory exists before sing-box starts - ensure_dir("/etc/sing-box"); - if (!command_success_from_args([ "/etc/init.d/sing-box", "start" ])) { log_message("Failed to start sing-box. Aborted.", "fatal"); return 1; @@ -847,7 +844,7 @@ function stop_main() { if (module_success(NFT_UC, [ "tproxy-route6-present", RT_TABLE_NAME ])) command_success_from_args([ "ip", "-6", "route", "flush", "table", RT_TABLE_NAME ]); - let cache_path = uci_core.get(CONFIG_NAME + ".settings.cache_path") || "/etc/sing-box/cache.db"; + let cache_path = uci_core.get(CONFIG_NAME + ".settings.cache_path") || "/tmp/sing-box/cache.db"; remove_file(cache_path); let sing_box_status = command_status_from_args([ "/etc/init.d/sing-box", "stop" ]); diff --git a/tachyon/files/usr/lib/service/state.uc b/tachyon/files/usr/lib/service/state.uc index 243237e2..9e827027 100644 --- a/tachyon/files/usr/lib/service/state.uc +++ b/tachyon/files/usr/lib/service/state.uc @@ -1400,7 +1400,7 @@ function sing_box_signature_body(settings, sections, servers, mwan3_active) { body = signature_add_value(body, "settings.disable_quic", bool_option_value(settings, "disable_quic", false)); if (sing_box_signature_has_remote_ruleset_sources(sections)) body = signature_add_value(body, "settings.update_interval", settings_update_interval(settings)); - body = signature_add_value(body, "settings.cache_path", option(settings, "cache_path", "/etc/sing-box/cache.db")); + body = signature_add_value(body, "settings.cache_path", option(settings, "cache_path", "/tmp/sing-box/cache.db")); body = signature_add_value(body, "settings.config_path", option(settings, "config_path", "")); body = signature_add_value(body, "settings.log_level", option(settings, "log_level", "warn")); body = signature_add_value(body, "settings.service_listen_address", option(settings, "service_listen_address", "")); diff --git a/tachyon/files/usr/lib/singbox/generator.uc b/tachyon/files/usr/lib/singbox/generator.uc index db20eaa4..64dedce4 100644 --- a/tachyon/files/usr/lib/singbox/generator.uc +++ b/tachyon/files/usr/lib/singbox/generator.uc @@ -425,7 +425,7 @@ function tproxy_inbound_matcher() { function base_config(settings, service_address, runtime_context) { let log_level = option(settings, "log_level", "warn"); let rewrite_ttl = int_option(settings, "dns_rewrite_ttl", "60"); - let cache_path = option(settings, "cache_path", "/etc/sing-box/cache.db"); + let cache_path = option(settings, "cache_path", "/tmp/sing-box/cache.db"); let dns_config = runtime_dns.config(settings); if (dns_config.unsupported) runtime_generate_unsupported(dns_config.unsupported);