mirror of
https://github.com/KOP-XIAO/QuantumultX.git
synced 2026-01-25 21:25:09 +00:00
tag参数
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
☑️ 资源解析器 ©𝐒𝐡𝐚𝐰𝐧 ⟦2021-03-27 00:19⟧
|
☑️ 资源解析器 ©𝐒𝐡𝐚𝐰𝐧 ⟦2021-03-28 11:39⟧
|
||||||
----------------------------------------------------------
|
----------------------------------------------------------
|
||||||
🛠 发现 𝐁𝐔𝐆 请反馈: @Shawn_KOP_bot
|
🛠 发现 𝐁𝐔𝐆 请反馈: @Shawn_KOP_bot
|
||||||
⛳️ 关注 🆃🅶 相关频道: https://t.me/QuanX_API
|
⛳️ 关注 🆃🅶 相关频道: https://t.me/QuanX_API
|
||||||
@@ -566,6 +566,12 @@ function getnode_emoji(item,ind){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 用于单条 URI 的 tag 参数, 直接指定节点名
|
||||||
|
function URI_TAG(cnt0,tag0) {
|
||||||
|
cnt0 = cnt0.split("tag=")[0] + "tag=" + tag0
|
||||||
|
return cnt0
|
||||||
|
}
|
||||||
|
|
||||||
// 用于某些奇葩用户不使用 raw 链接的问题
|
// 用于某些奇葩用户不使用 raw 链接的问题
|
||||||
function rawtest(cnt) {
|
function rawtest(cnt) {
|
||||||
var Preg0 = RegExp(".*js-file-line\".*?\<\/td\>", "i")
|
var Preg0 = RegExp(".*js-file-line\".*?\<\/td\>", "i")
|
||||||
@@ -958,6 +964,8 @@ function Subs2QX(subs, Pudp, Ptfo, Pcert, Ptls13) {
|
|||||||
if (list0[i].trim().length > 3 && !/\;|\/|\#/.test(list0[i][0])) {
|
if (list0[i].trim().length > 3 && !/\;|\/|\#/.test(list0[i][0])) {
|
||||||
var type = list0[i].split("://")[0].trim()
|
var type = list0[i].split("://")[0].trim()
|
||||||
var listi = list0[i].replace(/ /g, "")
|
var listi = list0[i].replace(/ /g, "")
|
||||||
|
var tag0 = list0[i].indexOf("tag=")!=-1 ? list0[i].split(/\&*(emoji|udp|tf0|cert|rename|replace)\=/)[0].split("tag=")[1] : ""
|
||||||
|
list0[i] = (type == "vmess" || type=="ssr") ? list0[i].split("#")[0] : list0[i]
|
||||||
const NodeCheck = (item) => listi.toLowerCase().indexOf(item) != -1;
|
const NodeCheck = (item) => listi.toLowerCase().indexOf(item) != -1;
|
||||||
try {
|
try {
|
||||||
if (type == "vmess" && list0[i].indexOf("remarks=") == -1) {
|
if (type == "vmess" && list0[i].indexOf("remarks=") == -1) {
|
||||||
@@ -967,23 +975,30 @@ function Subs2QX(subs, Pudp, Ptfo, Pcert, Ptls13) {
|
|||||||
} else { //quantumult 类型
|
} else { //quantumult 类型
|
||||||
node = VQ2QX(list0[i], Pudp, Ptfo, Pcert, Ptls13)
|
node = VQ2QX(list0[i], Pudp, Ptfo, Pcert, Ptls13)
|
||||||
}
|
}
|
||||||
|
node = tag0 != "" ? URI_TAG(node, tag0) : node
|
||||||
} else if (type == "vmess" && list0[i].indexOf("remarks=") != -1) { //shadowrocket 类型
|
} else if (type == "vmess" && list0[i].indexOf("remarks=") != -1) { //shadowrocket 类型
|
||||||
node = VR2QX(list0[i], Pudp, Ptfo, Pcert, Ptls13)
|
node = VR2QX(list0[i], Pudp, Ptfo, Pcert, Ptls13)
|
||||||
|
node = tag0 != "" ? URI_TAG(node, tag0) : node
|
||||||
} else if (type == "ssr") {
|
} else if (type == "ssr") {
|
||||||
node = SSR2QX(list0[i], Pudp, Ptfo)
|
node = SSR2QX(list0[i], Pudp, Ptfo)
|
||||||
|
node = tag0 != "" ? URI_TAG(node, tag0) : node
|
||||||
} else if (type == "ss") {
|
} else if (type == "ss") {
|
||||||
node = SS2QX(list0[i], Pudp, Ptfo)
|
node = SS2QX(list0[i], Pudp, Ptfo)
|
||||||
|
node = tag0 != "" ? URI_TAG(node, tag0) : node
|
||||||
} else if (type == "ssd") {
|
} else if (type == "ssd") {
|
||||||
node = SSD2QX(list0[i], Pudp, Ptfo)
|
node = SSD2QX(list0[i], Pudp, Ptfo)
|
||||||
} else if (type == "trojan") {
|
} else if (type == "trojan") {
|
||||||
node = TJ2QX(list0[i], Pudp, Ptfo, Pcert, Ptls13)
|
node = TJ2QX(list0[i], Pudp, Ptfo, Pcert, Ptls13)
|
||||||
|
node = tag0 != "" ? URI_TAG(node, tag0) : node
|
||||||
} else if (type == "https" && list0[i].indexOf(",") == -1) {
|
} else if (type == "https" && list0[i].indexOf(",") == -1) {
|
||||||
if (listi.indexOf("@") != -1) {
|
if (listi.indexOf("@") != -1) {
|
||||||
node = HPS2QX(list0[i], Ptfo, Pcert, Ptls13)
|
node = HPS2QX(list0[i], Ptfo, Pcert, Ptls13)
|
||||||
|
node = tag0 != "" ? URI_TAG(node, tag0) : node
|
||||||
} else {
|
} else {
|
||||||
var listh = Base64.decode(listi.split("https://")[1].split("#")[0])
|
var listh = Base64.decode(listi.split("https://")[1].split("#")[0])
|
||||||
listh = "https://" + listh + "#" + listi.split("https://")[1].split("#")[1]
|
listh = "https://" + listh + "#" + listi.split("https://")[1].split("#")[1]
|
||||||
node = HPS2QX(listh, Ptfo, Pcert, Ptls13)
|
node = HPS2QX(listh, Ptfo, Pcert, Ptls13)
|
||||||
|
node = tag0 != "" ? URI_TAG(node, tag0) : node
|
||||||
}
|
}
|
||||||
} else if (QuanXK.some(NodeCheck)) {
|
} else if (QuanXK.some(NodeCheck)) {
|
||||||
node = QX_TLS(isQuanX(list0[i])[0])
|
node = QX_TLS(isQuanX(list0[i])[0])
|
||||||
|
|||||||
Reference in New Issue
Block a user