Update resource-parser.js

This commit is contained in:
Shawn
2022-01-04 23:10:54 +08:00
parent 5532890fa3
commit e27a112158

View File

@@ -1,5 +1,5 @@
/** /**
☑️ 资源解析器 ©𝐒𝐡𝐚𝐰𝐧 ⟦2022-01-04 22:45⟧ ☑️ 资源解析器 ©𝐒𝐡𝐚𝐰𝐧 ⟦2022-01-04 23:15⟧
---------------------------------------------------------- ----------------------------------------------------------
🛠 发现 𝐁𝐔𝐆 请反馈: @ShawnKOP_bot 🛠 发现 𝐁𝐔𝐆 请反馈: @ShawnKOP_bot
⛳️ 关注 🆃🅶 相关频道: https://t.me/QuanX_API ⛳️ 关注 🆃🅶 相关频道: https://t.me/QuanX_API
@@ -1212,13 +1212,13 @@ function QX_TLS(cnt,Pcert0,PTls13) {
var tls13 = PTls13 == 1? "tls13=true, " : "" var tls13 = PTls13 == 1? "tls13=true, " : ""
if(cnt.indexOf("tls-verification") != -1){ if(cnt.indexOf("tls-verification") != -1){
cnt = cnt.replace(RegExp("tls\-verification.*?\,", "gmi"), cert0) cnt = cnt.replace(RegExp("tls\-verification.*?\,", "gmi"), cert0)
}else if(cnt.indexOf("obfs=over-tls")!=-1 || cnt.indexOf("obfs=wss")!=-1){ }else if(cnt.indexOf("obfs=over-tls")!=-1 || /over\-tls\s*\=\s*true/.test(cnt) || cnt.indexOf("obfs=wss")!=-1){
cnt = cnt.replace(new RegExp("tag.*?\=", "gmi"), cert0+"tag=") cnt = cnt.replace(new RegExp("tag.*?\=", "gmi"), cert0+"tag=")
} }
if (tls13 !="") { if (tls13 !="") {
if(cnt.indexOf("tls13") != -1){ if(cnt.indexOf("tls13") != -1){
cnt = cnt.replace(RegExp("tls13.*?\,", "gmi"), tls13) cnt = cnt.replace(RegExp("tls13.*?\,", "gmi"), tls13)
}else if(cnt.indexOf("obfs=over-tls")!=-1 || cnt.indexOf("obfs=wss")!=-1){ }else if(cnt.indexOf("obfs=over-tls")!=-1 || /over\-tls\s*\=\s*true/.test(cnt) || cnt.indexOf("obfs=wss")!=-1){
cnt = cnt.replace(new RegExp("tag.*?\=", "gmi"), tls13+"tag=") cnt = cnt.replace(new RegExp("tag.*?\=", "gmi"), tls13+"tag=")
} }
} }