mirror of
https://github.com/KOP-XIAO/QuantumultX.git
synced 2026-01-25 21:25:09 +00:00
udp-over-tcp
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
☑️ 资源解析器 ©𝐒𝐡𝐚𝐰𝐧 ⟦2022-05-04 18:03⟧
|
||||
☑️ 资源解析器 ©𝐒𝐡𝐚𝐰𝐧 ⟦2022-05-06 15:03⟧
|
||||
----------------------------------------------------------
|
||||
🛠 发现 𝐁𝐔𝐆 请反馈: @ShawnKOP_bot
|
||||
🛠 发现 𝐁𝐔𝐆 请反馈: @Shawn_Parser_Bot
|
||||
⛳️ 关注 🆃🅶 相关频道: https://t.me/QuanX_API
|
||||
🗣 🆃🄷🄰🄽🄺🅂 🆃🄾 @Jamie CHIEN, @M**F**, @c0lada, @Peng-YM, @vinewx, @love4taylor, @shadowdogy
|
||||
|
||||
@@ -15,13 +15,14 @@
|
||||
----------------------------------------------------------
|
||||
0️⃣ 在 ⟦订阅链接⟧ 后加 "#" 使用, 不同参数用 "&" 连接
|
||||
⚠️ ☞ “你的订阅连接”#emoji=1&tfo=1&in=香港+台湾
|
||||
❖ 本地资源片段引用, 请将参数如 "#in=xxx&out=yyy" 填入资源片段第 ① 行
|
||||
❖ 本地资源片段引用, 请将参数如 "#in=xxx&out=yyy" 填入资源片段的第 ① 行
|
||||
❖ 🚦 支持中文, "操作" 以下特殊字符时请先替换(URL-Encode) 🚦
|
||||
∎ "+"⇒"%2B", 空格⇒"%20", "@"⇒"%40", "&"⇒"%26", "."⇒"\.", ","⇒"%2C"
|
||||
|
||||
1️⃣ ⟦𝐬𝐞𝐫𝐯𝐞𝐫 节点⟧ ➠ 参数说明:
|
||||
⦿ emoji=1(国行设备用2)/-1, 添加/删除节点名内地区旗帜;
|
||||
⦿ udp=1/-1, tfo=1/-1, 分别强制开启(关闭) 𝐮𝐝𝐩-𝐫𝐞𝐥𝐚𝐲/𝐟𝐚𝐬𝐭-𝐨𝐩𝐞𝐧;
|
||||
⦿ uot=1, 开启 udp-over-tcp=true选项(仅限SS(R))
|
||||
⦿ cert=1/-1, 分别开启/关闭 𝐭𝐥𝐬 证书验证(默认关闭);
|
||||
❖ csha/psha, tls-cert-sha256 以及 tls-pubkey-sha256 参数
|
||||
⦿ in, out, regex, regout 分别为 保留、删除、正则保留、正则删除 节点;
|
||||
@@ -35,7 +36,6 @@
|
||||
❖ 默认 emoji 先生效, 如想调换顺序, 请用 rrname 参数
|
||||
⦿ replace 正则替换节点中字段, 可用于重命名/更改加密方式等
|
||||
❖ replace=regex1@𝘀𝘁𝗿1+regex2@𝘀𝘁𝗿2
|
||||
❖ replace=regex1@ 则等效于 delreg 参数
|
||||
⦿ 占位符,可用于 rename/replace 等操作
|
||||
❖ $type0/1/2/3/4/5/6/7 占位符,将节点类型(ss/ssr/vmess 等)作为可操作参数,如
|
||||
∎ rename=@|$type2
|
||||
@@ -51,7 +51,7 @@
|
||||
⦿ ptn=1-8, 将节点名英文替换成样式 ⇒ 🅰/🄰/𝐀/𝗮/𝔸/𝕒/ᵃ/ᴬ
|
||||
⦿ npt=1-8, 将节点名数字替换成样式 ⇒ ①\❶\⓵\𝟙\¹\₁\𝟏\𝟷
|
||||
⦿ delreg, 利用正则表达式来删除 "节点名" 中的字段(⚠️ 慎用)
|
||||
⦿ aead=-1, 关闭 Vmess 的AEAD 参数
|
||||
⦿ aead=-1, 关闭 Vmess 的 AEAD 参数
|
||||
⦿ host=xxx , 修改 host 参数(如有)
|
||||
⦿ checkurl=xxx , 指定server_check_url 参数
|
||||
⦿ sort=1/-1/x/参数规则, 按节点名 正/逆/随机/参数规则 排序
|
||||
@@ -184,6 +184,7 @@ var Pcsha256 = para1.indexOf("csha=") != -1 ? para1.split("csha=")[1].split("&")
|
||||
var Ppsha256 = para1.indexOf("psha=") != -1 ? para1.split("psha=")[1].split("&")[0] : ""; // pubkey-sha256 混淆参数
|
||||
var typeQ = $resource.type? $resource.type:"unsupported" //返回 field 类型参数
|
||||
var PRelay = para1.indexOf("relay=") != -1 ? decodeURIComponent(para1.split("relay=")[1].split("&")[0]) : ""; // 节点 relay 参数, 用于实现代理链功能
|
||||
var PUOT = para1.indexOf("uot=") != -1 ? para1.split("uot=")[1].split("&")[0] : ""; // 节点 udp-over-tcp 开启
|
||||
var PcheckU = para1.indexOf("checkurl=") != -1 ? decodeURIComponent(para1.split("checkurl=")[1].split("&")[0]) : ""; // 节点 server_check_url 参数
|
||||
typeQ = PRelay!=""? "server":typeQ
|
||||
|
||||
@@ -349,6 +350,7 @@ function ResourceParse() {
|
||||
total = para1.indexOf("node_index_prefix")!=-1 ?index_handle(total):total // 节点序号操作
|
||||
//$notify("before","haha",total)
|
||||
total = TagCheck_QX(total).join("\n") //节点名检查
|
||||
if (PUOT==1) { total = total.split("\n").map(UOT).join("\n")}
|
||||
if (Pcnt == 1) {$notify("解析后最终返回内容" , "节点数量: " +total.split("\n").length, total)}
|
||||
total = PRelay==""? Base64.encode(total) : ServerRelay(total.split("\n"),PRelay) //强制节点类型 base64 加密后再导入 Quantumult X, 如果是relay,则转换成分流类型
|
||||
$done({ content: total });
|
||||
@@ -2631,6 +2633,17 @@ function XTFO(cnt,ptfo) {
|
||||
return cnt0
|
||||
}
|
||||
|
||||
|
||||
// udp-over-tcp=true 开启
|
||||
function UOT(cnt) {
|
||||
cnts=cnt.replace(/\s*/g,"")
|
||||
if(/^shadowsocks=/.test(cnts)) {
|
||||
cnt= cnts.indexOf("udp-over-tcp")!=-1? cnt.replace(/udp-over-tcp\s*\=\s*false/g,"udp-over-tcp=true") : cnt+", udp-over-tcp=true"
|
||||
|
||||
}
|
||||
return cnt
|
||||
}
|
||||
|
||||
//比较完美的一款 base64 encode/decode 工具
|
||||
/*
|
||||
* base64.js: https://github.com/dankogai/js-base64#readme
|
||||
|
||||
Reference in New Issue
Block a user