mirror of
https://github.com/KOP-XIAO/QuantumultX.git
synced 2026-01-25 13:05:10 +00:00
type 参数
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
☑️ 资源解析器 ©𝐒𝐡𝐚𝐰𝐧 ⟦2020-11-10 14:29⟧
|
||||
☑️ 资源解析器 ©𝐒𝐡𝐚𝐰𝐧 ⟦2020-11-12 12:29⟧
|
||||
----------------------------------------------------------
|
||||
🛠 发现 𝐁𝐔𝐆 请反馈: @Shawn_KOP_bot
|
||||
⛳️ 关注 🆃🅶 相关频道: https://t.me/QuanX_API
|
||||
@@ -60,9 +60,12 @@
|
||||
❖ ⚠️ 把 𝗿𝘂𝗹𝗲-𝘀𝗲𝘁 中 𝐮𝐫𝐥-𝐫𝐞𝐠𝐞𝐱 转成重写时, 必须要加 𝗱𝘀𝘁=𝐫𝐞𝐰𝐫𝐢𝐭𝐞;
|
||||
❖ ⚠️ 把 𝐦𝐨𝐝𝐮𝐥𝐞 中的分流规则转换时, 必须要加 𝗱𝘀𝘁=𝐟𝐢𝐥𝐭𝐞𝐫
|
||||
|
||||
3⃣️ 通知参数 𝗻𝘁𝗳=0/1, 用于 关闭/打开 资源解析器的提示通知
|
||||
⦿ 𝗿𝗲𝘄𝗿𝗶𝘁𝗲/𝗳𝗶𝗹𝘁𝗲𝗿 默认“开启”通知提示, 以防规则误删除
|
||||
⦿ 𝘀𝗲𝗿𝘃𝗲𝗿 资源解析则默认”关闭“通知提示
|
||||
3⃣️ 其他参数
|
||||
⦿ 通知参数 𝗻𝘁𝗳=0/1, 用于 关闭/打开 资源解析器的提示通知
|
||||
❖ 𝗿𝗲𝘄𝗿𝗶𝘁𝗲/𝗳𝗶𝗹𝘁𝗲𝗿 默认“开启”通知提示, 以防规则误删除
|
||||
❖ 𝘀𝗲𝗿𝘃𝗲𝗿 资源解析则默认”关闭“通知提示
|
||||
⦿ 类型参数 type=domain-set/rule/module/list
|
||||
❖ 当解析器未能正确识别类型时, 可使用此参数强制指定
|
||||
----------------------------------------------------------
|
||||
*/
|
||||
|
||||
@@ -311,14 +314,14 @@ function Type_Check(subs) {
|
||||
if (subs.indexOf(html) != -1 && link0.indexOf("github.com" == -1)) {
|
||||
$notify("‼️ 该链接返回内容有误", "⁉️ 点通知跳转以确认链接是否失效", link0, nan_link);
|
||||
type = "web";
|
||||
} else if (ClashK.some(NodeCheck)){ // Clash 类型节点转换
|
||||
} else if (ClashK.some(NodeCheck) || typeU == "clash"){ // Clash 类型节点转换
|
||||
type = "Clash";
|
||||
content0 = Clash2QX(subs)
|
||||
} else if ( (ModuleK.some(RewriteCheck) || para1.indexOf("dst=rewrite") != -1) && (para1.indexOf("dst=filter") == -1) && subs.indexOf("[Proxy]") == -1) { // Surge 类型 module /rule-set(含url-regex) 类型
|
||||
} 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)) && subs.indexOf("[Proxy]") == -1 && subs.indexOf("[server_local]") == -1 && subs.indexOf("\nhttp-r") == -1 && para1.indexOf("dst=filter")==-1) {
|
||||
type = "rewrite" //Quantumult X 类型 rewrite
|
||||
} else if (RuleK.some(RuleCheck) && subs.indexOf(html) == -1 && subs.indexOf("[Proxy]") == -1 && subs.indexOf("[server_local]") == -1) {
|
||||
} else if ((RuleK.some(RuleCheck) && subs.indexOf(html) == -1 && subs.indexOf("[Proxy]") == -1 && subs.indexOf("[server_local]") == -1) || typeU == "rule") {
|
||||
type = "Rule";
|
||||
} else if ((DomainK.some(RuleCheck) || typeU == "domain-set") && subs.indexOf("[Proxy]") == -1 ) {
|
||||
type = "Rule";
|
||||
@@ -327,11 +330,11 @@ function Type_Check(subs) {
|
||||
type = "Subs"
|
||||
} else if (SubK.some(NodeCheck)) { //b64加密的订阅类型
|
||||
type = "Subs-B64Encode"
|
||||
} else if (subi.indexOf("tag=") != -1 && QuanXK.some(NodeCheck) && subs.indexOf("[Proxy]") == -1 && subs.indexOf("[filter_local]") == -1) {
|
||||
} else if ((subi.indexOf("tag=") != -1 && QuanXK.some(NodeCheck) && subs.indexOf("[Proxy]") == -1 && subs.indexOf("[filter_local]") == -1) || typeU =="list") {
|
||||
type = "Subs" // QuanX list
|
||||
} else if (subs.indexOf("[Proxy]") != -1) {
|
||||
type = "Surge"; // Surge Profiles
|
||||
} else if (SurgeK.some(NodeCheck) && subs.indexOf("[Proxy]") == -1 && subs.indexOf("[filter_local]") == -1) {
|
||||
} else if ((SurgeK.some(NodeCheck) && subs.indexOf("[Proxy]") == -1 && subs.indexOf("[filter_local]") == -1) || typeU == "list") {
|
||||
type = "Subs" // Surge proxy list
|
||||
} else if (subs.indexOf("[server_local]") != -1) {
|
||||
type = "QuanX" // QuanX Profile
|
||||
|
||||
Reference in New Issue
Block a user