mirror of
https://github.com/KOP-XIAO/QuantumultX.git
synced 2026-01-25 13:05:10 +00:00
Update resource-parser.js
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
☑️ 资源解析器 ©𝐒𝐡𝐚𝐰𝐧 ⟦2026-01-09 16:25⟧
|
☑️ 资源解析器 ©𝐒𝐡𝐚𝐰𝐧 ⟦2026-01-12 10:07⟧
|
||||||
----------------------------------------------------------
|
----------------------------------------------------------
|
||||||
🛠 发现 𝐁𝐔𝐆 请反馈: https://t.me/ShawnKOP_Parser_Bot
|
🛠 发现 𝐁𝐔𝐆 请反馈: https://t.me/ShawnKOP_Parser_Bot
|
||||||
⛳️ 关注 🆃🅶 相关频道: https://t.me/QuanX_API
|
⛳️ 关注 🆃🅶 相关频道: https://t.me/QuanX_API
|
||||||
@@ -149,7 +149,7 @@ const rwrite_link = { "open-url": link1, "media-url": "https://shrtm.nu/x3o2" }
|
|||||||
const rwhost_link = { "open-url": link1, "media-url": "https://shrtm.nu/0n5J" } // hostname filter link
|
const rwhost_link = { "open-url": link1, "media-url": "https://shrtm.nu/0n5J" } // hostname filter link
|
||||||
const rule_link = { "open-url": link1, "media-url": "https://shrtm.nu/cpHD" } // rule filter link
|
const rule_link = { "open-url": link1, "media-url": "https://shrtm.nu/cpHD" } // rule filter link
|
||||||
const nan_link = { "open-url": link1, "media-url": qxpng } // nan error link
|
const nan_link = { "open-url": link1, "media-url": qxpng } // nan error link
|
||||||
const bug_link = { "open-url": "https://t.me/Shawn_Parser_Bot", "media-url": "https://shrtm.nu/obcB" } // bug link
|
const bug_link = { "open-url": "https://t.me/ShawnKOP_Parser_Bot", "media-url": "https://shrtm.nu/obcB" } // bug link
|
||||||
const sub_link = { "open-url": link1, "media-url": "https://shrtm.nu/ebAr" } // server link
|
const sub_link = { "open-url": link1, "media-url": "https://shrtm.nu/ebAr" } // server link
|
||||||
const update_link = {"open-url" : "https://apps.apple.com/us/app/quantumult-x/id1443988620", "media-url": qxpng}
|
const update_link = {"open-url" : "https://apps.apple.com/us/app/quantumult-x/id1443988620", "media-url": qxpng}
|
||||||
const plink0 = {"open-url" : link0, "media-url": qxpng} // 跳转订阅链接
|
const plink0 = {"open-url" : link0, "media-url": qxpng} // 跳转订阅链接
|
||||||
@@ -2116,8 +2116,8 @@ function VL2QX(subs, Pudp, Ptfo, Pcert0, PTls13) {
|
|||||||
ip = cnt.split("@")[1].split("encry")[0].split("?")[0];
|
ip = cnt.split("@")[1].split("encry")[0].split("?")[0];
|
||||||
pwd = cnt.split("@")[0]? "password=" + cnt.split("@")[0]:"";
|
pwd = cnt.split("@")[0]? "password=" + cnt.split("@")[0]:"";
|
||||||
pcert = cnt.indexOf("allowInsecure=0") != -1 ? "tls-verification=true" : "tls-verification=false";
|
pcert = cnt.indexOf("allowInsecure=0") != -1 ? "tls-verification=true" : "tls-verification=false";
|
||||||
thost = cnt.indexOf("sni=") != -1? "obfs-host="+cnt.split("sni=")[1].split(/&|#/)[0]:""
|
thost = cnt.indexOf("sni=") != -1? "tls-host="+cnt.split("sni=")[1].split(/&|#/)[0]:""
|
||||||
thost = cnt.indexOf("peer=") != -1? "obfs-host="+cnt.split("peer=")[1].split(/&|#/)[0]:thost
|
thost = cnt.indexOf("peer=") != -1? "tls-host="+cnt.split("peer=")[1].split(/&|#/)[0]:thost
|
||||||
tag = cnt.indexOf("#") != -1 ? "tag=" + decodeURIComponent(cnt.split("#").slice(-1)[0]) : "tag= [vless]" + ip
|
tag = cnt.indexOf("#") != -1 ? "tag=" + decodeURIComponent(cnt.split("#").slice(-1)[0]) : "tag= [vless]" + ip
|
||||||
} else { // shadowrocket style
|
} else { // shadowrocket style
|
||||||
typeU = "SR-URI"
|
typeU = "SR-URI"
|
||||||
@@ -2127,6 +2127,7 @@ function VL2QX(subs, Pudp, Ptfo, Pcert0, PTls13) {
|
|||||||
tag = cnt.indexOf("remarks=") != -1 ? "tag=" + decodeURIComponent(cnt.split("remarks=")[1].split("&")[0]) : "tag= [vless]" + ip
|
tag = cnt.indexOf("remarks=") != -1 ? "tag=" + decodeURIComponent(cnt.split("remarks=")[1].split("&")[0]) : "tag= [vless]" + ip
|
||||||
tag = cnt.indexOf("remark=") != -1 ? "tag=" + decodeURIComponent(cnt.split("remark=")[1].split("&")[0]) : tag
|
tag = cnt.indexOf("remark=") != -1 ? "tag=" + decodeURIComponent(cnt.split("remark=")[1].split("&")[0]) : tag
|
||||||
}
|
}
|
||||||
|
|
||||||
puri = ""
|
puri = ""
|
||||||
|
|
||||||
pudp = (Pudp == 1 || cnt.indexOf("udp=1")!=-1) ? "udp-relay=true" : "udp-relay=false";
|
pudp = (Pudp == 1 || cnt.indexOf("udp=1")!=-1) ? "udp-relay=true" : "udp-relay=false";
|
||||||
@@ -2145,24 +2146,24 @@ function VL2QX(subs, Pudp, Ptfo, Pcert0, PTls13) {
|
|||||||
thost=cnt.indexOf("obfsParam=") == -1? thost : "obfs-host=" + decodeURIComponent(cnt.split("obfsParam=")[1].split("&")[0].split("#")[0]).replace(/\"|(Host\":)|\{|\}/g,"")
|
thost=cnt.indexOf("obfsParam=") == -1? thost : "obfs-host=" + decodeURIComponent(cnt.split("obfsParam=")[1].split("&")[0].split("#")[0]).replace(/\"|(Host\":)|\{|\}/g,"")
|
||||||
thost=cnt.indexOf("sni=") == -1? thost : "obfs-host=" + decodeURIComponent(cnt.split("sni=")[1].split("&")[0].split("#")[0]).replace(/\"|(Host\":)|\{|\}/g,"")
|
thost=cnt.indexOf("sni=") == -1? thost : "obfs-host=" + decodeURIComponent(cnt.split("sni=")[1].split("&")[0].split("#")[0]).replace(/\"|(Host\":)|\{|\}/g,"")
|
||||||
thost=cnt.indexOf("peer=") == -1? thost : "obfs-host=" + decodeURIComponent(cnt.split("peer=")[1].split("&")[0].split("#")[0]).replace(/\"|(Host\":)|\{|\}/g,"")
|
thost=cnt.indexOf("peer=") == -1? thost : "obfs-host=" + decodeURIComponent(cnt.split("peer=")[1].split("&")[0].split("#")[0]).replace(/\"|(Host\":)|\{|\}/g,"")
|
||||||
|
|
||||||
puri = cnt.indexOf("path=") == -1? puri : "obfs-uri=" + decodeURIComponent(cnt.split("path=")[1].split("&")[0].split("#")[0])
|
puri = cnt.indexOf("path=") == -1? puri : "obfs-uri=" + decodeURIComponent(cnt.split("path=")[1].split("&")[0].split("#")[0])
|
||||||
} else if (cnt.indexOf("&type=ws")!=-1 || cnt.indexOf("?type=ws")!=-1 || cnt.indexOf("type=http")!=-1 || cnt.indexOf("security=tls")!=-1 || cnt.indexOf("security=reality")!=-1) {//v2rayN uri
|
} else if (cnt.indexOf("&type=ws")!=-1 || cnt.indexOf("?type=ws")!=-1 || cnt.indexOf("type=http")!=-1 || cnt.indexOf("security=tls")!=-1 || cnt.indexOf("security=reality")!=-1) {//v2rayN uri
|
||||||
if(cnt.indexOf("type=http") != -1) {
|
if(cnt.indexOf("type=http") != -1) {
|
||||||
obfs="obfs=http"
|
obfs="obfs=http"
|
||||||
} else if (cnt.indexOf("type=ws") != -1) {
|
} else if (cnt.indexOf("type=ws") != -1) {
|
||||||
obfs = cnt.indexOf("security=tls") != -1 || cnt.indexOf("security=reality")!=-1? "obfs=wss" : "obfs=ws"
|
obfs = cnt.indexOf("security=tls") != -1 || cnt.indexOf("security=reality")!=-1? "obfs=wss" : "obfs=ws"
|
||||||
} else if(cnt.indexOf("security=tls")!=-1 || cnt.indexOf("security=reality")!=-1) {
|
} else if(cnt.indexOf("type=")==-1 || cnt.indexOf("type=tcp")!=-1) {
|
||||||
obfs = "obfs=over-tls"
|
obfs = "obfs=over-tls"
|
||||||
}
|
|
||||||
thost=cnt.indexOf("&host=") == -1? thost : "obfs-host=" + decodeURIComponent(cnt.split("&host=")[1].split("&")[0].split("#")[0])
|
|
||||||
thost=cnt.indexOf("sni=") == -1? thost : "obfs-host=" + decodeURIComponent(cnt.split("sni=")[1].split("&")[0].split("#")[0]).replace(/\"|(Host\":)|\{|\}/g,"")
|
|
||||||
thost = cnt.indexOf("peer=") != -1? "obfs-host="+cnt.split("peer=")[1].split(/&|#/)[0]:thost
|
|
||||||
puri = cnt.indexOf("&path=") == -1? puri : "obfs-uri=" + decodeURIComponent(cnt.split("&path=")[1].split("&")[0].split("#")[0])
|
|
||||||
} else if(cnt.indexOf("security=xtls")!=-1) { //暂不支持类型
|
} else if(cnt.indexOf("security=xtls")!=-1) { //暂不支持类型
|
||||||
type="NS"
|
type="NS"
|
||||||
} else if(cnt.indexOf("type=")!=-1 && cnt.indexOf("type=tcp")==-1) {//暂不支持类型
|
} else if(cnt.indexOf("type=")!=-1 && cnt.indexOf("type=tcp")==-1) {//暂不支持类型
|
||||||
type="NS"
|
type="NS"
|
||||||
}
|
}
|
||||||
|
thost=cnt.indexOf("&host=") == -1? thost : "obfs-host=" + decodeURIComponent(cnt.split("&host=")[1].split("&")[0].split("#")[0])
|
||||||
|
thost=cnt.indexOf("sni=") == -1? thost : "obfs-host=" + decodeURIComponent(cnt.split("sni=")[1].split("&")[0].split("#")[0]).replace(/\"|(Host\":)|\{|\}/g,"")
|
||||||
|
puri = cnt.indexOf("&path=") == -1? puri : "obfs-uri=" + decodeURIComponent(cnt.split("&path=")[1].split("&")[0].split("#")[0])
|
||||||
|
}
|
||||||
if(obfs=="obfs=wss" && obfs=="obfs=over-tls"){
|
if(obfs=="obfs=wss" && obfs=="obfs=over-tls"){
|
||||||
ptls13 = PTls13 == 1 ? "tls13=true" : "tls13=false"
|
ptls13 = PTls13 == 1 ? "tls13=true" : "tls13=false"
|
||||||
if (Pcert0 == 0) {
|
if (Pcert0 == 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user