mirror of
https://github.com/KOP-XIAO/QuantumultX.git
synced 2026-01-25 21:25:09 +00:00
bug fixed
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
☑️ 资源解析器 ©𝐒𝐡𝐚𝐰𝐧 ⟦2020-12-07 14:59⟧
|
||||
☑️ 资源解析器 ©𝐒𝐡𝐚𝐰𝐧 ⟦2020-12-10 20:59⟧
|
||||
----------------------------------------------------------
|
||||
🛠 发现 𝐁𝐔𝐆 请反馈: @Shawn_KOP_bot
|
||||
⛳️ 关注 🆃🅶 相关频道: https://t.me/QuanX_API
|
||||
@@ -146,7 +146,7 @@ let [flow, exptime, errornode, total] = "";
|
||||
|
||||
var typeU = para1.indexOf("type=") != -1 ? para1.split("type=")[1].split("&")[0] : "";
|
||||
var type0 = Type_Check(content0); // 类型判断
|
||||
//$notify(type0,"hh",content0)
|
||||
//$notify(type0,"hh")
|
||||
|
||||
//flag=1,2,3分别为 server、rewrite、rule 类型
|
||||
var flag = 1
|
||||
@@ -324,10 +324,10 @@ function Type_Check(subs) {
|
||||
} else if (ClashK.some(NodeCheck) || typeU == "clash"){ // Clash 类型节点转换
|
||||
type = "Clash";
|
||||
content0 = Clash2QX(subs)
|
||||
} else if ((subi.indexOf("hostname=") != -1 || RewriteK.some(RewriteCheck) || subi.indexOf("pattern=") != -1) && subs.indexOf("[Proxy]") == -1 && subs.indexOf("[server_local]") == -1 && para1.indexOf("dst=filter")==-1 && subi.indexOf("securehostname") == -1) {
|
||||
type = "rewrite" //Quantumult X 类型 rewrite/ Surge Script/
|
||||
} else if ( ((ModuleK.some(RewriteCheck) || para1.indexOf("dst=rewrite") != -1) && (para1.indexOf("dst=filter") == -1) && subs.indexOf("[Proxy]") == -1) || typeU == "module") { // Surge 类型 module /rule-set(含url-regex) 类型
|
||||
type = "sgmodule"
|
||||
} else if ((subi.indexOf("hostname=") != -1 || RewriteK.some(RewriteCheck) || subi.indexOf("pattern=") != -1) && subs.indexOf("[Proxy]") == -1 && subs.indexOf("[server_local]") == -1 && subs.indexOf("\nhttp-r") == -1 && para1.indexOf("dst=filter")==-1 && subi.indexOf("securehostname") == -1) {
|
||||
type = "rewrite" //Quantumult X 类型 rewrite/ Surge Script/
|
||||
} else if ((RuleK.some(RuleCheck) && subs.indexOf(html) == -1 && subs.indexOf("[Proxy]") == -1 && subs.indexOf("[server_local]") == -1) || typeU == "rule" ||para1.indexOf("dst=filter")!=-1) {
|
||||
type = "Rule";
|
||||
} else if ((DomainK.some(RuleCheck) || typeU == "domain-set") && subs.indexOf("[Proxy]") == -1 ) {
|
||||
@@ -1177,7 +1177,7 @@ function isQuanXRewrite(content) {
|
||||
cnt0=[]
|
||||
for (var i = 0; i< cnt.length; i++){
|
||||
var cnti = cnt[i]
|
||||
if (cnti.indexOf("pattern")!=-1 && cnti.indexOf("type")!=-1) {
|
||||
if ((cnti.indexOf("pattern")!=-1 && cnti.indexOf("type")!=-1) || cnti.indexOf("http-r")!=-1) {
|
||||
cnti=SGMD2QX(cnti)[0]? SGMD2QX(cnti)[0]:""
|
||||
//console.log(cnti)
|
||||
}else if ((cnti.indexOf(" 302")!=-1 || cnti.indexOf(" 307")!=-1) && cnti.indexOf(" url ")==-1){
|
||||
|
||||
Reference in New Issue
Block a user