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 @@
|
|||||||
/**
|
/**
|
||||||
☑️ 资源解析器 ©𝐒𝐡𝐚𝐰𝐧 ⟦2021-05-01 21:20⟧
|
☑️ 资源解析器 ©𝐒𝐡𝐚𝐰𝐧 ⟦2021-06-09 22:40⟧
|
||||||
----------------------------------------------------------
|
----------------------------------------------------------
|
||||||
🛠 发现 𝐁𝐔𝐆 请反馈: @Shawn_KOP_bot
|
🛠 发现 𝐁𝐔𝐆 请反馈: @Shawn_KOP_bot
|
||||||
⛳️ 关注 🆃🅶 相关频道: https://t.me/QuanX_API
|
⛳️ 关注 🆃🅶 相关频道: https://t.me/QuanX_API
|
||||||
@@ -431,6 +431,7 @@ function Type_Check(subs) {
|
|||||||
|
|
||||||
// 检查节点名字(重复以及空名)等QuanX 不允许的情形,以及多个空格等“不规范”方式
|
// 检查节点名字(重复以及空名)等QuanX 不允许的情形,以及多个空格等“不规范”方式
|
||||||
function TagCheck_QX(content) {
|
function TagCheck_QX(content) {
|
||||||
|
typefix = {"shadowsocks":["𝐬𝐬","𝐒𝐒","🅢🅢","🆂🆂","ⓢⓢ","🅂🅂","SS"],"shadowsocksr":["𝐬𝐬𝐫","𝐒𝐒𝐑","🅢🅢🅡","🆂🆂🆁","ⓢⓢⓡ","🅂🅂🅁","SSR"],"vmess":["𝐯𝐦𝐞𝐬𝐬","𝐕𝐌𝐄𝐒𝐒","🅥🅜🅔🅢🅢","🆅🅼🅴🆂🆂","ⓥⓜⓔⓢⓢ","🅅🄼🄴🅂🅂","VMESS"],"trojan":["𝐭𝐫𝐨𝐣𝐚𝐧","𝐓𝐑𝐎𝐉𝐀𝐍","🅣🅡🅞🅙🅐🅝","🆃🆁🅾🅹🅰🅽","ⓣⓡⓞⓙⓐⓝ","🅃🅁🄾🄹🄰🄽","TROJAN"],"http":["𝐡𝐭𝐭𝐩","𝐇𝐓𝐓𝐏","🅗🅣🅣🅟","🅷🆃🆃🅿","ⓗⓣⓣⓟ","🄷🅃🅃🄿","HTTP"]}
|
||||||
console.log(content)
|
console.log(content)
|
||||||
var Olist = content.map(item =>item.trim().replace(/\s{2,}/g," "))
|
var Olist = content.map(item =>item.trim().replace(/\s{2,}/g," "))
|
||||||
//$notify("","",Olist)
|
//$notify("","",Olist)
|
||||||
@@ -439,17 +440,19 @@ function TagCheck_QX(content) {
|
|||||||
var no = 0;
|
var no = 0;
|
||||||
for (var i = 0; i < Olist.length; i++) {
|
for (var i = 0; i < Olist.length; i++) {
|
||||||
var item = Olist[i] ? Olist[i] : ""
|
var item = Olist[i] ? Olist[i] : ""
|
||||||
|
typefix["shadowsocks"]=item.indexOf("ssr-protocol")!=-1? typefix["shadowsocksr"] : typefix["shadowsocks"]
|
||||||
if (item.replace(/ /gm, "").indexOf("tag=") != -1) {
|
if (item.replace(/ /gm, "").indexOf("tag=") != -1) {
|
||||||
var nl = item.slice(item.indexOf("tag"))
|
var nl = item.slice(item.indexOf("tag"))
|
||||||
var nm = nl.slice(nl.indexOf("=") + 1)
|
var nm = nl.slice(nl.indexOf("=") + 1)
|
||||||
if (nm == "") { //空名字
|
if (nm == "") { //空名字
|
||||||
nm = " [" + item.split("=")[0] + "] " + item.split("=")[1].split(",")[0].split(":")[0]
|
tp = typefix[item.split("=")[0].trim()][3]
|
||||||
|
nm = tp + " | " + item.split("=")[1].split(",")[0].split(":")[0]
|
||||||
item = item.split("tag")[0] + "tag=" + nm.replace("shadowsocks", "ss")
|
item = item.split("tag")[0] + "tag=" + nm.replace("shadowsocks", "ss")
|
||||||
nulllist.push(nm.replace("shadowsocks", "ss"))
|
nulllist.push(nm.replace("shadowsocks", "ss"))
|
||||||
}
|
}
|
||||||
var ni = 0
|
var ni = 0
|
||||||
while (nmlist.indexOf(nm) != -1) { //重名情形
|
while (nmlist.indexOf(nm) != -1) { //重名情形
|
||||||
nm = nm+ NoReplace(ni+1)
|
nm = ni==0? nm+ NoReplace(ni+1):nm.split(" ").slice(0,nm.split(" ").length-2).join(" ") + NoReplace(ni+1)
|
||||||
item = Pdel != 1 ? item.split("tag")[0] + "tag=" + nm : ""
|
item = Pdel != 1 ? item.split("tag")[0] + "tag=" + nm : ""
|
||||||
ni = ni + 1
|
ni = ni + 1
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user