diff --git a/Scripts/resource-parser.js b/Scripts/resource-parser.js index b84d869..cf1f5fd 100644 --- a/Scripts/resource-parser.js +++ b/Scripts/resource-parser.js @@ -1,5 +1,5 @@ /** -☑️ 资源解析器 ©𝐒𝐡𝐚𝐰𝐧 ⟦2022-06-20 21:30⟧ +☑️ 资源解析器 ©𝐒𝐡𝐚𝐰𝐧 ⟦2022-06-23 16:30⟧ ---------------------------------------------------------- 🛠 发现 𝐁𝐔𝐆 请反馈: https://t.me/Shawn_Parser_Bot ⛳️ 关注 🆃🅶 相关频道: https://t.me/QuanX_API @@ -403,6 +403,7 @@ function ResourceParse() { total = QXSort(total, Psort0); } total = para1.indexOf("node_index_prefix")!=-1 ?index_handle(total):total // 节点序号操作 + //$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)} @@ -1388,9 +1389,10 @@ function QX_TLS(cnt,Pcert0,PTls13) { cnt =cnt.replace(/tag\s*\=/gm,"tag=") // var cert0 = Pcert0 == 1? "tls-verification=true, " : "tls-verification=false, " var tls13 = PTls13 == 1? "tls13=true, " : "" - if(cnt.indexOf("tls-verification") != -1){ - cnt = cnt.replace(RegExp("tls\-verification.*?\,", "gmi"), cert0) - }else if(cnt.indexOf("obfs=over-tls")!=-1 || /over\-tls\s*\=\s*true/.test(cnt) || cnt.indexOf("obfs=wss")!=-1){ + if(cnt.indexOf("tls-verification") != -1){ // 已有tls参数时, 如用户不指定,则不做处理 + cnt = (Pcert0 == -1 || Pcert0 == 1) ? cnt.replace(RegExp("tls\-verification.*?\,", "gmi"), cert0): cnt + //cnt = Pcert0 == 1? cnt.replace(RegExp("tls\-verification.*?\,", "gmi"), cert0): cnt + }else if(cnt.indexOf("obfs=over-tls")!=-1 || /over\-tls\s*\=\s*true/.test(cnt) || cnt.indexOf("obfs=wss")!=-1){ //未包含tls参数时 cnt = cnt.replace(new RegExp("tag.*?\=", "gmi"), cert0+"tag=") } if (tls13 !="") { @@ -1522,6 +1524,7 @@ function VR2QX(subs, Pudp, Ptfo, Pcert0, PTls13) { caead = Number(subs.split("alterId=")[1].split("&")[0]) != 0 ? "aead=false, " : "" } node = node + obfs +caead+ tag + //$notify(node) return node } @@ -2094,7 +2097,7 @@ function emoji_del(str) { //为节点名添加 emoji function get_emoji(emojip, sname) { var Lmoji = { - "🏳️‍🌈": ["流量", "时间", "应急", "过期", "Bandwidth", "expire"], + "🏳️‍🌈": ["流量", "套餐", "剩余", "重置", "到期" , "时间", "应急", "过期", "Bandwidth", "expire"], "🇦🇩": ["安道尔"], "🇦🇿": ["阿塞拜疆"], "🇦🇹": ["奥地利", "奧地利", "Austria", "维也纳"],