mirror of
https://github.com/KOP-XIAO/QuantumultX.git
synced 2026-01-26 01:35:09 +00:00
minor bug fixed
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
☑️ 资源解析器 ©𝐒𝐡𝐚𝐰𝐧 ⟦2021-07-20 11:05⟧
|
||||
☑️ 资源解析器 ©𝐒𝐡𝐚𝐰𝐧 ⟦2021-07-25 17:05⟧
|
||||
----------------------------------------------------------
|
||||
🛠 发现 𝐁𝐔𝐆 请反馈: @Shawn_KOP_bot
|
||||
⛳️ 关注 🆃🅶 相关频道: https://t.me/QuanX_API
|
||||
@@ -673,6 +673,7 @@ function SCP2QX(subs) {
|
||||
var rw = ""
|
||||
subs = subs.split("\n").map(x => x.trim().replace(/\s+/g," "))
|
||||
for (var i = 0; i < subs.length; i++) {
|
||||
try {
|
||||
if (subs[i].slice(0, 8) == "hostname") {
|
||||
hn = subs[i].replace(/\%.*\%/g, "")
|
||||
nrw.push(hn)
|
||||
@@ -708,7 +709,8 @@ function SCP2QX(subs) {
|
||||
} else if(subs[i].split(" ")[2] == "header") { // rewrite header 类型
|
||||
var pget = subs[i].split(" ")[0].split(".com")[1]
|
||||
var pgetn = subs[i].split(" ")[1].split(".com")[1]
|
||||
rw = subs[i].split(" ")[0] + " url request-header ^GET " + pget +"(.+\\r\\n)Host:.+(\\r\\n) request-header GET " + pgetn + "$1Host: " + subs[i].split(" ")[1].split("://")[1].split(".com")[0] + ".com$2"
|
||||
rw = subs[i].split(" ")[0] + " url 302 " + subs[i].split(" ")[1]
|
||||
//rw = subs[i].split(" ")[0] + " url request-header ^GET " + pget +"(.+\\r\\n)Host:.+(\\r\\n) request-header GET " + pgetn + "$1Host: " + subs[i].split(" ")[1].split("://")[1].split(".com")[0] + ".com$2"
|
||||
nrw.push(rw)
|
||||
} else if(subs[i].split(" ")[1] == "header-replace") { // rewrite header-replace 类型
|
||||
console.log(subs[i])
|
||||
@@ -740,7 +742,9 @@ function SCP2QX(subs) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
} catch (err) {
|
||||
$notify("❌️解析此条时出现错误,已忽略",subs[i],err)
|
||||
}
|
||||
}
|
||||
return nrw
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user