mirror of
https://github.com/KOP-XIAO/QuantumultX.git
synced 2026-01-25 17:15:09 +00:00
大小写
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
☑️ 资源解析器 ©𝐒𝐡𝐚𝐰𝐧 ⟦2021-03-11 22:59⟧
|
||||
☑️ 资源解析器 ©𝐒𝐡𝐚𝐰𝐧 ⟦2021-03-13 17:59⟧
|
||||
----------------------------------------------------------
|
||||
🛠 发现 𝐁𝐔𝐆 请反馈: @Shawn_KOP_bot
|
||||
⛳️ 关注 🆃🅶 相关频道: https://t.me/QuanX_API
|
||||
@@ -152,6 +152,7 @@ var pfo = Pout0 ? "out=" + Pout0.join(", ") : ""
|
||||
var pfihn = Phin0 ? "inhn=" + Phin0.join(", ") + ", " : ""
|
||||
var pfohn = Phout0 ? "outhn=" + Phout0.join(", ") : ""
|
||||
var Pcnt = para1.indexOf("cnt=") != -1 ? para1.split("cnt=")[1].split("&")[0] : 0;
|
||||
var Pcap = para1.indexOf("cap=") != -1 ? para1.split("cap=")[1].split("&")[0] : "";
|
||||
let [flow, exptime, errornode, total] = "";
|
||||
var Pdel = mark0 && para1.indexOf("del=") != -1 ? para1.split("del=")[1].split("&")[0] : 1; //删除重复节点
|
||||
var typeU = para1.indexOf("type=") != -1 ? para1.split("type=")[1].split("&")[0] : "";
|
||||
@@ -427,6 +428,10 @@ function TagCheck_QX(content) {
|
||||
}
|
||||
if (ni != 0) { duplist.push(nm) }
|
||||
nmlist.push(nm)
|
||||
if (Pcap) {
|
||||
item = Capitalize(item,Pcap)
|
||||
console.log(item)
|
||||
}
|
||||
ni = 0
|
||||
if (item) {
|
||||
Nlist.push(item)
|
||||
@@ -448,10 +453,25 @@ function TagCheck_QX(content) {
|
||||
return Nlist
|
||||
}
|
||||
|
||||
function Trim(item) {
|
||||
return item.trim()
|
||||
function Capitalize(cnt,para) {
|
||||
if (para == 1) {
|
||||
cnt = cnt.split("tag=")[0] +"tag="+ cnt.split("tag=")[1].toUpperCase()
|
||||
} else if (para == -1) {
|
||||
cnt = cnt.split("tag=")[0] +"tag="+ cnt.split("tag=")[1].toLowerCase()
|
||||
} else if (para == 0) {
|
||||
cnt =cnt.split("tag=")[0] +"tag="+titleCase(cnt.split("tag=")[1])
|
||||
}
|
||||
return cnt
|
||||
}
|
||||
|
||||
function titleCase(str) {
|
||||
var newStr = str.split(" ");
|
||||
for(var i = 0; i<newStr.length; i++){
|
||||
newStr[i] = newStr[i].slice(0,1).toUpperCase() + newStr[i].slice(1).toLowerCase();
|
||||
} return newStr.join(" ");
|
||||
}
|
||||
|
||||
|
||||
// 类型前缀/后缀
|
||||
function type_prefix(item) {
|
||||
if(item.trim()!="") {
|
||||
@@ -592,6 +612,12 @@ function SCP2QX(subs) {
|
||||
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"
|
||||
nrw.push(rw)
|
||||
} else if(subs[i].split(" ")[1] == "header-replace") { // rewrite header-replace 类型
|
||||
console.log(subs[i])
|
||||
var pget = subs[i].split("header-replace")[1].split(":")[0].trim()
|
||||
var pgetn = subs[i].split("header-replace")[1].trim()
|
||||
rw = subs[i].split(" ")[0] + " url request-header " +"(.+\\r\\n)"+pget+":.+(\\r\\n) request-header " + "$1" + pgetn + "$2"
|
||||
nrw.push(rw)
|
||||
} else if(subs[i].indexOf(" - reject") != -1) { // rewrite reject 类型
|
||||
rw = subs[i].split(" ")[0] + " url reject-200"
|
||||
nrw.push(rw)
|
||||
|
||||
Reference in New Issue
Block a user