Skip to content

Commit eb916ea

Browse files
authored
V4.1
V4.1 增加CTRL+C/CTRL+V/CTRL+A/DELETE 快捷键操作!增加多选下批量复制及生成二维码!现在支持了文件解析节点(文件拖拽进入软件即可)!
1 parent f903817 commit eb916ea

File tree

10 files changed

+114
-6
lines changed

10 files changed

+114
-6
lines changed

README.md

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

2-
WinXray V4.0 修复清除重复节点BUG
2+
WinXray V4.1 增加CTRL+C/CTRL+V/CTRL+A/DELETE 快捷键操作!增加多选下批量复制及生成二维码!现在支持了文件解析节点(文件拖拽进入软件即可)
33
44

55
导语:

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.0" ProductVersion="4.0" 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.1" ProductVersion="4.1" 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/xray.aardio

+109-1
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ frmXray.listview.onnotify = function(id,code,ptr){
501501
return 0/*_CDRF_DODEFAULT*/
502502
}
503503
}
504-
case 0xFFFFFFFD/*_NM_DBLCLK*/ {
504+
case 0xFFFFFFFD/*_NM_DBLCLK*/ {
505505
var nm = frmXray.listview.getNotifyMessage(code,ptr);
506506
if( nm ){
507507
xray.core.lastDownloadingCoreFailed = false;
@@ -787,6 +787,43 @@ frmXray.listview.onnotify = function(id,code,ptr){
787787
}
788788
});
789789
}
790+
if(#selectedItems>1){
791+
popmenu.add();
792+
popmenu.add('批量生成二维码',function(id){
793+
if(currentIdx){
794+
var outbounds = ..table.array();
795+
for(i=1;#selectedItems;1){
796+
..table.push(outbounds,config.proxy.outbounds[selectedItems[i]]);
797+
}
798+
799+
var str = xray.outbounds.exportSharedLinks(outbounds);
800+
if(str){
801+
var frmChild = frmXray.loadForm("\forms\main\tools\qr.aardio");
802+
frmChild.createQrCode(str);
803+
frmChild.show();
804+
}
805+
}
806+
});
807+
808+
popmenu.add('批量复制服务器分享链接',function(id){
809+
if(currentIdx){
810+
var outbounds = ..table.array();
811+
for(i=1;#selectedItems;1){
812+
..table.push(outbounds,config.proxy.outbounds[selectedItems[i]]);
813+
}
814+
815+
var str = xray.outbounds.exportSharedLinks(outbounds);
816+
if(str){
817+
import win.clip;
818+
win.clip.write(str);
819+
frmXray.msgOk("已将选中链接的分享链接写入剪贴板",1200);
820+
}
821+
}
822+
});
823+
824+
popmenu.add();
825+
}
826+
790827
popmenu.popup(x,y,true);
791828
}
792829
case 0xFFFFFF94/*_LVN_COLUMNCLICK*/{
@@ -945,6 +982,77 @@ frmXray.removeRepeat=function(){
945982

946983
return removecount;
947984
}
985+
//按键
986+
import win.ui.accelerator;
987+
var accelerator = win.ui.accelerator({
988+
{//按下Enter键
989+
vkey = '13';
990+
oncommand=function(){
991+
frmXray.btnTcping.oncommand();
992+
}
993+
};
994+
{ //按下DELETE键
995+
vkey = '46';
996+
oncommand = function(){
997+
var selectedItems = frmXray.listview.selected;
998+
removeOutbounds(selectedItems);
999+
}
1000+
};
1001+
{ //按下ctrl+C
1002+
ctrl = true; vkey = 'C'#;
1003+
oncommand = function(){
1004+
var selectedItems = frmXray.listview.selected;
1005+
if( !#selectedItems ){
1006+
frmXray.msgFrown("没有选中节点!");
1007+
return ;
1008+
}
1009+
1010+
var outbounds = ..table.array();
1011+
for(i=1;#selectedItems;1){..table.push(outbounds,config.proxy.outbounds[selectedItems[i]])}
1012+
var str = xray.outbounds.exportSharedLinks(outbounds);
1013+
if(str){
1014+
import win.clip;
1015+
win.clip.write(str);
1016+
frmXray.msgOk("已将选中节点的分享链接写入剪贴板",1200);
1017+
}
1018+
}
1019+
};
1020+
{//ctrl+V
1021+
ctrl = true; vkey = 'V'#;
1022+
oncommand=function(){
1023+
frmXray.btnImportServerFromClipBd.oncommand();
1024+
}
1025+
};
1026+
{//ctrl+A
1027+
ctrl = true; vkey = 'A'#;
1028+
oncommand=function(){
1029+
var outbounds=config.proxy.outbounds;
1030+
for(i=#outbounds;1;-1){
1031+
frmXray.listview.setSelected(i);
1032+
}
1033+
}
1034+
};
1035+
},frmXray);
1036+
//文件拖放
1037+
frmXray.onDropFiles = function(files){
1038+
for(i=1;#files;1){
1039+
var str=string.load(files[i]);
1040+
if(str){
1041+
str = ..string.trim(str,'"\'\t\r\n ');
1042+
1043+
var impoutbounds = xray.outbounds.importFromString(str);
1044+
if(#impoutbounds){
1045+
..table.append(config.proxy.outbounds,impoutbounds);
1046+
publish("uiCommand.OutboundsChange","obadd",#impoutbounds);
1047+
publish("uiCommand.restartCore","change");
1048+
publish("outbounds.updateConfigJson");
1049+
frmXray.msgOk("已成功导入" + #impoutbounds + "个节点",1200);
1050+
return;
1051+
}
1052+
}
1053+
}
1054+
frmXray.msgFrown('未能在文件中导入节点!');
1055+
}
9481056

9491057
import win.imageList;
9501058
var iml = win.imageList(16, 15);

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.0";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.1";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

935 Bytes
Binary file not shown.

release/WinXray32.7z

364 Bytes
Binary file not shown.

release/update/checksum.lzma

-1 Bytes
Binary file not shown.

release/update/files/WinXray.exe.lzma

1.57 KB
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.0 修复清除重复节点BUG!",
2+
"description":"V4.1 增加CTRL+C/CTRL+V/CTRL+A/DELETE 快捷键操作!增加多选下批量复制及生成二维码!现在支持了文件解析节点(文件拖拽进入软件即可)!",
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.0"
7+
"version":"4.1"
88
}

winXray/WinXray.exe

1.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)