From f74aff6dbfefc4b6a91427c54b4fa8fcc44c42a5 Mon Sep 17 00:00:00 2001 From: Shawn Wen <45581750+KOP-XIAO@users.noreply.github.com> Date: Mon, 12 Jan 2026 11:58:36 +0800 Subject: [PATCH] Update resource-parser.js --- Scripts/resource-parser.js | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/Scripts/resource-parser.js b/Scripts/resource-parser.js index 0fa8ecd..9ec3538 100644 --- a/Scripts/resource-parser.js +++ b/Scripts/resource-parser.js @@ -1,5 +1,5 @@ /** -☑️ 资源解析器 ©𝐒𝐡𝐚𝐰𝐧 ⟦2026-01-09 16:25⟧ +☑️ 资源解析器 ©𝐒𝐡𝐚𝐰𝐧 ⟦2026-01-12 10:07⟧ ---------------------------------------------------------- 🛠 发现 𝐁𝐔𝐆 请反馈: https://t.me/ShawnKOP_Parser_Bot ⛳️ 关注 🆃🅶 相关频道: 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 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 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 update_link = {"open-url" : "https://apps.apple.com/us/app/quantumult-x/id1443988620", "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]; pwd = cnt.split("@")[0]? "password=" + cnt.split("@")[0]:""; 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("peer=") != -1? "obfs-host="+cnt.split("peer=")[1].split(/&|#/)[0]:thost + thost = cnt.indexOf("sni=") != -1? "tls-host="+cnt.split("sni=")[1].split(/&|#/)[0]:"" + 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 } else { // shadowrocket style 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("remark=") != -1 ? "tag=" + decodeURIComponent(cnt.split("remark=")[1].split("&")[0]) : tag } + puri = "" 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("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,"") + 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 if(cnt.indexOf("type=http") != -1) { obfs="obfs=http" } else if (cnt.indexOf("type=ws") != -1) { 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" - } - 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" } else if(cnt.indexOf("type=")!=-1 && cnt.indexOf("type=tcp")==-1) {//暂不支持类型 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"){ ptls13 = PTls13 == 1 ? "tls13=true" : "tls13=false" if (Pcert0 == 0) {