根据参数下发 mihomo smart 配置

Sub-Store 根据参数下发 mihomo smart 配置
▎使用场景
在文件链接后添加 URL 参数
▎在文件中添加一个脚本操作
▎使用场景
在文件链接后添加 URL 参数
smart=true / smart=1 来选择性下发 smart 策略组▎在文件中添加一个脚本操作
javascript
const { smart } = $options?._req?.query || {};
if (smart && JSON.parse(smart)) {
const config = ProxyUtils.yaml.safeLoad($content)
config['proxy-groups'] = config['proxy-groups'].map(group => ({
...group,
type: ['url-test'].includes(group.type) ? 'smart' : group.type
}));
$content = ProxyUtils.yaml.safeDump(config)
}
#SubStore #Sub-Store #小课堂 #tips #订阅 #配置 #smart #覆写 #mihomo