/** * 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; }