FakeIP кэш перенесён в персистентное хранилище /etc/sing-box/

- Дефолтный путь cache.db изменён: /tmp → /etc/sing-box/cache.db
- При перезагрузке роутера fakeip маппинги сохраняются (overlay fs)
- При SIGHUP hot-reload sing-box читает полный кэш без потерь
- При tachyon stop кэш удаляется (clean state)
- UI настроек обновлён: Persistent выбран по умолчанию, RAM помечен как 'lost on reboot'
- Удалён устаревший Flash (/usr/share) вариант
This commit is contained in:
Dushnilin
2026-07-19 12:02:49 +03:00
parent 0152f4df38
commit 4e6b1d776c
4 changed files with 9 additions and 9 deletions
+4 -1
View File
@@ -725,6 +725,9 @@ 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;
@@ -844,7 +847,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") || "/tmp/sing-box/cache.db";
let cache_path = uci_core.get(CONFIG_NAME + ".settings.cache_path") || "/etc/sing-box/cache.db";
remove_file(cache_path);
let sing_box_status = command_status_from_args([ "/etc/init.d/sing-box", "stop" ]);