⛄ Sync 2026-07-31 00:26:24

This commit is contained in:
github-actions[bot] committed 2026-07-31 00:26:24 +08:00
1 parent 47d0743808
commit b44a4364c4
125 files changed
+3954 -140418

No files matched your search

@@ -163,7 +163,7 @@ const methods = {
const type = req.args?.type;
let result = {};
const fd = popen(`/usr/bin/sing-box generate ${type} ${shellquote(req.args?.params || '')}`);
const fd = popen('/usr/bin/sing-box generate ' + type + ' ' + shellquote(req.args?.params || ''));
if (fd) {
let ech_cfg_set = false;
let ech_key_set = false;
@@ -234,8 +234,13 @@ const methods = {
resources_get_version: {
args: { type: 'type' },
call: function(req) {
const version = trim(readfile(`${HP_DIR}/resources/${req.args?.type}.ver`));
return { version: version, error: error() };
const allowed_types = [ 'china_ip4', 'china_ip6', 'china_list', 'gfw_list' ];
if (index(allowed_types, req.args?.type) === -1)
return { version: null, error: 'invalid resource type' };
const version = trim(readfile(`${HP_DIR}/resources/${req.args?.type}.ver`) || '');
return { version, error: error() };
}
},
resources_update: {