mirror of
https://github.com/KOP-XIAO/QuantumultX.git
synced 2026-01-25 21:25:09 +00:00
bug fixed
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
☑️ 资源解析器 ©𝐒𝐡𝐚𝐰𝐧 ⟦2021-01-11 20:39⟧
|
☑️ 资源解析器 ©𝐒𝐡𝐚𝐰𝐧 ⟦2021-01-13 21:39⟧
|
||||||
----------------------------------------------------------
|
----------------------------------------------------------
|
||||||
🛠 发现 𝐁𝐔𝐆 请反馈: @Shawn_KOP_bot
|
🛠 发现 𝐁𝐔𝐆 请反馈: @Shawn_KOP_bot
|
||||||
⛳️ 关注 🆃🅶 相关频道: https://t.me/QuanX_API
|
⛳️ 关注 🆃🅶 相关频道: https://t.me/QuanX_API
|
||||||
@@ -204,10 +204,9 @@ function ResourceParse() {
|
|||||||
total = Subs2QX(Base64.decode(content0), Pudp0, Ptfo0, Pcert0, PTls13);
|
total = Subs2QX(Base64.decode(content0), Pudp0, Ptfo0, Pcert0, PTls13);
|
||||||
} else if (type0 == "Subs") {
|
} else if (type0 == "Subs") {
|
||||||
total = Subs2QX(content0, Pudp0, Ptfo0, Pcert0, PTls13);
|
total = Subs2QX(content0, Pudp0, Ptfo0, Pcert0, PTls13);
|
||||||
} else if (type0 == "QuanX" || type0 == "Clash") {
|
} else if (type0 == "QuanX" || type0 == "Clash" || type0 == "Surge") {
|
||||||
total = isQuanX(content0);
|
total = isQuanX(content0);
|
||||||
} else if (type0 == "Surge") {
|
total = Subs2QX(total.join("\n"), Pudp0, Ptfo0, Pcert0, PTls13);
|
||||||
total = Surge2QX(content0);
|
|
||||||
} else if (type0 == "sgmodule") { // surge module 模块/含 url-regex 的 rule-set
|
} else if (type0 == "sgmodule") { // surge module 模块/含 url-regex 的 rule-set
|
||||||
flag = 2
|
flag = 2
|
||||||
total = SGMD2QX(content0) // 转换
|
total = SGMD2QX(content0) // 转换
|
||||||
@@ -383,6 +382,7 @@ function Type_Check(subs) {
|
|||||||
type = "Subs" // QuanX list
|
type = "Subs" // QuanX list
|
||||||
} else if (subs.indexOf("[Proxy]") != -1) {
|
} else if (subs.indexOf("[Proxy]") != -1) {
|
||||||
type = "Surge"; // Surge Profiles
|
type = "Surge"; // Surge Profiles
|
||||||
|
content0 = Surge2QX(content0).join("\n");
|
||||||
} else if ((SurgeK.some(NodeCheck) && !/\[(Proxy|filter_local)\]/.test(subs)) || typeU == "list") {
|
} else if ((SurgeK.some(NodeCheck) && !/\[(Proxy|filter_local)\]/.test(subs)) || typeU == "list") {
|
||||||
type = "Subs" // Surge proxy list
|
type = "Subs" // Surge proxy list
|
||||||
} else if (subs.indexOf("[server_local]") != -1) {
|
} else if (subs.indexOf("[server_local]") != -1) {
|
||||||
@@ -1813,7 +1813,12 @@ function CV2QX(cnt) {
|
|||||||
ohost = cnt["ws-headers"]? "obfs-host=" + cnt["ws-headers"]["Host"] : ""
|
ohost = cnt["ws-headers"]? "obfs-host=" + cnt["ws-headers"]["Host"] : ""
|
||||||
ouri = cnt["ws-path"]? "obfs-uri="+cnt["ws-path"] : ""
|
ouri = cnt["ws-path"]? "obfs-uri="+cnt["ws-path"] : ""
|
||||||
cert = cnt["skip-cert-verify"] && cnt.tls ? "tls-verification=false" : ""
|
cert = cnt["skip-cert-verify"] && cnt.tls ? "tls-verification=false" : ""
|
||||||
if (Pcert0 == 0 && cnt.tls) {cert = "tls-verification=false"}
|
//$notify(cert)
|
||||||
|
if (Pcert0 == 1 && cnt.tls) {
|
||||||
|
cert = "tls-verification=true"
|
||||||
|
} else if (Pcert0 == 1 && cnt.tls) {
|
||||||
|
cert = "tls-verification=false"
|
||||||
|
}
|
||||||
node = "vmess="+[ipt, pwd, mtd, udp, tfo, obfs, ohost, ouri, cert, tag].filter(Boolean).join(", ")
|
node = "vmess="+[ipt, pwd, mtd, udp, tfo, obfs, ohost, ouri, cert, tag].filter(Boolean).join(", ")
|
||||||
//console.log(node)
|
//console.log(node)
|
||||||
return node
|
return node
|
||||||
@@ -1826,8 +1831,7 @@ function CT2QX(cnt) {
|
|||||||
pwd = "password=" + cnt.password
|
pwd = "password=" + cnt.password
|
||||||
otls = "over-tls=true"
|
otls = "over-tls=true"
|
||||||
cert = cnt["skip-cert-verify"] ? "tls-verification=false" : "tls-verification=true"
|
cert = cnt["skip-cert-verify"] ? "tls-verification=false" : "tls-verification=true"
|
||||||
if (Pcert0 == 0) {
|
cert = Pcert0 == 1 ? "tls-verification=true" : "tls-verification=false"
|
||||||
cert = "tls-verification=false" }
|
|
||||||
udp = cnt.udp ? "udp-relay=true" : "udp-relay=false"
|
udp = cnt.udp ? "udp-relay=true" : "udp-relay=false"
|
||||||
tfo = cnt.tfo ? "fast-open=true" : "fast-open=false"
|
tfo = cnt.tfo ? "fast-open=true" : "fast-open=false"
|
||||||
node = "trojan="+[ipt, pwd, otls, cert, udp, tfo, tag].filter(Boolean).join(", ")
|
node = "trojan="+[ipt, pwd, otls, cert, udp, tfo, tag].filter(Boolean).join(", ")
|
||||||
@@ -1844,7 +1848,11 @@ function CH2QX(cnt){
|
|||||||
pwd = cnt.password && typeof(cnt.password) == "string" ? "password=" + cnt.password : ""
|
pwd = cnt.password && typeof(cnt.password) == "string" ? "password=" + cnt.password : ""
|
||||||
tls = cnt.tls ? "over-tls=true" : ""
|
tls = cnt.tls ? "over-tls=true" : ""
|
||||||
cert = cnt["skip-cert-verify"] && cnt.tls ? "tls-verification=false" : ""
|
cert = cnt["skip-cert-verify"] && cnt.tls ? "tls-verification=false" : ""
|
||||||
if (Pcert0 == 0 && cnt.tls) { cert = "tls-verification=false" }
|
if (Pcert0 == 1 && cnt.tls) {
|
||||||
|
cert = "tls-verification=true"
|
||||||
|
} else if (Pcert0 == 1 && cnt.tls) {
|
||||||
|
cert = "tls-verification=false"
|
||||||
|
}
|
||||||
node = "http="+[ipt, uname, pwd, tls, cert, tag].filter(Boolean).join(", ")
|
node = "http="+[ipt, uname, pwd, tls, cert, tag].filter(Boolean).join(", ")
|
||||||
//console.log(node)
|
//console.log(node)
|
||||||
return node
|
return node
|
||||||
|
|||||||
Reference in New Issue
Block a user