▎使用场景
在文件链接后添加 URL 参数
smart=true / smart=1 来选择性下发 smart 策略组▎在文件中添加一个脚本操作
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)
}- ❤️2