修复非 443 端口 trojan 的问题

This commit is contained in:
Shawn
2020-05-15 10:32:13 +08:00
parent 28e7a22636
commit d7a95137b5
2 changed files with 14 additions and 8 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@@ -1,5 +1,5 @@
/** /**
# Quantumult X 资源解析器 (2020-05-13: 18:59 ) # Quantumult X 资源解析器 (2020-05-15: 11:59 )
本资源解析器作者: Shawn(请勿私聊问怎么用)有bug请反馈: @Shawn_KOP_bot 本资源解析器作者: Shawn(请勿私聊问怎么用)有bug请反馈: @Shawn_KOP_bot
更新请关注tg频道: https://t.me/QuanX_API 更新请关注tg频道: https://t.me/QuanX_API
@@ -37,10 +37,12 @@
1⃣ 假设原始订阅连接为: https://raw.githubusercontent.com/crossutility/Quantumult-X/master/server-complete.txt , 1⃣ 假设原始订阅连接为: https://raw.githubusercontent.com/crossutility/Quantumult-X/master/server-complete.txt ,
2⃣ 假设你想要保留的参数为 in=tls+ss, 想要过滤的参数为 out=http+2, 请注意下面订阅链接后一定要加 ”#“ 符号 2⃣ 假设你想要保留的参数为 in=tls+ss, 想要过滤的参数为 out=http+2, 请注意下面订阅链接后一定要加 ”#“ 符号
3⃣ 则填入 Quanx 节点引用的的总链接为 https://raw.githubusercontent.com/crossutility/Quantumult-X/master/server-complete.txt#in=tls+ss&out=http+2 3⃣ 则填入 Quanx 节点引用的的总链接为 https://raw.githubusercontent.com/crossutility/Quantumult-X/master/server-complete.txt#in=tls+ss&out=http+2
4⃣ 填入上述链接并打开的资源解析器开关 4⃣ 填入上述链接, 并打开的资源解析器开关
5⃣ 因为 rewrite/filter 的 UI 中暂时没有提供解析器开关,需要去配置文件中的相关行,自行添加参数以开启,如: ------------------------------
https://Advertising.list, tag=🚦去广告update-interval=86400, opt-parser=true, enabled=true
⚠️⚠️ 由于 rewrite/filter 的 UI 中暂时没有提供解析器开关,想使用的请自行去配置文件中的相关行,添加参数"opt-parser=true"以开启,如:
https://Advertising.list#policy=Shawn&out=aweme, tag=🚦去广告update-interval=86400, opt-parser=true, enabled=true
⚠️⚠️如提示"没有自定义解析器",请长按右下角图标后点击左侧刷新按钮,更新资源,后台退出 app直到出现解析器说明
*/ */
var content0=$resource.content; var content0=$resource.content;
@@ -440,7 +442,11 @@ function TJ2QX(subs,Pudp,Ptfo,Pcert,Ptls13){
var ntrojan=[] var ntrojan=[]
var cnt=list0[i].split("trojan://")[1] var cnt=list0[i].split("trojan://")[1]
type="trojan="; type="trojan=";
if(cnt.indexOf(":443")!=-1){
ip=cnt.split("@")[1].split(":443")[0]+":443"; ip=cnt.split("@")[1].split(":443")[0]+":443";
}else{
ip=cnt.split("@")[1].split("?")[0]; //非 443 端口的奇葩机场?
}
pwd="password="+cnt.split("@")[0]; pwd="password="+cnt.split("@")[0];
obfs="over-tls=true"; obfs="over-tls=true";
pcert= cnt.indexOf("allowInsecure=0")!= -1? "tls-verification=true":"tls-verification=false"; pcert= cnt.indexOf("allowInsecure=0")!= -1? "tls-verification=true":"tls-verification=false";