This commit is contained in:
Shawn
2020-08-31 23:11:17 +08:00
parent e11da8cef0
commit 27011620e3

View File

@@ -1,5 +1,5 @@
/**
☑️ 资源解析器 ©𝐒𝐡𝐚𝐰𝐧 ⟦2020-08-29 17:19⟧
☑️ 资源解析器 ©𝐒𝐡𝐚𝐰𝐧 ⟦2020-08-31 23:29⟧
----------------------------------------------------------
🛠 发现 𝐁𝐔𝐆 请反馈: @Shawn_KOP_bot
⛳️ 关注 🆃🅶 相关频道: https://t.me/QuanX_API
@@ -88,6 +88,7 @@ var link0 = $resource.link;
//const $resource={}
//const $done=function(snt){return snt}
//parameters
var para = (link0.indexOf("http") != -1 && link0.indexOf("://") != -1) ? link0 : link0 + content0.split("\n")[0];
var para1 = para.slice(para.indexOf("#") + 1) //防止参数中其它位置也存在"#"
var mark0 = para.indexOf("#") != -1 ? true : false;
@@ -145,6 +146,7 @@ var exptime = "";
//$notify(type0)
var type0 = Type_Check(content0); // 类型判断
console.log(type0)
//响应头流量处理部分
function SubFlow() {
@@ -282,7 +284,7 @@ function Type_Check(subs) {
var ClashK = ["proxies:"]
var SubK = ["dm1lc3M", "c3NyOi8v", "dHJvamFu", "c3M6Ly", "c3NkOi8v", "c2hhZG93"];
var RewriteK = [" url "]
var SubK2 = ["ss://", "vmess://", "ssr://", "trojan://", "ssd://"];
var SubK2 = ["ss://", "vmess://", "ssr://", "trojan://", "ssd://", "https://"];
var html = "DOCTYPE html"
var subi = subs.replace(/ /g, "")
const RuleCheck = (item) => subi.toLowerCase().indexOf(item) != -1;
@@ -715,8 +717,15 @@ function SubsEd2QX(subs, Pudp, Ptfo, Pcert, Ptls13) {
node = SS2QX(list0[i], Pudp, Ptfo)
} else if (type == "trojan") {
node = TJ2QX(list0[i], Pudp, Ptfo, Pcert, Ptls13)
} else if (type == "https" && listi.indexOf("@") != -1) { //subs,Ptfo,Pcert,Ptls13
} else if (type == "https") { //subs,Ptfo,Pcert,Ptls13
console.log("haha")
if (listi.indexOf("@") != -1) {
node = HPS2QX(list0[i], Ptfo, Pcert, Ptls13)
} else {
var listh = Base64.decode(listi.split("https://")[1].split("#")[0])+"#"+listi.split("https://")[1].split("#")[1]
listh = "https://" + Base64.encode(listh)
node = HPS2QX(listh, Ptfo, Pcert, Ptls13)
}
} else if (QuanXK.some(NodeCheck)) {
node = list0[i]
} else if (SurgeK.some(NodeCheck)) {
@@ -764,8 +773,14 @@ function Subs2QX(subs, Pudp, Ptfo, Pcert, Ptls13) {
node = SSD2QX(list0[i], Pudp, Ptfo)
} else if (type == "trojan") {
node = TJ2QX(list0[i], Pudp, Ptfo, Pcert, Ptls13)
} else if (type == "https" && listi.indexOf("@") != -1) {
} else if (type == "https") {
if (listi.indexOf("@") != -1) {
node = HPS2QX(list0[i], Ptfo, Pcert, Ptls13)
} else {
var listh = Base64.decode(listi.split("https://")[1].split("#")[0])+"#"+listi.split("https://")[1].split("#")[1]
listh = "https://" + Base64.encode(listh)
node = HPS2QX(listh, Ptfo, Pcert, Ptls13)
}
} else if (QuanXK.some(NodeCheck)) {
node = list0[i]
} else if (SurgeK.some(NodeCheck)) {