fix: 更新Surge订阅配置文件热补丁,修复ws-path参数传递逻辑以支持完整节点路径
This commit is contained in:
1 parent
5ca1df9df6
commit
aa68476c66
1 file changed
+1
-1
+1
-1
@@ -1191,7 +1191,7 @@ function Surge订阅配置文件热补丁(content, url, config_JSON) {
|
||||
if (x.includes('= tro' + 'jan,') && !x.includes('ws=true') && !x.includes('ws-path=')) {
|
||||
const host = x.split("sni=")[1].split(",")[0];
|
||||
const 备改内容 = `sni=${host}, skip-cert-verify=${config_JSON.跳过证书验证}`;
|
||||
const 正确内容 = `sni=${host}, skip-cert-verify=${config_JSON.跳过证书验证}, ws=true, ws-path=${config_JSON.随机路径 ? 随机路径() + config_JSON.完整节点路径 : config_JSON.完整节点路径}, ws-headers=Host:"${host}"`;
|
||||
const 正确内容 = `sni=${host}, skip-cert-verify=${config_JSON.跳过证书验证}, ws=true, ws-path=${config_JSON.随机路径 ? 随机路径(config_JSON.完整节点路径) : config_JSON.完整节点路径}, ws-headers=Host:"${host}"`;
|
||||
输出内容 += x.replace(new RegExp(备改内容, 'g'), 正确内容).replace("[", "").replace("]", "") + '\n';
|
||||
} else {
|
||||
输出内容 += x + '\n';
|
||||
|
||||
Reference in new issue
Block a user