Skip to content

Commit aa68476

Browse files
committed
fix: 更新Surge订阅配置文件热补丁,修复ws-path参数传递逻辑以支持完整节点路径
1 parent 5ca1df9 commit aa68476

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

_worker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1191,7 +1191,7 @@ function Surge订阅配置文件热补丁(content, url, config_JSON) {
11911191
if (x.includes('= tro' + 'jan,') && !x.includes('ws=true') && !x.includes('ws-path=')) {
11921192
const host = x.split("sni=")[1].split(",")[0];
11931193
const 备改内容 = `sni=${host}, skip-cert-verify=${config_JSON.跳过证书验证}`;
1194-
const 正确内容 = `sni=${host}, skip-cert-verify=${config_JSON.跳过证书验证}, ws=true, ws-path=${config_JSON.随机路径 ? 随机路径() + config_JSON.完整节点路径 : config_JSON.完整节点路径}, ws-headers=Host:"${host}"`;
1194+
const 正确内容 = `sni=${host}, skip-cert-verify=${config_JSON.跳过证书验证}, ws=true, ws-path=${config_JSON.随机路径 ? 随机路径(config_JSON.完整节点路径) : config_JSON.完整节点路径}, ws-headers=Host:"${host}"`;
11951195
输出内容 += x.replace(new RegExp(备改内容, 'g'), 正确内容).replace("[", "").replace("]", "") + '\n';
11961196
} else {
11971197
输出内容 += x + '\n';

0 commit comments

Comments
 (0)