From 3a908f34492b669e074f2d33391bcffbe030938f Mon Sep 17 00:00:00 2001 From: salem <77879189@qq.com> Date: Wed, 26 Aug 2026 15:03:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20config/stash/override/hk.j?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/stash/override/hk.js | 42 +++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 config/stash/override/hk.js diff --git a/config/stash/override/hk.js b/config/stash/override/hk.js new file mode 100644 index 0000000..e19e59d --- /dev/null +++ b/config/stash/override/hk.js @@ -0,0 +1,42 @@ +/** + * Stash 远程高级覆写脚本 + * 功能:保留机场原本所有策略组,自动在列表末尾追加港、美、德三个过滤节点策略组 + */ + +function overwrite(config) { + // 1. 定义要追加的三个新策略组 + const myCustomGroups = [ + { + name: "🇭🇰 香港节点", + type: "select", + filter: "(?i)港|HK|Hong", + "include-all": true, + proxies: ["🚀节点选择"], + icon: "https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Hong_Kong.png" + }, + { + name: "🇺🇸 美国节点", + type: "select", + filter: "(?i)美|US|States|America", + "include-all": true, + proxies: ["🚀节点选择"], + icon: "https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/United_States.png" + }, + { + name: "🇩🇪 德国节点", + type: "select", + filter: "(?i)德|DE|Germany", + "include-all": true, + proxies: ["🚀节点选择"], + icon: "https://raw.githubusercontent.com/Koolson/Qure/master/IconSet/Color/Germany.png" + } + ]; + + // 2. 检查原配置中是否存在代理组列表,如果存在则通过 push 强行追加到数组末尾(沉底) + if (config['proxy-groups'] && Array.isArray(config['proxy-groups'])) { + config['proxy-groups'].push(...myCustomGroups); + } + + // 3. 将修改后的配置返回给 Stash + return config; +} \ No newline at end of file