Sub-Store 根据参数下发 mihomo smart 配置

▎使用场景

在文件链接后添加 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)
}


Sub-Store 合集 频道资源合集 恰饭推荐 群组

#SubStore #Sub-Store #小课堂 #tips #订阅 #配置 #smart #覆写 #mihomo