auto aead

This commit is contained in:
Shawn
2022-03-02 13:39:09 +08:00
parent a4f6e3fa13
commit 9f39a0ddb4

View File

@@ -1,5 +1,5 @@
/**
☑️ 资源解析器 ©𝐒𝐡𝐚𝐰𝐧 ⟦2022-03-01 20:35⟧
☑️ 资源解析器 ©𝐒𝐡𝐚𝐰𝐧 ⟦2022-03-02 13:45⟧
----------------------------------------------------------
🛠 发现 𝐁𝐔𝐆 请反馈: @ShawnKOP_bot
⛳️ 关注 🆃🅶 相关频道: https://t.me/QuanX_API
@@ -15,7 +15,7 @@
----------------------------------------------------------
0⃣ 在 ⟦订阅链接⟧ 后加 "#" 使用, 不同参数用 "&" 连接
⚠️ ☞ “你的订阅连接”#emoji=1&tfo=1&in=香港+台湾
❖ 本地资源片段引用, 请将参数如 "#𝗶𝗻=𝘅𝘅𝘅." 填入文件第 ① 行
❖ 本地资源片段引用, 请将参数如 "#in=𝘅𝘅𝘅&out=yyy" 填入文件第 ① 行
❖ 🚦 支持中文, "操作" 以下特殊字符时请先替换 🚦
∎ "+"⇒"%2B", 空格⇒"%20", "@"⇒"%40", "&"⇒"%26", "."⇒"\."
@@ -1362,7 +1362,10 @@ function VR2QX(subs, Pudp, Ptfo, Pcert0, PTls13) {
var tls13 = PTls13 == 1 ? "tls13=true, " : ""
obfs = obfs + cert + tls13
}
node = node + obfs + tag
if (subs.indexOf("alterId=") != -1) {
caead = Number(subs.split("alterId=")[1].split("&")[0]) != 0 ? "aead=false, " : ""
}
node = node + obfs +caead+ tag
return node
}
@@ -1388,10 +1391,11 @@ function V2QX(subs, Pudp, Ptfo, Pcert0, PTls13) {
udp = Pudp == 1 ? "udp-relay=false" : "udp-relay=false";
tfo = Ptfo == 1 ? "fast-open=true" : "fast-open=false";
obfs = Pobfs(ss, cert, tls13);
caead = ss.aid && ss.aid != "0" ? "aead=false" : "aead=true"; //aead 选项
if (obfs == "" || obfs == undefined) {
nss.push(ip, mtd, pwd, tfo, udp, tag)
nss.push(ip, mtd, pwd, tfo, udp, caead, tag)
} else if(obfs != "NOT-SUPPORTTED"){
nss.push(ip, mtd, pwd, obfs, tfo, udp, tag);
nss.push(ip, mtd, pwd, obfs, tfo, udp, caead, tag);
}
QX = nss.join(", ");
}