mirror of
https://github.com/KOP-XIAO/QuantumultX.git
synced 2026-01-25 17:15:09 +00:00
minor bug fixed
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
☑️ 资源解析器 ©𝐒𝐡𝐚𝐰𝐧 ⟦2022-04-06 15:52⟧
|
||||
☑️ 资源解析器 ©𝐒𝐡𝐚𝐰𝐧 ⟦2022-04-12 09:52⟧
|
||||
----------------------------------------------------------
|
||||
🛠 发现 𝐁𝐔𝐆 请反馈: @ShawnKOP_bot
|
||||
⛳️ 关注 🆃🅶 相关频道: https://t.me/QuanX_API
|
||||
@@ -1318,7 +1318,7 @@ function HPS2QX(subs, Ptfo, Pcert0, PTls13) {
|
||||
var ipport = "http=" + server.split("@")[1].split("#")[0].split("/")[0];
|
||||
var uname = "username=" + server.split(":")[0];
|
||||
var pwd = "password=" + server.split("@")[0].split(":")[1];
|
||||
var tag = "tag=" + server.split("#")[1];
|
||||
var tag = "tag=" + decodeURIComponent(server.split("#")[1]);
|
||||
var tls = "over-tls=true";
|
||||
var cert = Pcert0 != 0 ? "tls-verification=true" : "tls-verification=false";
|
||||
var tfo = Ptfo == 1 ? "fast-open=true" : "fast-open=false";
|
||||
@@ -2269,7 +2269,7 @@ function LoonSSR2QX(cnt) {
|
||||
function YAMLFix(cnt){
|
||||
cnt = cnt.replace(/\[/g,"yaml@bug1")
|
||||
if (cnt.indexOf("{") != -1 && /\{\s*name/.test(cnt)){
|
||||
cnt = cnt.replace(/(^|\n)- /g, "$1 - ").replace(/ - /g," - ").replace(/:(?!\s)/g,": ").replace(/\,\"/g,", \"").replace(/: {/g, ": {, ").replace(/, (Host|host|path|tls|mux|skip)/g,", $1")
|
||||
cnt = cnt.replace(/(^|\n)- /g, "$1 - ").replace(/ - /g," - ").replace(/:(?!\s)/g,": ").replace(/\,\"/g,", \"").replace(/: {/g, ": {, ").replace(/, (Host|host|path|mux)/g,", $1") //2022-04-11 remove tls|skip from replace(/, (Host|host|path|mux)/g,", $1")
|
||||
//console.log(cnt)
|
||||
cnt = cnt.replace(/{\s*name: /g,"{name: \"").replace(/, server:/g,"\", server:")
|
||||
cnt = cnt.replace(/{|}/g,"").replace(/,/g,"\n ")
|
||||
|
||||
Reference in New Issue
Block a user