fix: load community subnets from /tmp/sing-box/rulesets path & bump v1.2.34
This commit is contained in:
@@ -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": {
|
||||||
|
|||||||
@@ -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 [];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user