From 865f980036f204590d80a5efd89748978cf6b40c Mon Sep 17 00:00:00 2001 From: Shawn Wen <45581750+KOP-XIAO@users.noreply.github.com> Date: Thu, 29 Jan 2026 18:10:12 +0800 Subject: [PATCH] haha --- .DS_Store | Bin 14340 -> 14340 bytes Scripts/resource-parser.js | 28 ++++++++++++++++++---------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/.DS_Store b/.DS_Store index a1b33bc8da69bdb941f068270dfbd5f2c3529dd9..08284990f0a7114f7fc55b67df80ceaa6aab29b4 100644 GIT binary patch delta 711 zcmeIvzfV(90LAfh`YOHeHECV~p|=mx76=mt3M~f3Hf=1rfHazzs03nxV6oUo#2CQ_ z1_o1Wmm7b@t`5Y-@RlZo#0>|RY6mA46XPJW3la$|y6_jUo=?v7UANcm4`2MOsjvP; zuUuJ)4#v)gqeFx0s%&FP&C3vfE)VcpE>ru#_a3Bxd9e$tQC zN?2(jO!dnOtU@4wPQ-8#8QjDS9-)jEc!>>cqK1$7j5>Dl9Y67#prDVEL5A4LE_Sn* zeeCA|V~jJwBvZV^QI2t(8D8UUPH>V_yu*3sd7lN^e9UD&VUeqR$`YH)e9j7A@ipJ@ zEvtOTO%(}-=%`Hap34JgJ2*n+4O>&gKehn4(Th3cu(VJ}r?dG&_HYx$)Wfm;%1-Kk ppE=R(yZzUv3k&w)2S~0#?R7|}8a^kSy6iX&@Na+=9Z%$s=P&c2q^SS^ delta 428 zcmZoEXeromNt|)}h1~-Qamf{jv$-#L=Ok6^e%Yw^_Qy`O5faQv$xP+LEEf<#ngTM(+ zh^&;Ylrsm100)P%g9ZZ_gk)#trA+=QQY@Xyn8ujSSio4wSj= 771? par // 0/1 代表关闭 session-ticket/reuse,2 表示全部关闭。 var Pmix = version>=844? 1 : 0 // allow rewrite and filter mix from version 844 var Pjsonjq = version>=845? 0 : 1 // allow jsonjq from version 845 +var PNS=0 // 不支持的节点统计 var RegoutList= [] ;//用于 regout参数删选提醒 // URL-Scheme 增加配置 @@ -431,7 +432,7 @@ function ResourceParse() { total = total.length<100? total.filter( (ele,pos)=>total.indexOf(ele) == pos) : total total = total.join("\n") } else if (content0.trim() == "") { - $notify("‼️ 引用" + "⟦" + subtag + "⟧" + " 返回內容为空", "⁉️ 点通知跳转以确认链接是否失效", para.split("#")[0], nan_link); + $notify("‼️ 当前引用" + "⟦" + subtag + "⟧" + " 返回內容为空", "⁉️ 点通知跳转以确认链接是否失效", "如确认链接有效,请在链接后添加 ?flag=shadowrocket 或 &flag=shadowrocket ", nan_link); flag = 0; } else if (type0 == "sub-http") { let url = VCheck(String(Base64.decode(content0.split("sub://")[1].split("#")[0])+", opt-parser=true, tag="+(new Date()).getTime())) @@ -499,8 +500,9 @@ function ResourceParse() { //$notify("before","haha",total) total = TagCheck_QX(total).join("\n") //节点名检查 if (PUOT==1) { total = total.split("\n").map(UOT).join("\n")} - if (Pcnt == 1) {$notify("⟦" + subtag + "⟧"+"解析后最终返回内容" , "节点数量: " +total.split("\n").length, total)} + if (Pcnt == 1 && total!=undefined) {$notify("⟦" + subtag + "⟧"+"解析后最终返回内容" , "节点数量: " +total.split("\n").length, total)} total = PRelay==""? Base64.encode(total) : ServerRelay(total.split("\n"),PRelay) //强制节点类型 base64 加密后再导入 Quantumult X, 如果是relay,则转换成分流类型 + if (PNS !=0) {$notify("⚠️ 存在Quantumult X不支持的节点类型", "⚠️ 已忽略相关节点数,共计:"+PNS+" 条", "⚠️ 当前版本不支持 HY2,Anytls 等类型")} if(Pflow==1) { //$notify("添加流量信息","xxx","xxxx") $done({ content: total, info: {bytes_used: 3073741824, bytes_remaining: 2147483648, expire_date: 1854193966}}); @@ -508,6 +510,7 @@ function ResourceParse() { } else { $done({ content: total });} } else { if(Perror == 0) { + if (PNS !=0) {$notify("⚠️ 存在Quantumult X不支持的节点类型", "⚠️ 已忽略相关节点数,共计:"+PNS+" 条", "⚠️ 当前版本不支持 HY2,Anytls 等类型")} $notify("❓❓ 友情提示 ➟ "+ "⟦" + subtag + "⟧", "⚠️⚠️ 解析后无有效内容", "🚥🚥 请自行检查相关参数, 或者点击通知跳转并发送链接反馈", bug_link) } total = errornode @@ -520,7 +523,7 @@ function ResourceParse() { total = content0 $done({ content: content0 }) } - if (Pcnt == 1 && flag !=1) {$notify("解析后最终返回内容" , "总数量: " +total.split("\n").length, total)} + if (Pcnt == 1 && flag !=1 && total!=undefined) {$notify("解析后最终返回内容" , "总数量: " +total.split("\n").length, total)} return total } @@ -1641,7 +1644,7 @@ function Subs2QX(subs, Pudp, Ptfo, Pcert0, PTls13) { } } else if (type == "vless" && version<821) { Perror = 1 ; // 无需反馈 - $notify("⚠️ 你的 Quantumult X 版本暂未支持 Vless 节点","请 ⚠️不要⚠️ 跑来 解析器🤖️ 反馈",list0[i]) + $notify("⚠️ 你的 Quantumult X 版本暂未支持 Vless 节点","请更新app到最新版本",list0[i]) } else if (type == "vless" ) { // version 150 support vless node=VL2QX(list0[i], Pudp, Ptfo, Pcert0, PTls13) } else if (QuanXK.some(NodeCheck1)) { // QuanX type @@ -1650,7 +1653,9 @@ function Subs2QX(subs, Pudp, Ptfo, Pcert0, PTls13) { node = QX_TLS(Surge2QX(list0[i])[0], Pcert0, PTls13) } else if (LoonK.some(NodeCheck)) { // Loon type node = Loon2QX(list0[i]) - } + } else if (type=="hysteria2" || type=="anytls") { // + PNS=PNS+1 + } if (Pdbg) {$notify(i, type, node)} } catch (e) { failedList.push(`<<<\nContent: ${list0[i]}\nError: ${e}`) @@ -1922,6 +1927,8 @@ function V2QX(subs, Pudp, Ptfo, Pcert0, PTls13) { nss.push(ip, mtd, pwd, tfo, udp, caead, tag) } else if(obfs != "NOT-SUPPORTTED"){ nss.push(ip, mtd, pwd, obfs, tfo, udp, caead, tag); + } else if(obfs == "NOT-SUPPORTTED"){ + PNS=PNS+1 } QX = nss.join(", "); } @@ -2142,7 +2149,9 @@ function VL2QX(subs, Pudp, Ptfo, Pcert0, PTls13) { obfs = "obfs=http" } else if(cnt.indexOf("obfs=websocket")!=-1) { obfs = cnt.indexOf("tls=1") != -1? "obfs=wss" : "obfs=ws" - } + } else { //不支持类型 + type="NS" + } 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,"") @@ -2155,9 +2164,7 @@ function VL2QX(subs, Pudp, Ptfo, Pcert0, PTls13) { obfs = cnt.indexOf("security=tls") != -1 || cnt.indexOf("security=reality")!=-1? "obfs=wss" : "obfs=ws" } else if(cnt.indexOf("type=")==-1 || cnt.indexOf("type=tcp")!=-1) { obfs = "obfs=over-tls" - } else if(cnt.indexOf("security=xtls")!=-1) { //暂不支持类型 - 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" } thost=cnt.indexOf("&host=") == -1? thost : "obfs-host=" + decodeURIComponent(cnt.split("&host=")[1].split("&")[0].split("#")[0]) @@ -2179,6 +2186,7 @@ if(obfs=="obfs=wss" && obfs=="obfs=over-tls"){ prlt= version>=891? Reality_Handle(cnt) : "" nvless.push(type + ip, pwd, mtd, obfs, pcert, thost, puri, pudp, ptfo, prlt, tag) QX = type!="NS"? nvless.filter(Boolean).join(", ") : "" + PNS= type=="NS"? PNS+1 : PNS return QX }