fix: load community subnets from /tmp/sing-box/rulesets path & bump v1.2.34

This commit is contained in:
Dushnilin
2026-07-26 22:56:16 +03:00
parent da55799a04
commit b3e6fcd0c1
3 changed files with 8 additions and 4 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "fe-app-tachyon", "name": "fe-app-tachyon",
"version": "1.2.33", "version": "1.2.34",
"license": "MIT", "license": "MIT",
"type": "module", "type": "module",
"scripts": { "scripts": {
+1 -1
View File
@@ -31,7 +31,7 @@ function detect_installed_version() {
} }
} }
return "1.2.33"; return "1.2.34";
} }
function constants_map() { function constants_map() {
@@ -1121,9 +1121,13 @@ function add_excluded_ips_rule(config, section) {
} }
function load_community_subnet_cidrs(community) { function load_community_subnet_cidrs(community) {
let folder = ctx.runtime_ruleset_folder || runtime_ruleset_folder; let path = "/tmp/sing-box/rulesets/community-subnets-" + as_string(community) + ".lst";
let path = folder + "/community-subnets-" + as_string(community) + ".lst";
let content = fs.readfile(path); let content = fs.readfile(path);
if (content == null || content == "") {
let folder = ctx.runtime_ruleset_folder || runtime_ruleset_folder || "/tmp/sing-box/rulesets";
path = folder + "/community-subnets-" + as_string(community) + ".lst";
content = fs.readfile(path);
}
if (content == null || content == "") if (content == null || content == "")
return []; return [];