Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

同一个机场两种协议的订阅都会返回“剩余流量”导致出现重复的 proxy group #230

Open
ZedRover opened this issue Apr 28, 2023 · 1 comment

Comments

@ZedRover
Copy link

使用同一家机场的ss 和 trojan 订阅作为provider时直接按照下面的方式写surgio.conf.js会导致生成的surge 配置中proxy group 里有两个“剩余流量”引发报错,尝试使用 filter 也无法排除

    customFilters:{
        myFilter: utils.discardKeywords(['剩余','时间'])
    }
    {
      name: 'SurgeV3_combine.conf',
      template: 'surge_v3',
      provider: 'ss',
      combineProviders: ['trojan'],
      customParams: {
        magicVariable: utils.myFilter,
      },
    },

@X1A0CA1
Copy link
Contributor

X1A0CA1 commented May 24, 2024

对于我来说,我是这样处理的,给不同机场都添加一个独特的后缀:

// providers.someairport

module.exports = defineClashProvider ({
// ... 前面定义的一些东西省略
  hooks: {
    afterNodeListResponse: async (nodeList, _) => {
      for (const node of nodeList) {
        // 为节点名字添加一个后缀
        node.nodeName = `${node.nodeName} | 在这里添加你的后缀`;
      }
      return nodeList;
    },
  },
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants