Skip to content

Commit 4019df0

Browse files
authored
V4.3 文件拖放现在支持了二维码图片的节点识别;传输现在添加了grpc!
1 parent 50edbc2 commit 4019df0

16 files changed

+73
-14
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
WinXray V4.2 修复文件拖拽解析节点后空白的BUG!
2+
WinXray V4.3 文件拖放现在支持了二维码图片的节点识别;传输现在添加了grpc!
33
44

55
导语:

WinXray/WinXray.exe

1.78 MB
Binary file not shown.

WinXray/xray-core/LICENSE

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
https://github.com/XTLS/Xray-core/blob/main/LICENSE
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// 号开头为注释行。
2+
// 本文件用于指定默认服务器列表。
3+
// 本文件可以直接输入json格式的服务器数组( 服务器可以使用subscribeUrl字段指定订阅源地址,可以指定"autoConnect":false字段禁止自动连接 )
4+
// 也可以每行一个 vless://、vmess://、trojan、trojan-go、ss:// 等分享链接
5+
[
6+
{
7+
"address":"服务器地址",
8+
"port":443, // 服务器端口
9+
"id":"UUID或密码", // v2ray就指定UUID,shadowsocks在这里指定密码
10+
"network":"tcp", // 网络协议可以改为 "tcp", "ws" 等
11+
"security":"none", // 加密方法,vmess 默认为 auto, vless 默认为 none, shadowsocks也可以在这里指定加密方法,例如:"aes-256-gcm",
12+
"protocol":"vless", // 协议可以更换为 "vless","vmess","shadowsocks","trojan","trojan-go" 等
13+
"host":"伪装主机域名", // 例如ws协议通过这个指定HTTP头里的host字段。
14+
"sni":"TLS域名", // 不指定使用host的值,如果host也没指定就使用 address的值
15+
"tls":"xtls", // 可以不写,值可以指定为 "","tls","xtls" 等
16+
"flow":"流控", // xtls需要用到的字段,可以不指定使用默认值 "xtls-rprx-direct"
17+
"ps":"描述文本"
18+
}
19+
]

WinXray/xray-core/xray.exe

17.9 MB
Binary file not shown.

default.aproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<project ver="10" name="WinXray" libEmbed="true" icon="\forms\ico\app.ico" ui="win" output="WinXray.exe" CompanyName="WinXray" FileDescription="网络代理通用客户端" LegalCopyright="Copyright (C) WinXray" ProductName="WinXray" InternalName="WinXray" FileVersion="4.2" ProductVersion="4.2" publishDir="\WinXray" dstrip="false" local="false" ignored="false">
2+
<project ver="10" name="WinXray" libEmbed="true" icon="\forms\ico\app.ico" ui="win" output="WinXray.exe" CompanyName="WinXray" FileDescription="网络代理通用客户端" LegalCopyright="Copyright (C) WinXray" ProductName="WinXray" InternalName="WinXray" FileVersion="4.3" ProductVersion="4.3" publishDir="\WinXray" dstrip="false" local="false" ignored="false">
33
<file name="main" path="main.aardio"/>
44
<folder name="窗体" path="forms" comment="" embed="true" local="false" ignored="false">
55
<folder name="ico" path="forms\ico" comment="forms\ico" local="false" embed="false" ignored="false">

forms/main/outbound.aardio

