minor bug fixed

This commit is contained in:
Shawn
2022-08-23 14:53:21 +08:00
parent b703d96ca4
commit a870f37e84

View File

@@ -1,5 +1,5 @@
/**
☑️ 资源解析器 ©𝐒𝐡𝐚𝐰𝐧 ⟦2022-08-23 09:15⟧
☑️ 资源解析器 ©𝐒𝐡𝐚𝐰𝐧 ⟦2022-08-23 14:15⟧
----------------------------------------------------------
🛠 发现 𝐁𝐔𝐆 请反馈: https://t.me/Shawn_Parser_Bot
⛳️ 关注 🆃🅶 相关频道: https://t.me/QuanX_API
@@ -1834,15 +1834,15 @@ function SSR2QX(subs, Pudp, Ptfo) {
obfs =cnt.split(":")[4]!= "plain"? "obfs=" + cnt.split(":")[4] + ", " : ""; //plain?
ssrp = cnt.split(":")[2] != "origin"? "ssr-protocol=" + cnt.split(":")[2] : ""; //origin?
if (cnt.indexOf("obfsparam=") != -1) {
obfshost = cnt.split("obfsparam=")[1].split("&")[0] != "" ? "obfs-host=" + Base64.decode(cnt.split("obfsparam=")[1].split("&")[0].replace(/-/g, "+").replace(/_/g, "/")).split(",")[0].split("\u0000")[0] + ", " : ""
obfshost = cnt.split("obfsparam=")[1].split("&")[0] != "" ? "obfs-host=" + Base64.decode(cnt.split("obfsparam=")[1].split("&")[0].replace(/-/g, "+").replace(/_/g, "/")).split(",")[0].split("\u0000")[0] : ""
}
if (cnt.indexOf("protoparam=") != -1) {
oparam = cnt.split("protoparam=")[1].split("&")[0] != "" ? "ssr-protocol-param=" + Base64.decode(cnt.split("protoparam=")[1].split("&")[0].replace(/-/g, "+").replace(/_/g, "/")).split(",")[0].split("\u0000")[0] + ", " : ""
oparam = cnt.split("protoparam=")[1].split("&")[0] != "" ? "ssr-protocol-param=" + Base64.decode(cnt.split("protoparam=")[1].split("&")[0].replace(/-/g, "+").replace(/_/g, "/")).split(",")[0].split("\u0000")[0] : ""
}
tag = "tag=" + (Base64.decode(cnt.split("remarks=")[1].split("&")[0].replace(/-/g, "+").replace(/_/g, "/"))).split("\u0000")[0]
pudp = Pudp == 1 ? "udp-relay=true" : "udp-relay=false";
ptfo = Ptfo == 1 ? "fast-open=true" : "fast-open=false";
nssr.push(type + ip, pwd, mtd, obfs + obfshost + oparam + ssrp, pudp, ptfo, tag)
nssr.push(type + ip, pwd, mtd, obfs + obfshost, oparam, ssrp, pudp, ptfo, tag)
QX = nssr.filter(Boolean).join(", ")
} else { QX = "" }
return QX;