From e6bf7911b7fc35012251a1491e3282b6b0a9ff65 Mon Sep 17 00:00:00 2001 From: Shawn <45581750+KOP-XIAO@users.noreply.github.com> Date: Sun, 22 Aug 2021 19:24:09 +0800 Subject: [PATCH] minor bug fixed --- Scripts/resource-parser.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Scripts/resource-parser.js b/Scripts/resource-parser.js index c1f2ccc..214007d 100644 --- a/Scripts/resource-parser.js +++ b/Scripts/resource-parser.js @@ -1,5 +1,5 @@ /** -☑️ 资源解析器 ©𝐒𝐡𝐚𝐰𝐧 ⟦2021-08-15 16:45⟧ +☑️ 资源解析器 ©𝐒𝐡𝐚𝐰𝐧 ⟦2021-08-22 19:25⟧ ---------------------------------------------------------- 🛠 发现 𝐁𝐔𝐆 请反馈: @Shawn_KOP_bot ⛳️ 关注 🆃🅶 相关频道: https://t.me/QuanX_API @@ -1239,7 +1239,7 @@ function VR2QX(subs, Pudp, Ptfo, Pcert0, PTls13) { if (host.indexOf("\"Host\"")!=-1 && host.indexOf("{")!=-1) { host = JSON.parse(host)["Host"] } - host = "obfs-host=" + host + ", " + host = host!="{}"? "obfs-host=" + host + ", " : "" obfs = obfs + host } if (obfs.indexOf("obfs=over-tls") != -1 || obfs.indexOf("obfs=wss") != -1) { @@ -1310,12 +1310,13 @@ function Pobfs(jsonl, Pcert0, PTls13) { host0 = jsonl.host && jsonl.host != "" ? ", obfs-host=" + jsonl.host : ""; obfsi.push(obfs0 + host0) return obfsi.join(", ") - } else if (jsonl.tls == "http"){ + } else if (jsonl.net == "tcp" && jsonl.type == "http"){ obfs0 = "obfs=http"; uri0 = jsonl.path && jsonl.path != "" ? "obfs-uri=" + jsonl.path : "obfs-uri=/"; uri0 = uri0.indexOf("uri=/")!=-1 ? uri0:uri0.replace("uri=","uri=/") host0 = jsonl.host && jsonl.host != "" ? "obfs-host=" + jsonl.host + ", " : ""; obfsi.push(obfs0, host0 + uri0); + return obfsi.join(", ") } else if (jsonl.net !="tcp"){ // 过滤掉 h2/http 等类型 return "NOT-SUPPORTTED" } else if (jsonl.net =="tcp" && jsonl.type != "none") {