box_for_magisk icon indicating copy to clipboard operation
box_for_magisk copied to clipboard

现在clash内核能订阅地址吗?

Open Konseru opened this issue 2 years ago • 5 comments

现在clash内核能订阅地址吗?如果可以该怎么配置文件?

Konseru avatar Apr 15 '23 09:04 Konseru

现在clash内核能订阅地址吗?如果可以该怎么配置文件?

https://github.com/taamarin/box_for_magisk/blob/d33ca32aa52cbb32e7e3e5f88d7aa804828e2387/box/settings.ini#L39-L47

taamarin avatar Apr 15 '23 12:04 taamarin

现在clash内核能订阅地址吗?如果可以该怎么配置文件?

https://github.com/taamarin/box_for_magisk/blob/d33ca32aa52cbb32e7e3e5f88d7aa804828e2387/box/settings.ini#L39-L47

看了下代码,这个订阅是简单粗暴的直接把下载的文件覆盖掉/data/adb/box/clash/config.yaml,我感觉应该是提取订阅文件中的节点信息替换/data/adb/box/clash/provide/domestic.yml吧,是我少看了哪块代码吗,求告知。🤣

powerAn2020 avatar May 14 '23 03:05 powerAn2020

不要用这个配置项,可以直接在clash的config.yaml里面配置,参考如下:

proxy-groups:
  - { name: 'JICHANG', type: load-balance, use: ["ONE"] }
  - { name: 'SELF', type: select, use: ["VPS"] }
  - { name: 'block', type: select, proxies: ["REJECT", "JICHANG"] }
proxy-providers:
  'ONE':
    type: http
    url: "https://sub1.smallstrawberry.com/api/v1/client/subscribe?token=xxxxxxx"
    interval: 3600
    filter: '香港'
    path: ./provide/one.yml
    health-check:
      enable: true
      interval: 600
      url: https://cp.cloudflare.com/generate_204

这样就能做到只提取节点信息了。

我使用的内核是clash.meta,其他内核没测试过。

rockxsj avatar May 17 '23 02:05 rockxsj

现在clash内核能订阅地址吗?如果可以该怎么配置文件?

https://github.com/taamarin/box_for_magisk/blob/d33ca32aa52cbb32e7e3e5f88d7aa804828e2387/box/settings.ini#L39-L47

看了下代码,这个订阅是简单粗暴的直接把下载的文件覆盖掉/data/adb/box/clash/config.yaml,我感觉应该是提取订阅文件中的节点信息替换/data/adb/box/clash/provide/domestic.yml吧,是我少看了哪块代码吗,求告知。🤣

@rockxsj 额,昨天刚提交了pr,引入yq实现了上面的功能,请问怎么判断自己是clash.meta?用脚本自动下载的是吗

powerAn2020 avatar May 17 '23 03:05 powerAn2020

是的,脚本默认下载的应该就是clash.meta,不过你也可以自己下载了放在bin目录下啊

rockxsj avatar May 17 '23 04:05 rockxsj