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-03-30 09:20⟧
|
☑️ 资源解析器 ©𝐒𝐡𝐚𝐰𝐧 ⟦2021-03-31 12:20⟧
|
||||||
----------------------------------------------------------
|
----------------------------------------------------------
|
||||||
🛠 发现 𝐁𝐔𝐆 请反馈: @Shawn_KOP_bot
|
🛠 发现 𝐁𝐔𝐆 请反馈: @Shawn_KOP_bot
|
||||||
⛳️ 关注 🆃🅶 相关频道: https://t.me/QuanX_API
|
⛳️ 关注 🆃🅶 相关频道: https://t.me/QuanX_API
|
||||||
@@ -1140,27 +1140,32 @@ function VR2QX(subs, Pudp, Ptfo, Pcert, Ptls13) {
|
|||||||
|
|
||||||
//V2RayN uri转换成 QUANX 格式
|
//V2RayN uri转换成 QUANX 格式
|
||||||
function V2QX(subs, Pudp, Ptfo, Pcert, Ptls13) {
|
function V2QX(subs, Pudp, Ptfo, Pcert, Ptls13) {
|
||||||
var cert = Pcert
|
var cert = Pcert
|
||||||
var tls13 = Ptls13
|
var tls13 = Ptls13
|
||||||
var server = String(Base64.decode(subs.replace("vmess://", "")).trim()).split("\u0000")[0];
|
var server = String(Base64.decode(subs.replace("vmess://", "")).trim()).split("\u0000")[0];
|
||||||
var nss = [];
|
var nss = [];
|
||||||
if (server != "") {
|
if (server != "") {
|
||||||
ss = JSON.parse(server);
|
ss = JSON.parse(server);
|
||||||
ip = "vmess=" + ss.add + ":" + ss.port;
|
ip = "vmess=" + ss.add + ":" + ss.port;
|
||||||
pwd = "password=" + ss.id;
|
pwd = "password=" + ss.id;
|
||||||
mtd = "method=aes-128-gcm"
|
|
||||||
tag = "tag=" + decodeURIComponent(ss.ps);
|
mtd = "method=aes-128-gcm"
|
||||||
udp = Pudp == 1 ? "udp-relay=true" : "udp-relay=false";
|
try {
|
||||||
tfo = Ptfo == 1 ? "fast-open=true" : "fast-open=false";
|
tag = "tag=" + decodeURIComponent(ss.ps);
|
||||||
obfs = Pobfs(ss, cert, tls13);
|
} catch (e) {
|
||||||
if (obfs == "" || obfs == undefined) {
|
tag = "tag=" + ss.ps;
|
||||||
nss.push(ip, mtd, pwd, tfo, udp, tag)
|
|
||||||
} else if(obfs != "NOT-SUPPORTTED"){
|
|
||||||
nss.push(ip, mtd, pwd, obfs, tfo, udp, tag);
|
|
||||||
}
|
|
||||||
QX = nss.join(", ");
|
|
||||||
}
|
}
|
||||||
return QX
|
udp = Pudp == 1 ? "udp-relay=true" : "udp-relay=false";
|
||||||
|
tfo = Ptfo == 1 ? "fast-open=true" : "fast-open=false";
|
||||||
|
obfs = Pobfs(ss, cert, tls13);
|
||||||
|
if (obfs == "" || obfs == undefined) {
|
||||||
|
nss.push(ip, mtd, pwd, tfo, udp, tag)
|
||||||
|
} else if(obfs != "NOT-SUPPORTTED"){
|
||||||
|
nss.push(ip, mtd, pwd, obfs, tfo, udp, tag);
|
||||||
|
}
|
||||||
|
QX = nss.join(", ");
|
||||||
|
}
|
||||||
|
return QX
|
||||||
}
|
}
|
||||||
|
|
||||||
// Vmess obfs 参数
|
// Vmess obfs 参数
|
||||||
|
|||||||
Reference in New Issue
Block a user