[Bug]: 新版本vmess代理不能工作 · Issue #2588 · Fndroid/clash_for_windows_pkg (github.com)
原因:
新版配置文件编写规则改变
解决方法:
在设置的Parser中,编写加入以下内容:
parsers:
- url: YOUR_SUBSCRPTION_URL
code: |
module.exports.parse = async (raw, { axios, yaml, notify, console }, { name, url, interval, selected }) => {
const obj = yaml.parse(raw)
obj.proxies.forEach( v => {
if (v.network === 'ws' && !v['ws-opts']) {
const opts = {}
opts.path = v['ws-path']
opts.headers = v['ws-headers']
v['ws-opts'] = opts
}
})
return yaml.stringify(obj)
}
注:YOUR_SUBSCRPTION_URL 为订阅链接