minor bug fixed

This commit is contained in:
Shawn
2021-10-23 22:03:24 +08:00
parent 72be96093e
commit 62978a1296

View File

@@ -1520,9 +1520,9 @@ function TJ2QX(subs, Pudp, Ptfo, Pcert0, PTls13) {
if (cnt.indexOf(":443") != -1) { if (cnt.indexOf(":443") != -1) {
ip = cnt.split("@")[1].split(":443")[0] + ":443"; ip = cnt.split("@")[1].split(":443")[0] + ":443";
} else { } else {
ip = cnt.split("@")[1].split("?")[0].split("\n")[0].trim(); //非 443 端口的奇葩机场? ip = cnt.split("@")[1].split("?")[0].split("\n")[0].split("#")[0].trim(); //非 443 端口的奇葩机场?
} }
pwd = "password=" + cnt.split("@")[0]; pwd = cnt.split("@")[0]? "password=" + decodeURIComponent(cnt.split("@")[0]):"";
obfs = "over-tls=true"; obfs = "over-tls=true";
pcert = cnt.indexOf("allowInsecure=0") != -1 ? "tls-verification=true" : "tls-verification=false"; pcert = cnt.indexOf("allowInsecure=0") != -1 ? "tls-verification=true" : "tls-verification=false";
thost = cnt.indexOf("sni=") != -1? "tls-host="+cnt.split("sni=")[1].split(/&|#/)[0]:"" thost = cnt.indexOf("sni=") != -1? "tls-host="+cnt.split("sni=")[1].split(/&|#/)[0]:""