+9-8
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ winform.cmbProtocol.onProtocolChange = function(){
5353
winform.outboundConfig.security = "auto";
5454

5555
winform.cmbNetwork.items = {
56-
"tcp";"kcp";"h2";"quic";
56+
"tcp";"ws";"kcp";"h2";"quic";"grpc";
5757
}
5858
winform.cmbNetwork.selIndex = 1;
5959
winform.outboundConfig.network = "tcp";
60-
winform.btnUpdateCore.text = '下载 / 更新支持组件: xray Core';
60+
winform.btnUpdateCore.text = '下载 / 更新支持组件: Xray Core';
6161
winform.editId.setCueBannerText("请输入 GUID");
6262
}
6363
elseif(sel=="shadowsocks"){
@@ -71,7 +71,7 @@ winform.cmbProtocol.onProtocolChange = function(){
7171
winform.cmbNetwork.items = {"tcp";}
7272
winform.cmbNetwork.selIndex = 1;
7373
winform.outboundConfig.network = "tcp";
74-
winform.btnUpdateCore.text = '下载 / 更新支持组件: xray Core';
74+
winform.btnUpdateCore.text = '下载 / 更新支持组件: Xray Core';
7575
winform.editId.setCueBannerText("请输入密码");
7676
}
7777
elseif(sel=="ssr"){
@@ -98,11 +98,11 @@ winform.cmbProtocol.onProtocolChange = function(){
9898
winform.outboundConfig.security = "none";
9999

100100
winform.cmbNetwork.items = {
101-
"tcp";"kcp";"h2";"quic";
101+
"tcp";"ws";"kcp";"h2";"quic";"grpc";
102102
}
103103
winform.cmbNetwork.selIndex = 1;
104104
winform.outboundConfig.network = "tcp";
105-
winform.btnUpdateCore.text = '下载 / 更新支持组件: v2ray Core';
105+
winform.btnUpdateCore.text = '下载 / 更新支持组件: V2ray Core';
106106
winform.editId.setCueBannerText("请输入 GUID");
107107
}
108108
elseif(sel=="naive"){
@@ -125,7 +125,7 @@ winform.cmbProtocol.onProtocolChange = function(){
125125
winform.cmbNetwork.items = {"tcp";}
126126
winform.cmbNetwork.selIndex = 1;
127127
winform.outboundConfig.network = "tcp";
128-
winform.btnUpdateCore.text = '下载 / 更新支持组件: xray Core';
128+
winform.btnUpdateCore.text = '下载 / 更新支持组件: Xray Core';
129129
winform.editId.setCueBannerText("请输入 用户名:密码");
130130
}
131131
elseif(sel=="http" || sel=="https"){
@@ -135,7 +135,7 @@ winform.cmbProtocol.onProtocolChange = function(){
135135
winform.cmbNetwork.items = {"tcp";}
136136
winform.cmbNetwork.selIndex = 1;
137137
winform.outboundConfig.network = "tcp";
138-
winform.btnUpdateCore.text = '下载 / 更新支持组件: xray Core';
138+
winform.btnUpdateCore.text = '下载 / 更新支持组件: Xray Core';
139139
winform.editId.setCueBannerText("请输入 用户名:密码");
140140
}
141141
else {
@@ -145,7 +145,7 @@ winform.cmbProtocol.onProtocolChange = function(){
145145
winform.cmbNetwork.items = {"tcp";}
146146
winform.cmbNetwork.selIndex = 1;
147147
winform.outboundConfig.network = "tcp";
148-
winform.btnUpdateCore.text = '下载 / 更新支持组件: xray Core';
148+
winform.btnUpdateCore.text = '下载 / 更新支持组件: Xray Core';
149149
winform.editId.setCueBannerText("请输入密码");
150150
}
151151
}
@@ -220,6 +220,7 @@ var editOutboundTip = {
220220
security = {"加密方式";"可省略,vmess协议默认为auto,vless协议默认为none"};
221221
sni = {"TLS服务器名";"TLS客户端请求中的服务器名字段,如果不指定则默认取host或address字段值。"};
222222
flow = {"流控";"目前仅用于选择 XTLS 的算法,省略时默认值为xtls-rprx-direct"};
223+
grpcSni = {"gRPC的ServiceName";"gRPC传输方式的ServiceName"};
223224
obfs = {"混淆插件";"可选值:plain,http_simple,http_post,tls1.2_ticket_auth ..."};
224225
obfsParam = {"混淆参数";"SSR 里的 obfs_param"};
225226
networkParam = {"SSR网络协议参数";"SSR 里的 protocol_param"};

forms/main/xray.aardio

+21-1
Original file line numberDiff line numberDiff line change
@@ -1036,6 +1036,26 @@ var accelerator = win.ui.accelerator({
10361036
//文件拖放
10371037
frmXray.onDropFiles = function(files){
10381038
for(i=1;#files;1){
1039+
var bmp = gdip.bitmap(files[i]);
1040+
if(bmp){
1041+
import zbar;
1042+
var scanner = zbar.scanner();
1043+
scanner.config('qrcode.enable');
1044+
scanner.scanBitmap(bmp,function(typeName,data){
1045+
import win.clip;
1046+
win.clip.write(data);
1047+
1048+
var outbounds = xray.outbounds.importFromString(data);
1049+
if(#outbounds){
1050+
..table.append(config.proxy.outbounds,outbounds);
1051+
publish("uiCommand.restartxrayCore");
1052+
publish("outbounds.updateConfigJson");
1053+
frmXray.msgOk("已成功导入" + #outbounds + "个服务器",1200);
1054+
return;
1055+
}
1056+
})
1057+
}
1058+
10391059
var str=string.load(files[i]);
10401060
if(str){
10411061
str = ..string.trim(str,'"\'\t\r\n ');
@@ -1050,7 +1070,7 @@ frmXray.onDropFiles = function(files){
10501070
}
10511071
}
10521072
}
1053-
frmXray.msgFrown('未能在文件中导入节点!');
1073+
//frmXray.msgFrown('未能在文件中导入节点!');
10541074
}
10551075

10561076
import win.imageList;

lib/xray/core/configJson.aardio

+10
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,11 @@ write = function(jsonPath,outbound,sockPort,httpPort){
184184
}
185185
}
186186
}
187+
elseif( outbound.network == "grpc" ){
188+
ob.streamSettings.grpcSettings = {
189+
serviceName = outbound.grpcSni;
190+
}
191+
}
187192

188193
..table.assign(proxyOutboundInCore,ob);
189194
}
@@ -301,6 +306,11 @@ write = function(jsonPath,outbound,sockPort,httpPort){
301306
}
302307
}
303308
}
309+
elseif( outbound.network == "grpc" ){
310+
ob.streamSettings.grpcSettings = {
311+
serviceName = outbound.grpcSni;
312+
}
313+
}
304314

305315
..table.assign(proxyOutboundInCore,ob);
306316
}

lib/xray/outbounds.aardio

+8
Original file line numberDiff line numberDiff line change
@@ -965,6 +965,7 @@ validOutbound = function(outbound){
965965
outbound.id = outbound.password;
966966
outbound.password = null;
967967
}
968+
968969
if(outbound.uuid){
969970
outbound.id = outbound.uuid;
970971
outbound.uuid = null;
@@ -986,6 +987,13 @@ validOutbound = function(outbound){
986987
outbound["ws-headers"] = null;
987988
}
988989

990+
var grpcOpts = outbound[["grpc-opts"]];
991+
if( grpcOpts ){
992+
if(grpcOpts[["grpc-service-name"]]){
993+
outbound.grpcSni = grpcOpts[["grpc-service-name"]];
994+
}
995+
}
996+
989997
if(type(outbound.tls)!="string"){
990998
if(outbound.tls) outbound.tls = "tls";
991999
else outbound.tls = "";

main.aardio

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ import win.ui;
162162
mainForm = win.form(text="WinXray";right=1019;bottom=679;bgcolor=15793151;border="none")
163163
mainForm.add(
164164
Promote={cls="plus";text="推荐";left=0;top=300;right=85;bottom=380;bkBottom=3;bkLeft=7;bkRight=8;bkTop=2;border={color=-65536};color=16777215;dl=1;dt=1;font=LOGFONT(h=-13);iconStyle={font=LOGFONT(h=-37;name='FontAwesome');padding={bottom=20}};iconText='\uF233';notify=1;textPadding={bottom=10};valign="bottom";x=0.5;y=0.2;z=8};
165-
caption={cls="bkplus";text="WinXray.COM V4.2";left=25;top=9;right=685;bottom=27;align="left";color=6052956;dl=1;dt=1;font=LOGFONT(h=-14);z=6};
165+
caption={cls="bkplus";text="WinXray.COM V4.3";left=25;top=9;right=685;bottom=27;align="left";color=6052956;dl=1;dt=1;font=LOGFONT(h=-14);z=6};
166166
custom={cls="custom";left=83;top=40;right=1022;bottom=679;bgcolor=16777215;db=1;dl=1;dr=1;dt=1;z=3};
167167
navBar={cls="bkplus";left=0;top=37;right=83;bottom=681;bgcolor=3442175;db=1;dl=1;dt=1;z=1};
168168
navJsonConfig={cls="plus";text="配置";left=0;top=132;right=85;bottom=212;bkBottom=3;bkLeft=7;bkRight=8;bkTop=2;border={color=-65536};color=16777215;dl=1;dt=1;font=LOGFONT(h=-13);iconStyle={font=LOGFONT(h=-37;name='FontAwesome');padding={bottom=20}};iconText='\uF0F6';notify=1;textPadding={bottom=10};valign="bottom";x=0.5;y=0.2;z=5};

release/WinXray.7z

-1.01 KB
Binary file not shown.

release/WinXray32.7z

690 Bytes
Binary file not shown.

release/update/checksum.lzma

0 Bytes
Binary file not shown.

release/update/files/WinXray.exe.lzma

-227 Bytes
Binary file not shown.

release/update/version.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"description":"V4.2 修复文件拖拽解析节点后空白的BUG!",
2+
"description":"V4.3 文件拖放现在支持了二维码图片的节点识别;传输现在添加了grpc!",
33
"format":".lzma",
44
"main":"\\WinXray.exe",
55
"updater":"\\WinXray.exe",
66
"url":"https://raw.githubusercontent.com/TheMRLL/winxray/main/release/update/",
7-
"version":"4.2"
7+
"version":"4.3"
88
}

0 commit comments

Comments
 (0)