Compare commits

...

58 Commits
5.14 ... 5.26

Author SHA1 Message Date
2dust
fec8641efe Update AssemblyInfo.cs 2022-06-12 19:36:36 +08:00
2dust
d5eaa56b60 refactor update core url 2022-06-06 17:28:38 +08:00
2dust
db7e8dd6dc Update MainFormHandler.cs 2022-06-06 15:10:09 +08:00
2dust
9415055e6f Timeout to 30s 2022-06-05 20:24:08 +08:00
2dust
f597f09914 Support 2022-blake3 share 2022-05-31 14:53:39 +08:00
2dust
7903228c13 Update AssemblyInfo.cs 2022-05-29 18:29:03 +08:00
2dust
4c2388749d add Shadowsocks-2022 for xray-core 2022-05-29 18:28:44 +08:00
2dust
89da3823a4 Update AssemblyInfo.cs 2022-05-29 09:40:34 +08:00
2dust
3a9a49b163 Update MsgFilterSetForm.Designer.cs 2022-05-29 09:40:31 +08:00
2dust
277b21dc86 add server filter 2022-05-29 09:32:31 +08:00
2dust
bc0e8c17ba refactor Move To menu 2022-05-29 08:43:05 +08:00
2dust
51d3df69bb refactor Move To menu 2022-05-29 08:42:22 +08:00
2dust
4913f6f37d rename 2022-05-29 08:33:25 +08:00
2dust
ff622e2ef6 Update v2rayN.csproj 2022-05-29 08:14:16 +08:00
2dust
50ad643abe Update Utils.cs 2022-05-12 09:50:48 +08:00
2dust
944849a381 v2ray_win_temp 2 guiTemp 2022-05-12 09:49:04 +08:00
2dust
6f485141f0 Improve speed test core support 2022-05-12 09:19:03 +08:00
2dust
3575291119 add multiple program auto run 2022-05-12 08:52:40 +08:00
2dust
e256ec5401 Update ConfigHandler.cs 2022-05-06 14:37:52 +08:00
2dust
3defba6290 Update ConfigHandler.cs 2022-05-06 13:35:30 +08:00
2dust
c201d986c5 Update AssemblyInfo.cs 2022-05-06 13:33:29 +08:00
2dust
36aad4424e Fix issue when saving gui config 2022-05-06 10:54:10 +08:00
2dust
b29fb1e2a3 add shadowsocks SIP008 https://shadowsocks.org/en/wiki/SIP008-Online-Configuration-Delivery.html 2022-05-02 20:15:19 +08:00
2dust
d5aa307efb Update AssemblyInfo.cs 2022-05-01 16:22:54 +08:00
2dust
48928613bf bug fix 2022-05-01 09:08:16 +08:00
2dust
52b8f480f6 Fix issue when saving gui config 2022-04-30 08:32:42 +08:00
2dust
bcda8bd602 Update subscription timeout is set to 30 seconds 2022-04-30 08:32:26 +08:00
2dust
2a11fe11e8 Fix issue when saving gui config 2022-04-29 10:58:51 +08:00
2dust
7ec0607fec Update AssemblyInfo.cs 2022-04-27 20:47:38 +08:00
2dust
aa41a8675e Advanced proxy settings, protocol selection (optional) 2022-04-27 20:46:07 +08:00
2dust
19f9bff6fe Support hysteria and naiveproxy subscription 2022-04-27 09:31:38 +08:00
2dust
4e65732a4e Update AssemblyInfo.cs 2022-04-26 20:06:46 +08:00
2dust
47c843bf09 Enable system proxy advanced settings, use socks protocol 2022-04-26 20:06:21 +08:00
2dust
a7741a0b7d Improve notify icon 2022-04-26 14:51:06 +08:00
2dust
6f3fbdfe17 Update AssemblyInfo.cs 2022-04-25 20:27:22 +08:00
2dust
3be93df63f bug fix 2022-04-25 19:07:09 +08:00
2dust
6259539c87 Enable system agent advanced settings 2022-04-25 18:56:09 +08:00
2dust
9654009650 Update HttpClientHelper.cs 2022-04-25 13:24:10 +08:00
2dust
62e796cf5a Update UpdateHandle.cs 2022-04-19 15:54:51 +08:00
2dust
af820bb0f2 Update AssemblyInfo.cs 2022-04-18 19:01:17 +08:00
2dust
8f5bb3591b Improve clone custom configuration 2022-04-18 18:59:41 +08:00
2dust
7eafae98d4 Turn off system proxy when not using proxy to update subscriptions 2022-04-18 18:59:01 +08:00
2dust
1d4e5baafb Domain and IP are automatically sorted when saving 2022-04-18 18:57:56 +08:00
2dust
9894aa053f Update AssemblyInfo.cs 2022-04-17 19:05:11 +08:00
2dust
4ada8fea27 add tray menu servers limit 2022-04-17 19:01:18 +08:00
2dust
4d013a206b Update MainMsgControl.zh-Hans.resx 2022-04-15 20:49:14 +08:00
2dust
2d8a707bed fix bug 2022-04-14 20:08:35 +08:00
2dust
0e55a859ea Update AssemblyInfo.cs 2022-04-14 18:30:15 +08:00
2dust
0b1ec520f4 fix 2022-04-14 17:01:51 +08:00
2dust
fcc5f29882 add auto update sub setting 2022-04-14 16:49:12 +08:00
2dust
d431c63245 Merge pull request #2192 from FrzMtrsprt/patch-1
Add support for Clash's modern CPU executable
2022-04-14 15:08:08 +08:00
FrzMtrsprt
15f8db64e7 Add support for Clash's modern CPU executable
Add support for clash-windows-amd64-v3.exe
2022-04-14 12:13:22 +08:00
2dust
c2ea14151e add naiveproxy 2022-04-14 11:10:06 +08:00
2dust
977f0428e2 Refactor Inbound 2022-04-14 09:56:11 +08:00
2dust
f110446738 Update AssemblyInfo.cs 2022-04-13 19:36:41 +08:00
2dust
90289120d3 add clash.meta core 2022-04-13 09:21:40 +08:00
2dust
688f206555 Refactor main message control 2022-04-13 09:21:17 +08:00
2dust
38c739c45d Improve test 2022-04-12 20:24:48 +08:00
51 changed files with 4669 additions and 4566 deletions

View File

@@ -56,7 +56,7 @@ namespace v2rayN.Base
} }
return null; return null;
} }
public async Task<string> GetAsync(HttpClient client, string url) public async Task<string> GetAsync(HttpClient client, string url, CancellationToken token)
{ {
if (string.IsNullOrEmpty(url)) if (string.IsNullOrEmpty(url))
{ {
@@ -64,10 +64,7 @@ namespace v2rayN.Base
} }
try try
{ {
var cts = new CancellationTokenSource(); HttpResponseMessage response = await client.GetAsync(url, token);
cts.CancelAfter(5000);
HttpResponseMessage response = await client.GetAsync(url, cts.Token);
return await response.Content.ReadAsStringAsync(); return await response.Content.ReadAsStringAsync();
} }
catch (Exception ex) catch (Exception ex)
@@ -162,7 +159,7 @@ namespace v2rayN.Base
} }
} }
public async Task DownloadDataAsync4Speed(HttpClient client, string url, IProgress<double> progress, CancellationToken token) public async Task DownloadDataAsync4Speed(HttpClient client, string url, IProgress<string> progress, CancellationToken token)
{ {
if (string.IsNullOrEmpty(url)) if (string.IsNullOrEmpty(url))
{ {
@@ -176,15 +173,15 @@ namespace v2rayN.Base
throw new Exception(string.Format("The request returned with HTTP status code {0}", response.StatusCode)); throw new Exception(string.Format("The request returned with HTTP status code {0}", response.StatusCode));
} }
var total = response.Content.Headers.ContentLength.HasValue ? response.Content.Headers.ContentLength.Value : -1L; //var total = response.Content.Headers.ContentLength.HasValue ? response.Content.Headers.ContentLength.Value : -1L;
var canReportProgress = total != -1 && progress != null; //var canReportProgress = total != -1 && progress != null;
using (var stream = await response.Content.ReadAsStreamAsync()) using (var stream = await response.Content.ReadAsStreamAsync())
{ {
var totalRead = 0L; var totalRead = 0L;
var buffer = new byte[1024 * 64]; var buffer = new byte[1024 * 64];
var isMoreToRead = true; var isMoreToRead = true;
var progressPercentage = 0; string progressSpeed = string.Empty;
DateTime totalDatetime = DateTime.Now; DateTime totalDatetime = DateTime.Now;
do do
@@ -215,14 +212,13 @@ namespace v2rayN.Base
// TODO: // TODO:
totalRead += read; totalRead += read;
if (canReportProgress) TimeSpan ts = (DateTime.Now - totalDatetime);
var speed = (totalRead * 1d / ts.TotalMilliseconds / 1000).ToString("#0.0");
if (progress != null)
{ {
TimeSpan ts = (DateTime.Now - totalDatetime); if (progressSpeed != speed)
var speed = totalRead * 1d / ts.TotalMilliseconds / 1000;
var percent = Convert.ToInt32((totalRead * 1d) / (total * 1d) * 100);
if (progressPercentage != percent)
{ {
progressPercentage = percent; progressSpeed = speed;
progress.Report(speed); progress.Report(speed);
} }
} }

View File

@@ -20,7 +20,9 @@ namespace v2rayN.Forms
{ {
cmbCoreType.Items.AddRange(Global.coreTypes.ToArray()); cmbCoreType.Items.AddRange(Global.coreTypes.ToArray());
cmbCoreType.Items.Add("clash"); cmbCoreType.Items.Add("clash");
cmbCoreType.Items.Add("clash_meta");
cmbCoreType.Items.Add("hysteria"); cmbCoreType.Items.Add("hysteria");
cmbCoreType.Items.Add("naiveproxy");
cmbCoreType.Items.Add(string.Empty); cmbCoreType.Items.Add(string.Empty);
txtAddress.ReadOnly = true; txtAddress.ReadOnly = true;
@@ -150,7 +152,7 @@ namespace v2rayN.Forms
return; return;
} }
address = Path.Combine(Utils.GetConfigPath(), address); address = Utils.GetConfigPath(address);
Process.Start(address); Process.Start(address);
} }
} }

View File

@@ -7,7 +7,6 @@ namespace v2rayN.Forms
public partial class BaseForm : Form public partial class BaseForm : Form
{ {
protected static Config config; protected static Config config;
protected static System.Drawing.Icon icon;
public BaseForm() public BaseForm()
{ {
@@ -19,16 +18,14 @@ namespace v2rayN.Forms
{ {
try try
{ {
if (icon == null) string file = Utils.GetPath(Global.CustomIconName);
if (System.IO.File.Exists(file))
{ {
string file = Utils.GetPath(Global.CustomIconName); this.Icon = new System.Drawing.Icon(file);
if (!System.IO.File.Exists(file)) return;
{
return;
}
icon = new System.Drawing.Icon(file);
} }
this.Icon = icon;
this.Icon = Properties.Resources.NotifyIcon1;
} }
catch (Exception e) catch (Exception e)
{ {

File diff suppressed because it is too large Load Diff

View File

@@ -30,7 +30,7 @@
{ {
this.components = new System.ComponentModel.Container(); this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
this.scMain = new System.Windows.Forms.SplitContainer(); this.scServers = new System.Windows.Forms.SplitContainer();
this.lvServers = new v2rayN.Base.ListViewFlickerFree(); this.lvServers = new v2rayN.Base.ListViewFlickerFree();
this.cmsLv = new System.Windows.Forms.ContextMenuStrip(this.components); this.cmsLv = new System.Windows.Forms.ContextMenuStrip(this.components);
this.menuAddVmessServer = new System.Windows.Forms.ToolStripMenuItem(); this.menuAddVmessServer = new System.Windows.Forms.ToolStripMenuItem();
@@ -46,8 +46,10 @@
this.menuRemoveDuplicateServer = new System.Windows.Forms.ToolStripMenuItem(); this.menuRemoveDuplicateServer = new System.Windows.Forms.ToolStripMenuItem();
this.menuCopyServer = new System.Windows.Forms.ToolStripMenuItem(); this.menuCopyServer = new System.Windows.Forms.ToolStripMenuItem();
this.menuSetDefaultServer = new System.Windows.Forms.ToolStripMenuItem(); this.menuSetDefaultServer = new System.Windows.Forms.ToolStripMenuItem();
this.menuServerFilter = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
this.menuMoveToGroup = new System.Windows.Forms.ToolStripMenuItem(); this.menuMoveToGroup = new System.Windows.Forms.ToolStripMenuItem();
this.menuMoveEvent = new System.Windows.Forms.ToolStripMenuItem();
this.menuMoveTop = new System.Windows.Forms.ToolStripMenuItem(); this.menuMoveTop = new System.Windows.Forms.ToolStripMenuItem();
this.menuMoveUp = new System.Windows.Forms.ToolStripMenuItem(); this.menuMoveUp = new System.Windows.Forms.ToolStripMenuItem();
this.menuMoveDown = new System.Windows.Forms.ToolStripMenuItem(); this.menuMoveDown = new System.Windows.Forms.ToolStripMenuItem();
@@ -65,27 +67,12 @@
this.menuExport2ServerConfig = new System.Windows.Forms.ToolStripMenuItem(); this.menuExport2ServerConfig = new System.Windows.Forms.ToolStripMenuItem();
this.menuExport2ShareUrl = new System.Windows.Forms.ToolStripMenuItem(); this.menuExport2ShareUrl = new System.Windows.Forms.ToolStripMenuItem();
this.menuExport2SubContent = new System.Windows.Forms.ToolStripMenuItem(); this.menuExport2SubContent = new System.Windows.Forms.ToolStripMenuItem();
this.tsbServer = new System.Windows.Forms.ToolStripDropDownButton();
this.tabGroup = new System.Windows.Forms.TabControl(); this.tabGroup = new System.Windows.Forms.TabControl();
this.qrCodeControl = new v2rayN.Forms.QRCodeControl(); this.qrCodeControl = new v2rayN.Forms.QRCodeControl();
this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.tsbServer = new System.Windows.Forms.ToolStripDropDownButton();
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.scBig = new System.Windows.Forms.SplitContainer();
this.gbMsgTitle = new System.Windows.Forms.GroupBox(); this.gbServers = new System.Windows.Forms.GroupBox();
this.txtMsgBox = new System.Windows.Forms.TextBox(); this.mainMsgControl = new v2rayN.Forms.MainMsgControl();
this.cmsMsgBox = new System.Windows.Forms.ContextMenuStrip(this.components);
this.menuMsgBoxSelectAll = new System.Windows.Forms.ToolStripMenuItem();
this.menuMsgBoxCopy = new System.Windows.Forms.ToolStripMenuItem();
this.menuMsgBoxCopyAll = new System.Windows.Forms.ToolStripMenuItem();
this.menuMsgBoxClear = new System.Windows.Forms.ToolStripMenuItem();
this.menuMsgBoxAddRoutingRule = new System.Windows.Forms.ToolStripMenuItem();
this.menuMsgBoxFilter = new System.Windows.Forms.ToolStripMenuItem();
this.ssMain = new System.Windows.Forms.StatusStrip();
this.toolSslInboundInfo = new System.Windows.Forms.ToolStripStatusLabel();
this.toolSslBlank1 = new System.Windows.Forms.ToolStripStatusLabel();
this.toolSslRoutingRule = new System.Windows.Forms.ToolStripStatusLabel();
this.toolSslBlank2 = new System.Windows.Forms.ToolStripStatusLabel();
this.toolSslServerSpeed = new System.Windows.Forms.ToolStripStatusLabel();
this.toolSslBlank4 = new System.Windows.Forms.ToolStripStatusLabel();
this.notifyMain = new System.Windows.Forms.NotifyIcon(this.components); this.notifyMain = new System.Windows.Forms.NotifyIcon(this.components);
this.cmsMain = new System.Windows.Forms.ContextMenuStrip(this.components); this.cmsMain = new System.Windows.Forms.ContextMenuStrip(this.components);
this.menuSysAgentMode = new System.Windows.Forms.ToolStripMenuItem(); this.menuSysAgentMode = new System.Windows.Forms.ToolStripMenuItem();
@@ -136,38 +123,35 @@
this.tsbPromotion = new System.Windows.Forms.ToolStripButton(); this.tsbPromotion = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator11 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator11 = new System.Windows.Forms.ToolStripSeparator();
this.tsbClose = new System.Windows.Forms.ToolStripButton(); this.tsbClose = new System.Windows.Forms.ToolStripButton();
((System.ComponentModel.ISupportInitialize)(this.scMain)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.scServers)).BeginInit();
this.scMain.Panel1.SuspendLayout(); this.scServers.Panel1.SuspendLayout();
this.scMain.Panel2.SuspendLayout(); this.scServers.Panel2.SuspendLayout();
this.scMain.SuspendLayout(); this.scServers.SuspendLayout();
this.cmsLv.SuspendLayout(); this.cmsLv.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.scBig)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout(); this.scBig.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout(); this.scBig.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout(); this.scBig.SuspendLayout();
this.groupBox1.SuspendLayout(); this.gbServers.SuspendLayout();
this.gbMsgTitle.SuspendLayout();
this.cmsMsgBox.SuspendLayout();
this.ssMain.SuspendLayout();
this.cmsMain.SuspendLayout(); this.cmsMain.SuspendLayout();
this.tsMain.SuspendLayout(); this.tsMain.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// scMain // scServers
// //
resources.ApplyResources(this.scMain, "scMain"); resources.ApplyResources(this.scServers, "scServers");
this.scMain.FixedPanel = System.Windows.Forms.FixedPanel.Panel2; this.scServers.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.scMain.Name = "scMain"; this.scServers.Name = "scServers";
// //
// scMain.Panel1 // scServers.Panel1
// //
this.scMain.Panel1.Controls.Add(this.lvServers); this.scServers.Panel1.Controls.Add(this.lvServers);
this.scMain.Panel1.Controls.Add(this.tabGroup); this.scServers.Panel1.Controls.Add(this.tabGroup);
// //
// scMain.Panel2 // scServers.Panel2
// //
this.scMain.Panel2.Controls.Add(this.qrCodeControl); this.scServers.Panel2.Controls.Add(this.qrCodeControl);
this.scMain.TabStop = false; this.scServers.TabStop = false;
// //
// lvServers // lvServers
// //
@@ -206,12 +190,10 @@
this.menuRemoveDuplicateServer, this.menuRemoveDuplicateServer,
this.menuCopyServer, this.menuCopyServer,
this.menuSetDefaultServer, this.menuSetDefaultServer,
this.menuServerFilter,
this.toolStripSeparator3, this.toolStripSeparator3,
this.menuMoveToGroup, this.menuMoveToGroup,
this.menuMoveTop, this.menuMoveEvent,
this.menuMoveUp,
this.menuMoveDown,
this.menuMoveBottom,
this.menuSelectAll, this.menuSelectAll,
this.toolStripSeparator9, this.toolStripSeparator9,
this.menuPingServer, this.menuPingServer,
@@ -226,7 +208,6 @@
this.menuExport2ShareUrl, this.menuExport2ShareUrl,
this.menuExport2SubContent}); this.menuExport2SubContent});
this.cmsLv.Name = "cmsLv"; this.cmsLv.Name = "cmsLv";
this.cmsLv.OwnerItem = this.tsbServer;
resources.ApplyResources(this.cmsLv, "cmsLv"); resources.ApplyResources(this.cmsLv, "cmsLv");
// //
// menuAddVmessServer // menuAddVmessServer
@@ -306,6 +287,12 @@
resources.ApplyResources(this.menuSetDefaultServer, "menuSetDefaultServer"); resources.ApplyResources(this.menuSetDefaultServer, "menuSetDefaultServer");
this.menuSetDefaultServer.Click += new System.EventHandler(this.menuSetDefaultServer_Click); this.menuSetDefaultServer.Click += new System.EventHandler(this.menuSetDefaultServer_Click);
// //
// menuServerFilter
//
this.menuServerFilter.Name = "menuServerFilter";
resources.ApplyResources(this.menuServerFilter, "menuServerFilter");
this.menuServerFilter.Click += new System.EventHandler(this.menuServerFilter_Click);
//
// toolStripSeparator3 // toolStripSeparator3
// //
this.toolStripSeparator3.Name = "toolStripSeparator3"; this.toolStripSeparator3.Name = "toolStripSeparator3";
@@ -317,6 +304,16 @@
resources.ApplyResources(this.menuMoveToGroup, "menuMoveToGroup"); resources.ApplyResources(this.menuMoveToGroup, "menuMoveToGroup");
this.menuMoveToGroup.Click += new System.EventHandler(this.menuMoveToGroup_Click); this.menuMoveToGroup.Click += new System.EventHandler(this.menuMoveToGroup_Click);
// //
// menuMoveEvent
//
this.menuMoveEvent.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuMoveTop,
this.menuMoveUp,
this.menuMoveDown,
this.menuMoveBottom});
this.menuMoveEvent.Name = "menuMoveEvent";
resources.ApplyResources(this.menuMoveEvent, "menuMoveEvent");
//
// menuMoveTop // menuMoveTop
// //
this.menuMoveTop.Name = "menuMoveTop"; this.menuMoveTop.Name = "menuMoveTop";
@@ -417,13 +414,6 @@
resources.ApplyResources(this.menuExport2SubContent, "menuExport2SubContent"); resources.ApplyResources(this.menuExport2SubContent, "menuExport2SubContent");
this.menuExport2SubContent.Click += new System.EventHandler(this.menuExport2SubContent_Click); this.menuExport2SubContent.Click += new System.EventHandler(this.menuExport2SubContent_Click);
// //
// tsbServer
//
this.tsbServer.DropDown = this.cmsLv;
this.tsbServer.Image = global::v2rayN.Properties.Resources.server;
resources.ApplyResources(this.tsbServer, "tsbServer");
this.tsbServer.Name = "tsbServer";
//
// tabGroup // tabGroup
// //
resources.ApplyResources(this.tabGroup, "tabGroup"); resources.ApplyResources(this.tabGroup, "tabGroup");
@@ -436,139 +426,37 @@
resources.ApplyResources(this.qrCodeControl, "qrCodeControl"); resources.ApplyResources(this.qrCodeControl, "qrCodeControl");
this.qrCodeControl.Name = "qrCodeControl"; this.qrCodeControl.Name = "qrCodeControl";
// //
// splitContainer1 // tsbServer
// //
resources.ApplyResources(this.splitContainer1, "splitContainer1"); this.tsbServer.DropDown = this.cmsLv;
this.splitContainer1.Name = "splitContainer1"; this.tsbServer.Image = global::v2rayN.Properties.Resources.server;
resources.ApplyResources(this.tsbServer, "tsbServer");
this.tsbServer.Name = "tsbServer";
// //
// splitContainer1.Panel1 // scBig
// //
this.splitContainer1.Panel1.Controls.Add(this.groupBox1); resources.ApplyResources(this.scBig, "scBig");
this.scBig.Name = "scBig";
// //
// splitContainer1.Panel2 // scBig.Panel1
// //
this.splitContainer1.Panel2.Controls.Add(this.gbMsgTitle); this.scBig.Panel1.Controls.Add(this.gbServers);
// //
// groupBox1 // scBig.Panel2
// //
this.groupBox1.Controls.Add(this.scMain); this.scBig.Panel2.Controls.Add(this.mainMsgControl);
resources.ApplyResources(this.groupBox1, "groupBox1");
this.groupBox1.Name = "groupBox1";
this.groupBox1.TabStop = false;
// //
// gbMsgTitle // gbServers
// //
this.gbMsgTitle.Controls.Add(this.txtMsgBox); this.gbServers.Controls.Add(this.scServers);
this.gbMsgTitle.Controls.Add(this.ssMain); resources.ApplyResources(this.gbServers, "gbServers");
resources.ApplyResources(this.gbMsgTitle, "gbMsgTitle"); this.gbServers.Name = "gbServers";
this.gbMsgTitle.Name = "gbMsgTitle"; this.gbServers.TabStop = false;
this.gbMsgTitle.TabStop = false;
// //
// txtMsgBox // mainMsgControl
// //
this.txtMsgBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(49)))), ((int)(((byte)(52))))); resources.ApplyResources(this.mainMsgControl, "mainMsgControl");
this.txtMsgBox.BorderStyle = System.Windows.Forms.BorderStyle.None; this.mainMsgControl.Name = "mainMsgControl";
this.txtMsgBox.ContextMenuStrip = this.cmsMsgBox;
resources.ApplyResources(this.txtMsgBox, "txtMsgBox");
this.txtMsgBox.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(226)))), ((int)(((byte)(228)))));
this.txtMsgBox.Name = "txtMsgBox";
this.txtMsgBox.ReadOnly = true;
this.txtMsgBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtMsgBox_KeyDown);
//
// cmsMsgBox
//
this.cmsMsgBox.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuMsgBoxSelectAll,
this.menuMsgBoxCopy,
this.menuMsgBoxCopyAll,
this.menuMsgBoxClear,
this.menuMsgBoxAddRoutingRule,
this.menuMsgBoxFilter});
this.cmsMsgBox.Name = "cmsMsgBox";
resources.ApplyResources(this.cmsMsgBox, "cmsMsgBox");
//
// menuMsgBoxSelectAll
//
this.menuMsgBoxSelectAll.Name = "menuMsgBoxSelectAll";
resources.ApplyResources(this.menuMsgBoxSelectAll, "menuMsgBoxSelectAll");
this.menuMsgBoxSelectAll.Click += new System.EventHandler(this.menuMsgBoxSelectAll_Click);
//
// menuMsgBoxCopy
//
this.menuMsgBoxCopy.Name = "menuMsgBoxCopy";
resources.ApplyResources(this.menuMsgBoxCopy, "menuMsgBoxCopy");
this.menuMsgBoxCopy.Click += new System.EventHandler(this.menuMsgBoxCopy_Click);
//
// menuMsgBoxCopyAll
//
this.menuMsgBoxCopyAll.Name = "menuMsgBoxCopyAll";
resources.ApplyResources(this.menuMsgBoxCopyAll, "menuMsgBoxCopyAll");
this.menuMsgBoxCopyAll.Click += new System.EventHandler(this.menuMsgBoxCopyAll_Click);
//
// menuMsgBoxClear
//
this.menuMsgBoxClear.Name = "menuMsgBoxClear";
resources.ApplyResources(this.menuMsgBoxClear, "menuMsgBoxClear");
this.menuMsgBoxClear.Click += new System.EventHandler(this.menuMsgBoxClear_Click);
//
// menuMsgBoxAddRoutingRule
//
this.menuMsgBoxAddRoutingRule.Name = "menuMsgBoxAddRoutingRule";
resources.ApplyResources(this.menuMsgBoxAddRoutingRule, "menuMsgBoxAddRoutingRule");
this.menuMsgBoxAddRoutingRule.Click += new System.EventHandler(this.menuMsgBoxAddRoutingRule_Click);
//
// menuMsgBoxFilter
//
this.menuMsgBoxFilter.Name = "menuMsgBoxFilter";
resources.ApplyResources(this.menuMsgBoxFilter, "menuMsgBoxFilter");
this.menuMsgBoxFilter.Click += new System.EventHandler(this.menuMsgBoxFilter_Click);
//
// ssMain
//
this.ssMain.ImageScalingSize = new System.Drawing.Size(20, 20);
this.ssMain.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolSslInboundInfo,
this.toolSslBlank1,
this.toolSslRoutingRule,
this.toolSslBlank2,
this.toolSslServerSpeed,
this.toolSslBlank4});
resources.ApplyResources(this.ssMain, "ssMain");
this.ssMain.Name = "ssMain";
this.ssMain.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.ssMain_ItemClicked);
//
// toolSslInboundInfo
//
this.toolSslInboundInfo.Name = "toolSslInboundInfo";
resources.ApplyResources(this.toolSslInboundInfo, "toolSslInboundInfo");
//
// toolSslBlank1
//
resources.ApplyResources(this.toolSslBlank1, "toolSslBlank1");
this.toolSslBlank1.Name = "toolSslBlank1";
this.toolSslBlank1.Spring = true;
//
// toolSslRoutingRule
//
this.toolSslRoutingRule.Name = "toolSslRoutingRule";
resources.ApplyResources(this.toolSslRoutingRule, "toolSslRoutingRule");
//
// toolSslBlank2
//
this.toolSslBlank2.Name = "toolSslBlank2";
resources.ApplyResources(this.toolSslBlank2, "toolSslBlank2");
this.toolSslBlank2.Spring = true;
//
// toolSslServerSpeed
//
resources.ApplyResources(this.toolSslServerSpeed, "toolSslServerSpeed");
this.toolSslServerSpeed.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.toolSslServerSpeed.Name = "toolSslServerSpeed";
//
// toolSslBlank4
//
this.toolSslBlank4.Name = "toolSslBlank4";
resources.ApplyResources(this.toolSslBlank4, "toolSslBlank4");
// //
// notifyMain // notifyMain
// //
@@ -924,7 +812,7 @@
// //
resources.ApplyResources(this, "$this"); resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.splitContainer1); this.Controls.Add(this.scBig);
this.Controls.Add(this.panel1); this.Controls.Add(this.panel1);
this.Controls.Add(this.tsMain); this.Controls.Add(this.tsMain);
this.MaximizeBox = true; this.MaximizeBox = true;
@@ -935,21 +823,16 @@
this.Shown += new System.EventHandler(this.MainForm_Shown); this.Shown += new System.EventHandler(this.MainForm_Shown);
this.VisibleChanged += new System.EventHandler(this.MainForm_VisibleChanged); this.VisibleChanged += new System.EventHandler(this.MainForm_VisibleChanged);
this.Resize += new System.EventHandler(this.MainForm_Resize); this.Resize += new System.EventHandler(this.MainForm_Resize);
this.scMain.Panel1.ResumeLayout(false); this.scServers.Panel1.ResumeLayout(false);
this.scMain.Panel2.ResumeLayout(false); this.scServers.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.scMain)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.scServers)).EndInit();
this.scMain.ResumeLayout(false); this.scServers.ResumeLayout(false);
this.cmsLv.ResumeLayout(false); this.cmsLv.ResumeLayout(false);
this.splitContainer1.Panel1.ResumeLayout(false); this.scBig.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false); this.scBig.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.scBig)).EndInit();
this.splitContainer1.ResumeLayout(false); this.scBig.ResumeLayout(false);
this.groupBox1.ResumeLayout(false); this.gbServers.ResumeLayout(false);
this.gbMsgTitle.ResumeLayout(false);
this.gbMsgTitle.PerformLayout();
this.cmsMsgBox.ResumeLayout(false);
this.ssMain.ResumeLayout(false);
this.ssMain.PerformLayout();
this.cmsMain.ResumeLayout(false); this.cmsMain.ResumeLayout(false);
this.tsMain.ResumeLayout(false); this.tsMain.ResumeLayout(false);
this.tsMain.PerformLayout(); this.tsMain.PerformLayout();
@@ -960,9 +843,7 @@
#endregion #endregion
private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.GroupBox gbServers;
private System.Windows.Forms.GroupBox gbMsgTitle;
private System.Windows.Forms.TextBox txtMsgBox;
private v2rayN.Base.ListViewFlickerFree lvServers; private v2rayN.Base.ListViewFlickerFree lvServers;
private System.Windows.Forms.NotifyIcon notifyMain; private System.Windows.Forms.NotifyIcon notifyMain;
private System.Windows.Forms.ContextMenuStrip cmsMain; private System.Windows.Forms.ContextMenuStrip cmsMain;
@@ -986,10 +867,6 @@
private System.Windows.Forms.ToolStripSeparator toolStripSeparator5; private System.Windows.Forms.ToolStripSeparator toolStripSeparator5;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator6; private System.Windows.Forms.ToolStripSeparator toolStripSeparator6;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator7; private System.Windows.Forms.ToolStripSeparator toolStripSeparator7;
private System.Windows.Forms.ToolStripMenuItem menuMoveTop;
private System.Windows.Forms.ToolStripMenuItem menuMoveUp;
private System.Windows.Forms.ToolStripMenuItem menuMoveDown;
private System.Windows.Forms.ToolStripMenuItem menuMoveBottom;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator9; private System.Windows.Forms.ToolStripSeparator toolStripSeparator9;
private System.Windows.Forms.ToolStripMenuItem menuSysAgentMode; private System.Windows.Forms.ToolStripMenuItem menuSysAgentMode;
private System.Windows.Forms.ToolStripMenuItem menuGlobal; private System.Windows.Forms.ToolStripMenuItem menuGlobal;
@@ -997,7 +874,7 @@
private System.Windows.Forms.ToolStripMenuItem menuAddCustomServer; private System.Windows.Forms.ToolStripMenuItem menuAddCustomServer;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.ToolStripMenuItem menuAddShadowsocksServer; private System.Windows.Forms.ToolStripMenuItem menuAddShadowsocksServer;
private System.Windows.Forms.SplitContainer scMain; private System.Windows.Forms.SplitContainer scServers;
private QRCodeControl qrCodeControl; private QRCodeControl qrCodeControl;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator10; private System.Windows.Forms.ToolStripSeparator toolStripSeparator10;
private System.Windows.Forms.ToolStripDropDownButton tsbCheckUpdate; private System.Windows.Forms.ToolStripDropDownButton tsbCheckUpdate;
@@ -1023,10 +900,6 @@
private System.Windows.Forms.ToolStripMenuItem tsbLanguageZhHans; private System.Windows.Forms.ToolStripMenuItem tsbLanguageZhHans;
private System.Windows.Forms.ToolStripButton tsbPromotion; private System.Windows.Forms.ToolStripButton tsbPromotion;
private System.Windows.Forms.ToolStripMenuItem menuAddSocksServer; private System.Windows.Forms.ToolStripMenuItem menuAddSocksServer;
private System.Windows.Forms.StatusStrip ssMain;
private System.Windows.Forms.ToolStripStatusLabel toolSslBlank1;
private System.Windows.Forms.ToolStripStatusLabel toolSslServerSpeed;
private System.Windows.Forms.ToolStripStatusLabel toolSslBlank4;
private System.Windows.Forms.ToolStripMenuItem menuRemoveDuplicateServer; private System.Windows.Forms.ToolStripMenuItem menuRemoveDuplicateServer;
private System.Windows.Forms.ToolStripMenuItem menuTcpingServer; private System.Windows.Forms.ToolStripMenuItem menuTcpingServer;
private System.Windows.Forms.ToolStripMenuItem menuRealPingServer; private System.Windows.Forms.ToolStripMenuItem menuRealPingServer;
@@ -1045,27 +918,24 @@
private System.Windows.Forms.ToolStripMenuItem menuClearServerStatistics; private System.Windows.Forms.ToolStripMenuItem menuClearServerStatistics;
private System.Windows.Forms.ToolStripMenuItem menuRoutings; private System.Windows.Forms.ToolStripMenuItem menuRoutings;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator13; private System.Windows.Forms.ToolStripSeparator toolStripSeparator13;
private System.Windows.Forms.ContextMenuStrip cmsMsgBox;
private System.Windows.Forms.ToolStripMenuItem menuMsgBoxSelectAll;
private System.Windows.Forms.ToolStripMenuItem menuMsgBoxCopy;
private System.Windows.Forms.ToolStripMenuItem menuMsgBoxAddRoutingRule;
private System.Windows.Forms.ToolStripMenuItem menuMsgBoxCopyAll;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator14; private System.Windows.Forms.ToolStripSeparator toolStripSeparator14;
private System.Windows.Forms.ToolStripMenuItem tsbBackupGuiNConfig; private System.Windows.Forms.ToolStripMenuItem tsbBackupGuiNConfig;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator15; private System.Windows.Forms.ToolStripSeparator toolStripSeparator15;
private System.Windows.Forms.ToolStripMenuItem tsbCheckUpdateGeo; private System.Windows.Forms.ToolStripMenuItem tsbCheckUpdateGeo;
private System.Windows.Forms.SplitContainer splitContainer1; private System.Windows.Forms.SplitContainer scBig;
private System.Windows.Forms.ToolStripMenuItem menuMsgBoxFilter;
private System.Windows.Forms.ToolStripStatusLabel toolSslInboundInfo;
private System.Windows.Forms.ToolStripStatusLabel toolSslRoutingRule;
private System.Windows.Forms.ToolStripStatusLabel toolSslBlank2;
private System.Windows.Forms.ToolStripMenuItem tsbSubUpdateViaProxy; private System.Windows.Forms.ToolStripMenuItem tsbSubUpdateViaProxy;
private System.Windows.Forms.ToolStripMenuItem menuUpdateSubViaProxy; private System.Windows.Forms.ToolStripMenuItem menuUpdateSubViaProxy;
private System.Windows.Forms.ToolStripMenuItem menuMsgBoxClear;
private System.Windows.Forms.ToolStripMenuItem tsbGlobalHotkeySetting; private System.Windows.Forms.ToolStripMenuItem tsbGlobalHotkeySetting;
private System.Windows.Forms.TabControl tabGroup; private System.Windows.Forms.TabControl tabGroup;
private System.Windows.Forms.ToolStripMenuItem tsbGroupSetting; private System.Windows.Forms.ToolStripMenuItem tsbGroupSetting;
private System.Windows.Forms.ToolStripMenuItem menuMoveToGroup; private System.Windows.Forms.ToolStripMenuItem menuMoveToGroup;
private MainMsgControl mainMsgControl;
private System.Windows.Forms.ToolStripMenuItem menuMoveEvent;
private System.Windows.Forms.ToolStripMenuItem menuMoveTop;
private System.Windows.Forms.ToolStripMenuItem menuMoveUp;
private System.Windows.Forms.ToolStripMenuItem menuMoveDown;
private System.Windows.Forms.ToolStripMenuItem menuMoveBottom;
private System.Windows.Forms.ToolStripMenuItem menuServerFilter;
} }
} }

View File

@@ -3,16 +3,14 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.Drawing; using System.Drawing;
using System.Linq;
using System.Text; using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using v2rayN.Base;
using v2rayN.Handler; using v2rayN.Handler;
using v2rayN.Mode; using v2rayN.Mode;
using v2rayN.Tool;
using System.Linq;
using v2rayN.Resx; using v2rayN.Resx;
using v2rayN.Tool;
namespace v2rayN.Forms namespace v2rayN.Forms
{ {
@@ -21,9 +19,9 @@ namespace v2rayN.Forms
private V2rayHandler v2rayHandler; private V2rayHandler v2rayHandler;
private List<VmessItem> lstSelecteds = new List<VmessItem>(); private List<VmessItem> lstSelecteds = new List<VmessItem>();
private StatisticsHandler statistics = null; private StatisticsHandler statistics = null;
private string MsgFilter = string.Empty;
private List<VmessItem> lstVmess = null; private List<VmessItem> lstVmess = null;
private string groupId = string.Empty; private string groupId = string.Empty;
private string serverFilter = string.Empty;
#region Window #region Window
@@ -126,7 +124,10 @@ namespace v2rayN.Forms
{ {
try try
{ {
v2rayHandler.V2rayStop(); Utils.SaveLog("MyAppExit Begin");
StorageUI();
ConfigHandler.SaveConfig(ref config);
//HttpProxyHandle.CloseHttpAgent(config); //HttpProxyHandle.CloseHttpAgent(config);
if (blWindowsShutDown) if (blWindowsShutDown)
@@ -138,17 +139,18 @@ namespace v2rayN.Forms
SysProxyHandle.UpdateSysProxy(config, true); SysProxyHandle.UpdateSysProxy(config, true);
} }
StorageUI();
ConfigHandler.SaveConfig(ref config);
statistics?.SaveToFile(); statistics?.SaveToFile();
statistics?.Close(); statistics?.Close();
v2rayHandler.V2rayStop();
Utils.SaveLog("MyAppExit End");
} }
catch { } catch { }
} }
private void RestoreUI() private void RestoreUI()
{ {
scMain.Panel2Collapsed = true; scServers.Panel2Collapsed = true;
if (!config.uiItem.mainLocation.IsEmpty) if (!config.uiItem.mainLocation.IsEmpty)
{ {
@@ -211,6 +213,7 @@ namespace v2rayN.Forms
{ {
lstVmess = config.vmess lstVmess = config.vmess
.Where(it => Utils.IsNullOrEmpty(groupId) ? true : it.groupId == groupId) .Where(it => Utils.IsNullOrEmpty(groupId) ? true : it.groupId == groupId)
.Where(it => Utils.IsNullOrEmpty(serverFilter) ? true : it.remarks.Contains(serverFilter))
.OrderBy(it => it.sort) .OrderBy(it => it.sort)
.ToList(); .ToList();
@@ -348,7 +351,7 @@ namespace v2rayN.Forms
{ {
menuServers.DropDownItems.Clear(); menuServers.DropDownItems.Clear();
if (lstVmess.Count > 30) if (lstVmess.Count > config.trayMenuServersLimit)
{ {
menuServers.DropDownItems.Add(new ToolStripMenuItem(ResUI.TooManyServersTip)); menuServers.DropDownItems.Add(new ToolStripMenuItem(ResUI.TooManyServersTip));
return; return;
@@ -392,13 +395,6 @@ namespace v2rayN.Forms
{ {
} }
private void ssMain_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
{
if (!Utils.IsNullOrEmpty(e.ClickedItem.Text))
{
Utils.SetClipboardData(e.ClickedItem.Text);
}
}
private void lvServers_ColumnClick(object sender, ColumnClickEventArgs e) private void lvServers_ColumnClick(object sender, ColumnClickEventArgs e)
{ {
@@ -527,7 +523,7 @@ namespace v2rayN.Forms
if (Global.reloadV2ray) if (Global.reloadV2ray)
{ {
ClearMsg(); mainMsgControl.ClearMsg();
} }
await Task.Run(() => await Task.Run(() =>
{ {
@@ -634,6 +630,9 @@ namespace v2rayN.Forms
case Keys.T: case Keys.T:
menuSpeedServer_Click(null, null); menuSpeedServer_Click(null, null);
break; break;
case Keys.F:
menuServerFilter_Click(null, null);
break;
} }
} }
else else
@@ -723,6 +722,17 @@ namespace v2rayN.Forms
SetDefaultServer(index); SetDefaultServer(index);
} }
private void menuServerFilter_Click(object sender, EventArgs e)
{
var fm = new MsgFilterSetForm();
fm.MsgFilter = serverFilter;
if (fm.ShowDialog() == DialogResult.OK)
{
serverFilter = fm.MsgFilter;
gbServers.Text = string.Format(ResUI.MsgServerTitle, serverFilter);
RefreshServers();
}
}
private void menuPingServer_Click(object sender, EventArgs e) private void menuPingServer_Click(object sender, EventArgs e)
{ {
@@ -767,8 +777,8 @@ namespace v2rayN.Forms
private void tsbTestMe_Click(object sender, EventArgs e) private void tsbTestMe_Click(object sender, EventArgs e)
{ {
string result = (new DownloadHandle()).RunAvailabilityCheck(null) + "ms"; var updateHandle = new UpdateHandle();
AppendText(false, string.Format(ResUI.TestMeOutput, result)); updateHandle.RunAvailabilityCheck(UpdateTaskHandler);
} }
private void menuClearStatistic_Click(object sender, EventArgs e) private void menuClearStatistic_Click(object sender, EventArgs e)
@@ -1038,68 +1048,17 @@ namespace v2rayN.Forms
AppendText(notify, msg); AppendText(notify, msg);
} }
delegate void AppendTextDelegate(string text);
void AppendText(bool notify, string msg) void AppendText(bool notify, string msg)
{ {
try try
{ {
AppendText(msg); mainMsgControl.AppendText(msg);
if (notify) if (notify)
{ {
notifyMsg(msg); notifyMsg(msg);
} }
} }
catch catch { }
{
}
}
void AppendText(string text)
{
if (this.txtMsgBox.InvokeRequired)
{
Invoke(new AppendTextDelegate(AppendText), new object[] { text });
}
else
{
if (!Utils.IsNullOrEmpty(MsgFilter))
{
if (!Regex.IsMatch(text, MsgFilter))
{
return;
}
}
//this.txtMsgBox.AppendText(text);
ShowMsg(text);
}
}
/// <summary>
/// 提示信息
/// </summary>
/// <param name="msg"></param>
private void ShowMsg(string msg)
{
if (txtMsgBox.Lines.Length > 999)
{
ClearMsg();
}
this.txtMsgBox.AppendText(msg);
if (!msg.EndsWith(Environment.NewLine))
{
this.txtMsgBox.AppendText(Environment.NewLine);
}
}
/// <summary>
/// 清除信息
/// </summary>
private void ClearMsg()
{
txtMsgBox.Invoke((Action)delegate
{
txtMsgBox.Clear();
});
} }
/// <summary> /// <summary>
@@ -1143,7 +1102,7 @@ namespace v2rayN.Forms
this.Activate(); this.Activate();
this.ShowInTaskbar = true; this.ShowInTaskbar = true;
//this.notifyIcon1.Visible = false; //this.notifyIcon1.Visible = false;
this.txtMsgBox.ScrollToCaret(); mainMsgControl.ScrollToCaret();
int index = GetLvSelectedIndex(false); int index = GetLvSelectedIndex(false);
if (index >= 0 && index < lvServers.Items.Count && lvServers.Items.Count > 0) if (index >= 0 && index < lvServers.Items.Count && lvServers.Items.Count > 0)
@@ -1211,7 +1170,7 @@ namespace v2rayN.Forms
{ {
up /= (ulong)(config.statisticsFreshRate / 1000f); up /= (ulong)(config.statisticsFreshRate / 1000f);
down /= (ulong)(config.statisticsFreshRate / 1000f); down /= (ulong)(config.statisticsFreshRate / 1000f);
toolSslServerSpeed.Text = string.Format("{0}/s↑ | {1}/s↓", Utils.HumanFy(up), Utils.HumanFy(down)); mainMsgControl.SetToolSslInfo("speed", string.Format("{0}/s↑ | {1}/s↓", Utils.HumanFy(up), Utils.HumanFy(down)));
foreach (var it in statistics) foreach (var it in statistics)
{ {
@@ -1331,26 +1290,15 @@ namespace v2rayN.Forms
} }
ConfigHandler.SaveConfig(ref config, false); ConfigHandler.SaveConfig(ref config, false);
DisplayToolStatus();
}
private void DisplayToolStatus() mainMsgControl.DisplayToolStatus(config);
{
StringBuilder sb = new StringBuilder();
sb.Append($"{Global.InboundSocks} {Global.Loopback}:{config.GetLocalPort(Global.InboundSocks)}");
sb.Append(" | ");
sb.Append($"{Global.InboundHttp} {Global.Loopback}:{config.GetLocalPort(Global.InboundHttp)}");
if (config.sysProxyType == ESysProxyType.ForcedChange) this.BeginInvoke(new Action(() =>
{ {
sb.Append(" | "); notifyMain.Icon = this.Icon = MainFormHandler.Instance.GetNotifyIcon(config, this.Icon);
sb.Append($"{ResUI.SystemProxy} {Global.Loopback}:{config.GetLocalPort(Global.InboundHttp2)}"); }));
}
toolSslInboundInfo.Text = sb.ToString();
notifyMain.Icon = MainFormHandler.Instance.GetNotifyIcon(config, this.Icon);
} }
#endregion #endregion
@@ -1480,7 +1428,7 @@ namespace v2rayN.Forms
private void tsbQRCodeSwitch_CheckedChanged(object sender, EventArgs e) private void tsbQRCodeSwitch_CheckedChanged(object sender, EventArgs e)
{ {
bool bShow = tsbQRCodeSwitch.Checked; bool bShow = tsbQRCodeSwitch.Checked;
scMain.Panel2Collapsed = !bShow; scServers.Panel2Collapsed = !bShow;
} }
#endregion #endregion
@@ -1501,10 +1449,6 @@ namespace v2rayN.Forms
//Application.Restart(); //Application.Restart();
} }
#endregion #endregion
@@ -1518,7 +1462,7 @@ namespace v2rayN.Forms
menuRoutings.Visible = config.enableRoutingAdvanced; menuRoutings.Visible = config.enableRoutingAdvanced;
if (!config.enableRoutingAdvanced) if (!config.enableRoutingAdvanced)
{ {
toolSslRoutingRule.Text = string.Empty; mainMsgControl.SetToolSslInfo("routing", string.Empty);
return; return;
} }
@@ -1541,7 +1485,7 @@ namespace v2rayN.Forms
if (config.routingIndex.Equals(k)) if (config.routingIndex.Equals(k))
{ {
ts.Checked = true; ts.Checked = true;
toolSslRoutingRule.Text = item.remarks; mainMsgControl.SetToolSslInfo("routing", item.remarks);
} }
ts.Click += new EventHandler(ts_Routing_Click); ts.Click += new EventHandler(ts_Routing_Click);
lst.Add(ts); lst.Add(ts);
@@ -1568,65 +1512,5 @@ namespace v2rayN.Forms
} }
#endregion #endregion
#region MsgBoxMenu
private void menuMsgBoxSelectAll_Click(object sender, EventArgs e)
{
this.txtMsgBox.Focus();
this.txtMsgBox.SelectAll();
}
private void menuMsgBoxCopy_Click(object sender, EventArgs e)
{
var data = this.txtMsgBox.SelectedText.TrimEx();
Utils.SetClipboardData(data);
}
private void menuMsgBoxCopyAll_Click(object sender, EventArgs e)
{
var data = this.txtMsgBox.Text;
Utils.SetClipboardData(data);
}
private void menuMsgBoxClear_Click(object sender, EventArgs e)
{
this.txtMsgBox.Clear();
}
private void menuMsgBoxAddRoutingRule_Click(object sender, EventArgs e)
{
menuMsgBoxCopy_Click(null, null);
tsbRoutingSetting_Click(null, null);
}
private void txtMsgBox_KeyDown(object sender, KeyEventArgs e)
{
if (e.Control)
{
switch (e.KeyCode)
{
case Keys.A:
menuMsgBoxSelectAll_Click(null, null);
break;
case Keys.C:
menuMsgBoxCopy_Click(null, null);
break;
case Keys.V:
menuMsgBoxAddRoutingRule_Click(null, null);
break;
}
}
}
private void menuMsgBoxFilter_Click(object sender, EventArgs e)
{
var fm = new MsgFilterSetForm();
fm.MsgFilter = MsgFilter;
if (fm.ShowDialog() == DialogResult.OK)
{
MsgFilter = fm.MsgFilter;
gbMsgTitle.Text = string.Format(ResUI.MsgInformationTitle, MsgFilter);
}
}
#endregion
} }
} }

View File

@@ -118,15 +118,15 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="scMain.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms"> <data name="scServers.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value> <value>Fill</value>
</data> </data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="scMain.Location" type="System.Drawing.Point, System.Drawing"> <data name="scServers.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 17</value> <value>3, 17</value>
</data> </data>
<metadata name="cmsLv.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="cmsLv.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>327, 17</value> <value>226, 19</value>
</metadata> </metadata>
<data name="menuAddVmessServer.Size" type="System.Drawing.Size, System.Drawing"> <data name="menuAddVmessServer.Size" type="System.Drawing.Size, System.Drawing">
<value>355, 22</value> <value>355, 22</value>
@@ -203,6 +203,12 @@
<data name="menuSetDefaultServer.Text" xml:space="preserve"> <data name="menuSetDefaultServer.Text" xml:space="preserve">
<value>Set as active server (Enter)</value> <value>Set as active server (Enter)</value>
</data> </data>
<data name="menuServerFilter.Size" type="System.Drawing.Size, System.Drawing">
<value>355, 22</value>
</data>
<data name="menuServerFilter.Text" xml:space="preserve">
<value>Set server filter (Ctrl+F)</value>
</data>
<data name="toolStripSeparator3.Size" type="System.Drawing.Size, System.Drawing"> <data name="toolStripSeparator3.Size" type="System.Drawing.Size, System.Drawing">
<value>352, 6</value> <value>352, 6</value>
</data> </data>
@@ -213,29 +219,35 @@
<value>Move to Group</value> <value>Move to Group</value>
</data> </data>
<data name="menuMoveTop.Size" type="System.Drawing.Size, System.Drawing"> <data name="menuMoveTop.Size" type="System.Drawing.Size, System.Drawing">
<value>355, 22</value> <value>192, 22</value>
</data> </data>
<data name="menuMoveTop.Text" xml:space="preserve"> <data name="menuMoveTop.Text" xml:space="preserve">
<value>Move to top (T)</value> <value>Move to top (T)</value>
</data> </data>
<data name="menuMoveUp.Size" type="System.Drawing.Size, System.Drawing"> <data name="menuMoveUp.Size" type="System.Drawing.Size, System.Drawing">
<value>355, 22</value> <value>192, 22</value>
</data> </data>
<data name="menuMoveUp.Text" xml:space="preserve"> <data name="menuMoveUp.Text" xml:space="preserve">
<value>Up (U)</value> <value>Up (U)</value>
</data> </data>
<data name="menuMoveDown.Size" type="System.Drawing.Size, System.Drawing"> <data name="menuMoveDown.Size" type="System.Drawing.Size, System.Drawing">
<value>355, 22</value> <value>192, 22</value>
</data> </data>
<data name="menuMoveDown.Text" xml:space="preserve"> <data name="menuMoveDown.Text" xml:space="preserve">
<value>Down (D)</value> <value>Down (D)</value>
</data> </data>
<data name="menuMoveBottom.Size" type="System.Drawing.Size, System.Drawing"> <data name="menuMoveBottom.Size" type="System.Drawing.Size, System.Drawing">
<value>355, 22</value> <value>192, 22</value>
</data> </data>
<data name="menuMoveBottom.Text" xml:space="preserve"> <data name="menuMoveBottom.Text" xml:space="preserve">
<value>Move to bottom (B)</value> <value>Move to bottom (B)</value>
</data> </data>
<data name="menuMoveEvent.Size" type="System.Drawing.Size, System.Drawing">
<value>355, 22</value>
</data>
<data name="menuMoveEvent.Text" xml:space="preserve">
<value>Move to</value>
</data>
<data name="menuSelectAll.Size" type="System.Drawing.Size, System.Drawing"> <data name="menuSelectAll.Size" type="System.Drawing.Size, System.Drawing">
<value>355, 22</value> <value>355, 22</value>
</data> </data>
@@ -308,20 +320,8 @@
<data name="menuExport2SubContent.Text" xml:space="preserve"> <data name="menuExport2SubContent.Text" xml:space="preserve">
<value>Export subscription (base64) share to clipboard</value> <value>Export subscription (base64) share to clipboard</value>
</data> </data>
<data name="tsbServer.ImageTransparentColor" type="System.Drawing.Color, System.Drawing">
<value>Magenta</value>
</data>
<data name="tsbServer.Size" type="System.Drawing.Size, System.Drawing">
<value>64, 53</value>
</data>
<data name="tsbServer.Text" xml:space="preserve">
<value>Servers</value>
</data>
<data name="tsbServer.TextImageRelation" type="System.Windows.Forms.TextImageRelation, System.Windows.Forms">
<value>ImageAboveText</value>
</data>
<data name="cmsLv.Size" type="System.Drawing.Size, System.Drawing"> <data name="cmsLv.Size" type="System.Drawing.Size, System.Drawing">
<value>356, 644</value> <value>356, 622</value>
</data> </data>
<data name="&gt;&gt;cmsLv.Name" xml:space="preserve"> <data name="&gt;&gt;cmsLv.Name" xml:space="preserve">
<value>cmsLv</value> <value>cmsLv</value>
@@ -366,7 +366,7 @@
<value>v2rayN.Base.ListViewFlickerFree, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value> <value>v2rayN.Base.ListViewFlickerFree, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data> </data>
<data name="&gt;&gt;lvServers.Parent" xml:space="preserve"> <data name="&gt;&gt;lvServers.Parent" xml:space="preserve">
<value>scMain.Panel1</value> <value>scServers.Panel1</value>
</data> </data>
<data name="&gt;&gt;lvServers.ZOrder" xml:space="preserve"> <data name="&gt;&gt;lvServers.ZOrder" xml:space="preserve">
<value>0</value> <value>0</value>
@@ -390,21 +390,21 @@
<value>System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="&gt;&gt;tabGroup.Parent" xml:space="preserve"> <data name="&gt;&gt;tabGroup.Parent" xml:space="preserve">
<value>scMain.Panel1</value> <value>scServers.Panel1</value>
</data> </data>
<data name="&gt;&gt;tabGroup.ZOrder" xml:space="preserve"> <data name="&gt;&gt;tabGroup.ZOrder" xml:space="preserve">
<value>1</value> <value>1</value>
</data> </data>
<data name="&gt;&gt;scMain.Panel1.Name" xml:space="preserve"> <data name="&gt;&gt;scServers.Panel1.Name" xml:space="preserve">
<value>scMain.Panel1</value> <value>scServers.Panel1</value>
</data> </data>
<data name="&gt;&gt;scMain.Panel1.Type" xml:space="preserve"> <data name="&gt;&gt;scServers.Panel1.Type" xml:space="preserve">
<value>System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="&gt;&gt;scMain.Panel1.Parent" xml:space="preserve"> <data name="&gt;&gt;scServers.Panel1.Parent" xml:space="preserve">
<value>scMain</value> <value>scServers</value>
</data> </data>
<data name="&gt;&gt;scMain.Panel1.ZOrder" xml:space="preserve"> <data name="&gt;&gt;scServers.Panel1.ZOrder" xml:space="preserve">
<value>0</value> <value>0</value>
</data> </data>
<data name="qrCodeControl.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms"> <data name="qrCodeControl.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
@@ -429,298 +429,160 @@
<value>v2rayN.Forms.QRCodeControl, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value> <value>v2rayN.Forms.QRCodeControl, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data> </data>
<data name="&gt;&gt;qrCodeControl.Parent" xml:space="preserve"> <data name="&gt;&gt;qrCodeControl.Parent" xml:space="preserve">
<value>scMain.Panel2</value> <value>scServers.Panel2</value>
</data> </data>
<data name="&gt;&gt;qrCodeControl.ZOrder" xml:space="preserve"> <data name="&gt;&gt;qrCodeControl.ZOrder" xml:space="preserve">
<value>0</value> <value>0</value>
</data> </data>
<data name="&gt;&gt;scMain.Panel2.Name" xml:space="preserve"> <data name="&gt;&gt;scServers.Panel2.Name" xml:space="preserve">
<value>scMain.Panel2</value> <value>scServers.Panel2</value>
</data> </data>
<data name="&gt;&gt;scMain.Panel2.Type" xml:space="preserve"> <data name="&gt;&gt;scServers.Panel2.Type" xml:space="preserve">
<value>System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="&gt;&gt;scMain.Panel2.Parent" xml:space="preserve"> <data name="&gt;&gt;scServers.Panel2.Parent" xml:space="preserve">
<value>scMain</value> <value>scServers</value>
</data> </data>
<data name="&gt;&gt;scMain.Panel2.ZOrder" xml:space="preserve"> <data name="&gt;&gt;scServers.Panel2.ZOrder" xml:space="preserve">
<value>1</value> <value>1</value>
</data> </data>
<data name="scMain.Panel2MinSize" type="System.Int32, mscorlib"> <data name="scServers.Panel2MinSize" type="System.Int32, mscorlib">
<value>100</value> <value>100</value>
</data> </data>
<data name="scMain.Size" type="System.Drawing.Size, System.Drawing"> <data name="scServers.Size" type="System.Drawing.Size, System.Drawing">
<value>946, 280</value> <value>946, 280</value>
</data> </data>
<data name="scMain.SplitterDistance" type="System.Int32, mscorlib"> <data name="scServers.SplitterDistance" type="System.Int32, mscorlib">
<value>686</value> <value>686</value>
</data> </data>
<data name="scMain.TabIndex" type="System.Int32, mscorlib"> <data name="scServers.TabIndex" type="System.Int32, mscorlib">
<value>0</value> <value>0</value>
</data> </data>
<data name="&gt;&gt;scMain.Name" xml:space="preserve"> <data name="&gt;&gt;scServers.Name" xml:space="preserve">
<value>scMain</value> <value>scServers</value>
</data> </data>
<data name="&gt;&gt;scMain.Type" xml:space="preserve"> <data name="&gt;&gt;scServers.Type" xml:space="preserve">
<value>System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="&gt;&gt;scMain.Parent" xml:space="preserve"> <data name="&gt;&gt;scServers.Parent" xml:space="preserve">
<value>groupBox1</value> <value>gbServers</value>
</data> </data>
<data name="&gt;&gt;scMain.ZOrder" xml:space="preserve"> <data name="&gt;&gt;scServers.ZOrder" xml:space="preserve">
<value>0</value> <value>0</value>
</data> </data>
<data name="splitContainer1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms"> <data name="tsbServer.ImageTransparentColor" type="System.Drawing.Color, System.Drawing">
<value>Magenta</value>
</data>
<data name="tsbServer.Size" type="System.Drawing.Size, System.Drawing">
<value>64, 53</value>
</data>
<data name="tsbServer.Text" xml:space="preserve">
<value>Servers</value>
</data>
<data name="tsbServer.TextImageRelation" type="System.Windows.Forms.TextImageRelation, System.Windows.Forms">
<value>ImageAboveText</value>
</data>
<data name="scBig.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value> <value>Fill</value>
</data> </data>
<data name="splitContainer1.Location" type="System.Drawing.Point, System.Drawing"> <data name="scBig.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 66</value> <value>0, 66</value>
</data> </data>
<data name="splitContainer1.Orientation" type="System.Windows.Forms.Orientation, System.Windows.Forms"> <data name="scBig.Orientation" type="System.Windows.Forms.Orientation, System.Windows.Forms">
<value>Horizontal</value> <value>Horizontal</value>
</data> </data>
<data name="groupBox1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms"> <data name="gbServers.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value> <value>Fill</value>
</data> </data>
<data name="groupBox1.Location" type="System.Drawing.Point, System.Drawing"> <data name="gbServers.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value> <value>0, 0</value>
</data> </data>
<data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing"> <data name="gbServers.Size" type="System.Drawing.Size, System.Drawing">
<value>952, 300</value> <value>952, 300</value>
</data> </data>
<data name="groupBox1.TabIndex" type="System.Int32, mscorlib"> <data name="gbServers.TabIndex" type="System.Int32, mscorlib">
<value>0</value> <value>0</value>
</data> </data>
<data name="&gt;&gt;groupBox1.Name" xml:space="preserve"> <data name="&gt;&gt;gbServers.Name" xml:space="preserve">
<value>groupBox1</value> <value>gbServers</value>
</data> </data>
<data name="&gt;&gt;groupBox1.Type" xml:space="preserve"> <data name="&gt;&gt;gbServers.Type" xml:space="preserve">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="&gt;&gt;groupBox1.Parent" xml:space="preserve"> <data name="&gt;&gt;gbServers.Parent" xml:space="preserve">
<value>splitContainer1.Panel1</value> <value>scBig.Panel1</value>
</data> </data>
<data name="&gt;&gt;groupBox1.ZOrder" xml:space="preserve"> <data name="&gt;&gt;gbServers.ZOrder" xml:space="preserve">
<value>0</value> <value>0</value>
</data> </data>
<data name="&gt;&gt;splitContainer1.Panel1.Name" xml:space="preserve"> <data name="&gt;&gt;scBig.Panel1.Name" xml:space="preserve">
<value>splitContainer1.Panel1</value> <value>scBig.Panel1</value>
</data> </data>
<data name="&gt;&gt;splitContainer1.Panel1.Type" xml:space="preserve"> <data name="&gt;&gt;scBig.Panel1.Type" xml:space="preserve">
<value>System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="&gt;&gt;splitContainer1.Panel1.Parent" xml:space="preserve"> <data name="&gt;&gt;scBig.Panel1.Parent" xml:space="preserve">
<value>splitContainer1</value> <value>scBig</value>
</data> </data>
<data name="&gt;&gt;splitContainer1.Panel1.ZOrder" xml:space="preserve"> <data name="&gt;&gt;scBig.Panel1.ZOrder" xml:space="preserve">
<value>0</value> <value>0</value>
</data> </data>
<metadata name="cmsMsgBox.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <data name="mainMsgControl.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>493, 20</value>
</metadata>
<data name="menuMsgBoxSelectAll.Size" type="System.Drawing.Size, System.Drawing">
<value>227, 22</value>
</data>
<data name="menuMsgBoxSelectAll.Text" xml:space="preserve">
<value>Select All (Ctrl+A)</value>
</data>
<data name="menuMsgBoxCopy.Size" type="System.Drawing.Size, System.Drawing">
<value>227, 22</value>
</data>
<data name="menuMsgBoxCopy.Text" xml:space="preserve">
<value>Copy (Ctrl+C)</value>
</data>
<data name="menuMsgBoxCopyAll.Size" type="System.Drawing.Size, System.Drawing">
<value>227, 22</value>
</data>
<data name="menuMsgBoxCopyAll.Text" xml:space="preserve">
<value>Copy All</value>
</data>
<data name="menuMsgBoxClear.Size" type="System.Drawing.Size, System.Drawing">
<value>227, 22</value>
</data>
<data name="menuMsgBoxClear.Text" xml:space="preserve">
<value>Clear All</value>
</data>
<data name="menuMsgBoxAddRoutingRule.Size" type="System.Drawing.Size, System.Drawing">
<value>227, 22</value>
</data>
<data name="menuMsgBoxAddRoutingRule.Text" xml:space="preserve">
<value>Add Routing Rule (Ctrl+V)</value>
</data>
<data name="menuMsgBoxFilter.Size" type="System.Drawing.Size, System.Drawing">
<value>227, 22</value>
</data>
<data name="menuMsgBoxFilter.Text" xml:space="preserve">
<value>Set message filters</value>
</data>
<data name="cmsMsgBox.Size" type="System.Drawing.Size, System.Drawing">
<value>228, 136</value>
</data>
<data name="&gt;&gt;cmsMsgBox.Name" xml:space="preserve">
<value>cmsMsgBox</value>
</data>
<data name="&gt;&gt;cmsMsgBox.Type" xml:space="preserve">
<value>System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="txtMsgBox.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value> <value>Fill</value>
</data> </data>
<data name="txtMsgBox.Location" type="System.Drawing.Point, System.Drawing"> <data name="mainMsgControl.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 17</value>
</data>
<data name="txtMsgBox.MaxLength" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="txtMsgBox.Multiline" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="txtMsgBox.ScrollBars" type="System.Windows.Forms.ScrollBars, System.Windows.Forms">
<value>Vertical</value>
</data>
<data name="txtMsgBox.Size" type="System.Drawing.Size, System.Drawing">
<value>946, 177</value>
</data>
<data name="txtMsgBox.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="&gt;&gt;txtMsgBox.Name" xml:space="preserve">
<value>txtMsgBox</value>
</data>
<data name="&gt;&gt;txtMsgBox.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtMsgBox.Parent" xml:space="preserve">
<value>gbMsgTitle</value>
</data>
<data name="&gt;&gt;txtMsgBox.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<metadata name="ssMain.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>228, 18</value>
</metadata>
<data name="toolSslInboundInfo.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 21</value>
</data>
<data name="toolSslInboundInfo.Text" xml:space="preserve">
<value>InboundInfo</value>
</data>
<data name="toolSslBlank1.Font" type="System.Drawing.Font, System.Drawing">
<value>微软雅黑, 8pt</value>
</data>
<data name="toolSslBlank1.Size" type="System.Drawing.Size, System.Drawing">
<value>300, 21</value>
</data>
<data name="toolSslRoutingRule.Size" type="System.Drawing.Size, System.Drawing">
<value>0, 21</value>
</data>
<data name="toolSslBlank2.Size" type="System.Drawing.Size, System.Drawing">
<value>300, 21</value>
</data>
<data name="toolSslServerSpeed.AutoSize" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="toolSslServerSpeed.Font" type="System.Drawing.Font, System.Drawing">
<value>微软雅黑, 8pt</value>
</data>
<data name="toolSslServerSpeed.RightToLeft" type="System.Windows.Forms.RightToLeft, System.Windows.Forms">
<value>No</value>
</data>
<data name="toolSslServerSpeed.Size" type="System.Drawing.Size, System.Drawing">
<value>250, 21</value>
</data>
<data name="toolSslServerSpeed.Text" xml:space="preserve">
<value>SPEED Disabled</value>
</data>
<data name="toolSslServerSpeed.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleRight</value>
</data>
<data name="toolSslBlank4.Size" type="System.Drawing.Size, System.Drawing">
<value>0, 21</value>
</data>
<data name="ssMain.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 194</value>
</data>
<data name="ssMain.Size" type="System.Drawing.Size, System.Drawing">
<value>946, 26</value>
</data>
<data name="ssMain.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="ssMain.Text" xml:space="preserve">
<value>statusStrip1</value>
</data>
<data name="&gt;&gt;ssMain.Name" xml:space="preserve">
<value>ssMain</value>
</data>
<data name="&gt;&gt;ssMain.Type" xml:space="preserve">
<value>System.Windows.Forms.StatusStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;ssMain.Parent" xml:space="preserve">
<value>gbMsgTitle</value>
</data>
<data name="&gt;&gt;ssMain.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="gbMsgTitle.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="gbMsgTitle.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value> <value>0, 0</value>
</data> </data>
<data name="gbMsgTitle.Size" type="System.Drawing.Size, System.Drawing"> <data name="mainMsgControl.Size" type="System.Drawing.Size, System.Drawing">
<value>952, 223</value> <value>952, 223</value>
</data> </data>
<data name="gbMsgTitle.TabIndex" type="System.Int32, mscorlib"> <data name="mainMsgControl.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="gbMsgTitle.Text" xml:space="preserve">
<value>Informations</value>
</data>
<data name="&gt;&gt;gbMsgTitle.Name" xml:space="preserve">
<value>gbMsgTitle</value>
</data>
<data name="&gt;&gt;gbMsgTitle.Type" xml:space="preserve">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;gbMsgTitle.Parent" xml:space="preserve">
<value>splitContainer1.Panel2</value>
</data>
<data name="&gt;&gt;gbMsgTitle.ZOrder" xml:space="preserve">
<value>0</value> <value>0</value>
</data> </data>
<data name="&gt;&gt;splitContainer1.Panel2.Name" xml:space="preserve"> <data name="&gt;&gt;mainMsgControl.Name" xml:space="preserve">
<value>splitContainer1.Panel2</value> <value>mainMsgControl</value>
</data> </data>
<data name="&gt;&gt;splitContainer1.Panel2.Type" xml:space="preserve"> <data name="&gt;&gt;mainMsgControl.Type" xml:space="preserve">
<value>v2rayN.Forms.MainMsgControl, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;mainMsgControl.Parent" xml:space="preserve">
<value>scBig.Panel2</value>
</data>
<data name="&gt;&gt;mainMsgControl.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;scBig.Panel2.Name" xml:space="preserve">
<value>scBig.Panel2</value>
</data>
<data name="&gt;&gt;scBig.Panel2.Type" xml:space="preserve">
<value>System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="&gt;&gt;splitContainer1.Panel2.Parent" xml:space="preserve"> <data name="&gt;&gt;scBig.Panel2.Parent" xml:space="preserve">
<value>splitContainer1</value> <value>scBig</value>
</data> </data>
<data name="&gt;&gt;splitContainer1.Panel2.ZOrder" xml:space="preserve"> <data name="&gt;&gt;scBig.Panel2.ZOrder" xml:space="preserve">
<value>1</value> <value>1</value>
</data> </data>
<data name="splitContainer1.Size" type="System.Drawing.Size, System.Drawing"> <data name="scBig.Size" type="System.Drawing.Size, System.Drawing">
<value>952, 527</value> <value>952, 527</value>
</data> </data>
<data name="splitContainer1.SplitterDistance" type="System.Int32, mscorlib"> <data name="scBig.SplitterDistance" type="System.Int32, mscorlib">
<value>300</value> <value>300</value>
</data> </data>
<data name="splitContainer1.TabIndex" type="System.Int32, mscorlib"> <data name="scBig.TabIndex" type="System.Int32, mscorlib">
<value>5</value> <value>5</value>
</data> </data>
<data name="&gt;&gt;splitContainer1.Name" xml:space="preserve"> <data name="&gt;&gt;scBig.Name" xml:space="preserve">
<value>splitContainer1</value> <value>scBig</value>
</data> </data>
<data name="&gt;&gt;splitContainer1.Type" xml:space="preserve"> <data name="&gt;&gt;scBig.Type" xml:space="preserve">
<value>System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="&gt;&gt;splitContainer1.Parent" xml:space="preserve"> <data name="&gt;&gt;scBig.Parent" xml:space="preserve">
<value>$this</value> <value>$this</value>
</data> </data>
<data name="&gt;&gt;splitContainer1.ZOrder" xml:space="preserve"> <data name="&gt;&gt;scBig.ZOrder" xml:space="preserve">
<value>3</value> <value>2</value>
</data> </data>
<metadata name="notifyMain.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="notifyMain.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value> <value>17, 17</value>
@@ -840,10 +702,10 @@
<value>$this</value> <value>$this</value>
</data> </data>
<data name="&gt;&gt;panel1.ZOrder" xml:space="preserve"> <data name="&gt;&gt;panel1.ZOrder" xml:space="preserve">
<value>4</value> <value>3</value>
</data> </data>
<metadata name="tsMain.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="tsMain.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>409, 17</value> <value>315, 17</value>
</metadata> </metadata>
<data name="toolStripSeparator4.Size" type="System.Drawing.Size, System.Drawing"> <data name="toolStripSeparator4.Size" type="System.Drawing.Size, System.Drawing">
<value>6, 56</value> <value>6, 56</value>
@@ -1089,13 +951,13 @@
<value>$this</value> <value>$this</value>
</data> </data>
<data name="&gt;&gt;tsMain.ZOrder" xml:space="preserve"> <data name="&gt;&gt;tsMain.ZOrder" xml:space="preserve">
<value>5</value> <value>4</value>
</data> </data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>90</value> <value>64</value>
</metadata> </metadata>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing"> <data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>6, 12</value> <value>6, 12</value>
@@ -1187,6 +1049,12 @@
<data name="&gt;&gt;menuSetDefaultServer.Type" xml:space="preserve"> <data name="&gt;&gt;menuSetDefaultServer.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="&gt;&gt;menuServerFilter.Name" xml:space="preserve">
<value>menuServerFilter</value>
</data>
<data name="&gt;&gt;menuServerFilter.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;toolStripSeparator3.Name" xml:space="preserve"> <data name="&gt;&gt;toolStripSeparator3.Name" xml:space="preserve">
<value>toolStripSeparator3</value> <value>toolStripSeparator3</value>
</data> </data>
@@ -1199,6 +1067,12 @@
<data name="&gt;&gt;menuMoveToGroup.Type" xml:space="preserve"> <data name="&gt;&gt;menuMoveToGroup.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="&gt;&gt;menuMoveEvent.Name" xml:space="preserve">
<value>menuMoveEvent</value>
</data>
<data name="&gt;&gt;menuMoveEvent.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;menuMoveTop.Name" xml:space="preserve"> <data name="&gt;&gt;menuMoveTop.Name" xml:space="preserve">
<value>menuMoveTop</value> <value>menuMoveTop</value>
</data> </data>
@@ -1307,78 +1181,6 @@
<data name="&gt;&gt;tsbServer.Type" xml:space="preserve"> <data name="&gt;&gt;tsbServer.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripDropDownButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Windows.Forms.ToolStripDropDownButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="&gt;&gt;menuMsgBoxSelectAll.Name" xml:space="preserve">
<value>menuMsgBoxSelectAll</value>
</data>
<data name="&gt;&gt;menuMsgBoxSelectAll.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;menuMsgBoxCopy.Name" xml:space="preserve">
<value>menuMsgBoxCopy</value>
</data>
<data name="&gt;&gt;menuMsgBoxCopy.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;menuMsgBoxCopyAll.Name" xml:space="preserve">
<value>menuMsgBoxCopyAll</value>
</data>
<data name="&gt;&gt;menuMsgBoxCopyAll.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;menuMsgBoxClear.Name" xml:space="preserve">
<value>menuMsgBoxClear</value>
</data>
<data name="&gt;&gt;menuMsgBoxClear.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;menuMsgBoxAddRoutingRule.Name" xml:space="preserve">
<value>menuMsgBoxAddRoutingRule</value>
</data>
<data name="&gt;&gt;menuMsgBoxAddRoutingRule.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;menuMsgBoxFilter.Name" xml:space="preserve">
<value>menuMsgBoxFilter</value>
</data>
<data name="&gt;&gt;menuMsgBoxFilter.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;toolSslInboundInfo.Name" xml:space="preserve">
<value>toolSslInboundInfo</value>
</data>
<data name="&gt;&gt;toolSslInboundInfo.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;toolSslBlank1.Name" xml:space="preserve">
<value>toolSslBlank1</value>
</data>
<data name="&gt;&gt;toolSslBlank1.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;toolSslRoutingRule.Name" xml:space="preserve">
<value>toolSslRoutingRule</value>
</data>
<data name="&gt;&gt;toolSslRoutingRule.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;toolSslBlank2.Name" xml:space="preserve">
<value>toolSslBlank2</value>
</data>
<data name="&gt;&gt;toolSslBlank2.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;toolSslServerSpeed.Name" xml:space="preserve">
<value>toolSslServerSpeed</value>
</data>
<data name="&gt;&gt;toolSslServerSpeed.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;toolSslBlank4.Name" xml:space="preserve">
<value>toolSslBlank4</value>
</data>
<data name="&gt;&gt;toolSslBlank4.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;notifyMain.Name" xml:space="preserve"> <data name="&gt;&gt;notifyMain.Name" xml:space="preserve">
<value>notifyMain</value> <value>notifyMain</value>
</data> </data>

View File

@@ -321,48 +321,27 @@
<data name="menuMsgBoxSelectAll.Size" type="System.Drawing.Size, System.Drawing"> <data name="menuMsgBoxSelectAll.Size" type="System.Drawing.Size, System.Drawing">
<value>221, 22</value> <value>221, 22</value>
</data> </data>
<data name="menuMsgBoxSelectAll.Text" xml:space="preserve">
<value>全选 (Ctrl+A)</value>
</data>
<data name="menuMsgBoxCopy.Size" type="System.Drawing.Size, System.Drawing"> <data name="menuMsgBoxCopy.Size" type="System.Drawing.Size, System.Drawing">
<value>221, 22</value> <value>221, 22</value>
</data> </data>
<data name="menuMsgBoxCopy.Text" xml:space="preserve">
<value>复制 (Ctrl+C)</value>
</data>
<data name="menuMsgBoxCopyAll.Size" type="System.Drawing.Size, System.Drawing"> <data name="menuMsgBoxCopyAll.Size" type="System.Drawing.Size, System.Drawing">
<value>221, 22</value> <value>221, 22</value>
</data> </data>
<data name="menuMsgBoxCopyAll.Text" xml:space="preserve">
<value>复制所有</value>
</data>
<data name="menuMsgBoxClear.Size" type="System.Drawing.Size, System.Drawing"> <data name="menuMsgBoxClear.Size" type="System.Drawing.Size, System.Drawing">
<value>221, 22</value> <value>221, 22</value>
</data> </data>
<data name="menuMsgBoxClear.Text" xml:space="preserve">
<value>清除所有</value>
</data>
<data name="menuMsgBoxAddRoutingRule.Size" type="System.Drawing.Size, System.Drawing"> <data name="menuMsgBoxAddRoutingRule.Size" type="System.Drawing.Size, System.Drawing">
<value>221, 22</value> <value>221, 22</value>
</data> </data>
<data name="menuMsgBoxAddRoutingRule.Text" xml:space="preserve">
<value>快速添加路由规则 (Ctrl+V)</value>
</data>
<data name="menuMsgBoxFilter.Size" type="System.Drawing.Size, System.Drawing"> <data name="menuMsgBoxFilter.Size" type="System.Drawing.Size, System.Drawing">
<value>221, 22</value> <value>221, 22</value>
</data> </data>
<data name="menuMsgBoxFilter.Text" xml:space="preserve">
<value>设置信息过滤器</value>
</data>
<data name="cmsMsgBox.Size" type="System.Drawing.Size, System.Drawing"> <data name="cmsMsgBox.Size" type="System.Drawing.Size, System.Drawing">
<value>222, 136</value> <value>222, 136</value>
</data> </data>
<data name="toolSslServerSpeed.Text" xml:space="preserve"> <data name="toolSslServerSpeed.Text" xml:space="preserve">
<value>网速显示未启用</value> <value>网速显示未启用</value>
</data> </data>
<data name="gbMsgTitle.Text" xml:space="preserve">
<value>信息</value>
</data>
<data name="menuKeepClear.Size" type="System.Drawing.Size, System.Drawing"> <data name="menuKeepClear.Size" type="System.Drawing.Size, System.Drawing">
<value>172, 22</value> <value>172, 22</value>
</data> </data>
@@ -576,4 +555,10 @@
<data name="menuMoveToGroup.Text" xml:space="preserve"> <data name="menuMoveToGroup.Text" xml:space="preserve">
<value>移至分组</value> <value>移至分组</value>
</data> </data>
<data name="menuMoveEvent.Text" xml:space="preserve">
<value>上下移至</value>
</data>
<data name="menuServerFilter.Text" xml:space="preserve">
<value>设置服务器过滤器 (Ctrl+F)</value>
</data>
</root> </root>

View File

@@ -0,0 +1,204 @@

namespace v2rayN.Forms
{
partial class MainMsgControl
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainMsgControl));
this.txtMsgBox = new System.Windows.Forms.TextBox();
this.cmsMsgBox = new System.Windows.Forms.ContextMenuStrip(this.components);
this.menuMsgBoxSelectAll = new System.Windows.Forms.ToolStripMenuItem();
this.menuMsgBoxCopy = new System.Windows.Forms.ToolStripMenuItem();
this.menuMsgBoxCopyAll = new System.Windows.Forms.ToolStripMenuItem();
this.menuMsgBoxClear = new System.Windows.Forms.ToolStripMenuItem();
this.menuMsgBoxAddRoutingRule = new System.Windows.Forms.ToolStripMenuItem();
this.menuMsgBoxFilter = new System.Windows.Forms.ToolStripMenuItem();
this.gbMsgTitle = new System.Windows.Forms.GroupBox();
this.ssMain = new System.Windows.Forms.StatusStrip();
this.toolSslInboundInfo = new System.Windows.Forms.ToolStripStatusLabel();
this.toolSslBlank1 = new System.Windows.Forms.ToolStripStatusLabel();
this.toolSslRoutingRule = new System.Windows.Forms.ToolStripStatusLabel();
this.toolSslBlank2 = new System.Windows.Forms.ToolStripStatusLabel();
this.toolSslServerSpeed = new System.Windows.Forms.ToolStripStatusLabel();
this.toolSslBlank4 = new System.Windows.Forms.ToolStripStatusLabel();
this.cmsMsgBox.SuspendLayout();
this.gbMsgTitle.SuspendLayout();
this.ssMain.SuspendLayout();
this.SuspendLayout();
//
// txtMsgBox
//
resources.ApplyResources(this.txtMsgBox, "txtMsgBox");
this.txtMsgBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(49)))), ((int)(((byte)(52)))));
this.txtMsgBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.txtMsgBox.ContextMenuStrip = this.cmsMsgBox;
this.txtMsgBox.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(226)))), ((int)(((byte)(228)))));
this.txtMsgBox.Name = "txtMsgBox";
this.txtMsgBox.ReadOnly = true;
this.txtMsgBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtMsgBox_KeyDown);
//
// cmsMsgBox
//
resources.ApplyResources(this.cmsMsgBox, "cmsMsgBox");
this.cmsMsgBox.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuMsgBoxSelectAll,
this.menuMsgBoxCopy,
this.menuMsgBoxCopyAll,
this.menuMsgBoxClear,
this.menuMsgBoxAddRoutingRule,
this.menuMsgBoxFilter});
this.cmsMsgBox.Name = "cmsMsgBox";
//
// menuMsgBoxSelectAll
//
resources.ApplyResources(this.menuMsgBoxSelectAll, "menuMsgBoxSelectAll");
this.menuMsgBoxSelectAll.Name = "menuMsgBoxSelectAll";
this.menuMsgBoxSelectAll.Click += new System.EventHandler(this.menuMsgBoxSelectAll_Click);
//
// menuMsgBoxCopy
//
resources.ApplyResources(this.menuMsgBoxCopy, "menuMsgBoxCopy");
this.menuMsgBoxCopy.Name = "menuMsgBoxCopy";
this.menuMsgBoxCopy.Click += new System.EventHandler(this.menuMsgBoxCopy_Click);
//
// menuMsgBoxCopyAll
//
resources.ApplyResources(this.menuMsgBoxCopyAll, "menuMsgBoxCopyAll");
this.menuMsgBoxCopyAll.Name = "menuMsgBoxCopyAll";
this.menuMsgBoxCopyAll.Click += new System.EventHandler(this.menuMsgBoxCopyAll_Click);
//
// menuMsgBoxClear
//
resources.ApplyResources(this.menuMsgBoxClear, "menuMsgBoxClear");
this.menuMsgBoxClear.Name = "menuMsgBoxClear";
this.menuMsgBoxClear.Click += new System.EventHandler(this.menuMsgBoxClear_Click);
//
// menuMsgBoxAddRoutingRule
//
resources.ApplyResources(this.menuMsgBoxAddRoutingRule, "menuMsgBoxAddRoutingRule");
this.menuMsgBoxAddRoutingRule.Name = "menuMsgBoxAddRoutingRule";
this.menuMsgBoxAddRoutingRule.Click += new System.EventHandler(this.menuMsgBoxAddRoutingRule_Click);
//
// menuMsgBoxFilter
//
resources.ApplyResources(this.menuMsgBoxFilter, "menuMsgBoxFilter");
this.menuMsgBoxFilter.Name = "menuMsgBoxFilter";
this.menuMsgBoxFilter.Click += new System.EventHandler(this.menuMsgBoxFilter_Click);
//
// gbMsgTitle
//
resources.ApplyResources(this.gbMsgTitle, "gbMsgTitle");
this.gbMsgTitle.Controls.Add(this.txtMsgBox);
this.gbMsgTitle.Controls.Add(this.ssMain);
this.gbMsgTitle.Name = "gbMsgTitle";
this.gbMsgTitle.TabStop = false;
//
// ssMain
//
resources.ApplyResources(this.ssMain, "ssMain");
this.ssMain.ImageScalingSize = new System.Drawing.Size(20, 20);
this.ssMain.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolSslInboundInfo,
this.toolSslBlank1,
this.toolSslRoutingRule,
this.toolSslBlank2,
this.toolSslServerSpeed,
this.toolSslBlank4});
this.ssMain.Name = "ssMain";
this.ssMain.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.ssMain_ItemClicked);
//
// toolSslInboundInfo
//
resources.ApplyResources(this.toolSslInboundInfo, "toolSslInboundInfo");
this.toolSslInboundInfo.Name = "toolSslInboundInfo";
//
// toolSslBlank1
//
resources.ApplyResources(this.toolSslBlank1, "toolSslBlank1");
this.toolSslBlank1.Name = "toolSslBlank1";
this.toolSslBlank1.Spring = true;
//
// toolSslRoutingRule
//
resources.ApplyResources(this.toolSslRoutingRule, "toolSslRoutingRule");
this.toolSslRoutingRule.Name = "toolSslRoutingRule";
//
// toolSslBlank2
//
resources.ApplyResources(this.toolSslBlank2, "toolSslBlank2");
this.toolSslBlank2.Name = "toolSslBlank2";
this.toolSslBlank2.Spring = true;
//
// toolSslServerSpeed
//
resources.ApplyResources(this.toolSslServerSpeed, "toolSslServerSpeed");
this.toolSslServerSpeed.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.toolSslServerSpeed.Name = "toolSslServerSpeed";
//
// toolSslBlank4
//
resources.ApplyResources(this.toolSslBlank4, "toolSslBlank4");
this.toolSslBlank4.Name = "toolSslBlank4";
//
// MainMsgControl
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.gbMsgTitle);
this.Name = "MainMsgControl";
this.Load += new System.EventHandler(this.MainMsgControl_Load);
this.cmsMsgBox.ResumeLayout(false);
this.gbMsgTitle.ResumeLayout(false);
this.gbMsgTitle.PerformLayout();
this.ssMain.ResumeLayout(false);
this.ssMain.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TextBox txtMsgBox;
private System.Windows.Forms.ContextMenuStrip cmsMsgBox;
private System.Windows.Forms.ToolStripMenuItem menuMsgBoxSelectAll;
private System.Windows.Forms.ToolStripMenuItem menuMsgBoxCopy;
private System.Windows.Forms.ToolStripMenuItem menuMsgBoxCopyAll;
private System.Windows.Forms.ToolStripMenuItem menuMsgBoxClear;
private System.Windows.Forms.ToolStripMenuItem menuMsgBoxAddRoutingRule;
private System.Windows.Forms.ToolStripMenuItem menuMsgBoxFilter;
private System.Windows.Forms.GroupBox gbMsgTitle;
private System.Windows.Forms.StatusStrip ssMain;
private System.Windows.Forms.ToolStripStatusLabel toolSslInboundInfo;
private System.Windows.Forms.ToolStripStatusLabel toolSslBlank1;
private System.Windows.Forms.ToolStripStatusLabel toolSslRoutingRule;
private System.Windows.Forms.ToolStripStatusLabel toolSslBlank2;
private System.Windows.Forms.ToolStripStatusLabel toolSslServerSpeed;
private System.Windows.Forms.ToolStripStatusLabel toolSslBlank4;
}
}

View File

@@ -0,0 +1,205 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Windows.Forms;
using v2rayN.Base;
using v2rayN.Mode;
using v2rayN.Resx;
namespace v2rayN.Forms
{
public partial class MainMsgControl : UserControl
{
private string MsgFilter = string.Empty;
delegate void AppendTextDelegate(string text);
public MainMsgControl()
{
InitializeComponent();
}
private void MainMsgControl_Load(object sender, EventArgs e)
{
}
#region
public void AppendText(string text)
{
if (this.txtMsgBox.InvokeRequired)
{
Invoke(new AppendTextDelegate(AppendText), new object[] { text });
}
else
{
if (!Utils.IsNullOrEmpty(MsgFilter))
{
if (!Regex.IsMatch(text, MsgFilter))
{
return;
}
}
//this.txtMsgBox.AppendText(text);
ShowMsg(text);
}
}
/// <summary>
/// 提示信息
/// </summary>
/// <param name="msg"></param>
private void ShowMsg(string msg)
{
if (txtMsgBox.Lines.Length > 999)
{
ClearMsg();
}
this.txtMsgBox.AppendText(msg);
if (!msg.EndsWith(Environment.NewLine))
{
this.txtMsgBox.AppendText(Environment.NewLine);
}
}
/// <summary>
/// 清除信息
/// </summary>
public void ClearMsg()
{
txtMsgBox.Invoke((Action)delegate
{
txtMsgBox.Clear();
});
}
public void DisplayToolStatus(Config config)
{
StringBuilder sb = new StringBuilder();
sb.Append($"{ResUI.LabLocal}:");
sb.Append($"[{Global.InboundSocks}:{config.GetLocalPort(Global.InboundSocks)}]");
sb.Append(" | ");
if (config.sysProxyType == ESysProxyType.ForcedChange)
{
sb.Append($"[{Global.InboundHttp}({ResUI.SystemProxy}):{config.GetLocalPort(Global.InboundHttp)}]");
}
else
{
sb.Append($"[{Global.InboundHttp}:{config.GetLocalPort(Global.InboundHttp)}]");
}
if (config.inbound[0].allowLANConn)
{
sb.Append($" {ResUI.LabLAN}:");
sb.Append($"[{Global.InboundSocks}:{config.GetLocalPort(Global.InboundSocks2)}]");
sb.Append(" | ");
sb.Append($"[{Global.InboundHttp}:{config.GetLocalPort(Global.InboundHttp2)}]");
}
SetToolSslInfo("inbound", sb.ToString());
}
public void SetToolSslInfo(string type, string value)
{
switch (type)
{
case "speed":
toolSslServerSpeed.Text = value;
break;
case "inbound":
toolSslInboundInfo.Text = value;
break;
case "routing":
toolSslRoutingRule.Text = value;
break;
}
}
public void ScrollToCaret()
{
this.txtMsgBox.ScrollToCaret();
}
#endregion
#region MsgBoxMenu
private void menuMsgBoxSelectAll_Click(object sender, EventArgs e)
{
this.txtMsgBox.Focus();
this.txtMsgBox.SelectAll();
}
private void menuMsgBoxCopy_Click(object sender, EventArgs e)
{
var data = this.txtMsgBox.SelectedText.TrimEx();
Utils.SetClipboardData(data);
}
private void menuMsgBoxCopyAll_Click(object sender, EventArgs e)
{
var data = this.txtMsgBox.Text;
Utils.SetClipboardData(data);
}
private void menuMsgBoxClear_Click(object sender, EventArgs e)
{
this.txtMsgBox.Clear();
}
private void menuMsgBoxAddRoutingRule_Click(object sender, EventArgs e)
{
menuMsgBoxCopy_Click(null, null);
var fm = new RoutingSettingForm();
fm.ShowDialog();
}
private void txtMsgBox_KeyDown(object sender, KeyEventArgs e)
{
if (e.Control)
{
switch (e.KeyCode)
{
case Keys.A:
menuMsgBoxSelectAll_Click(null, null);
break;
case Keys.C:
menuMsgBoxCopy_Click(null, null);
break;
case Keys.V:
menuMsgBoxAddRoutingRule_Click(null, null);
break;
}
}
}
private void menuMsgBoxFilter_Click(object sender, EventArgs e)
{
var fm = new MsgFilterSetForm();
fm.MsgFilter = MsgFilter;
fm.ShowDefFilter = true;
if (fm.ShowDialog() == DialogResult.OK)
{
MsgFilter = fm.MsgFilter;
gbMsgTitle.Text = string.Format(ResUI.MsgInformationTitle, MsgFilter);
}
}
private void ssMain_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
{
if (!Utils.IsNullOrEmpty(e.ClickedItem.Text))
{
Utils.SetClipboardData(e.ClickedItem.Text);
}
}
#endregion
}
}

View File

@@ -0,0 +1,384 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="&gt;&gt;toolSslRoutingRule.Name" xml:space="preserve">
<value>toolSslRoutingRule</value>
</data>
<data name="&gt;&gt;gbMsgTitle.Type" xml:space="preserve">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="menuMsgBoxSelectAll.Text" xml:space="preserve">
<value>Select All (Ctrl+A)</value>
</data>
<data name="&gt;&gt;ssMain.Name" xml:space="preserve">
<value>ssMain</value>
</data>
<data name="&gt;&gt;menuMsgBoxSelectAll.Name" xml:space="preserve">
<value>menuMsgBoxSelectAll</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="toolSslServerSpeed.AutoSize" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="&gt;&gt;menuMsgBoxClear.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;toolSslServerSpeed.Name" xml:space="preserve">
<value>toolSslServerSpeed</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="menuMsgBoxSelectAll.Size" type="System.Drawing.Size, System.Drawing">
<value>227, 22</value>
</data>
<data name="&gt;&gt;menuMsgBoxCopyAll.Name" xml:space="preserve">
<value>menuMsgBoxCopyAll</value>
</data>
<data name="txtMsgBox.MaxLength" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;gbMsgTitle.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="ssMain.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 221</value>
</data>
<data name="menuMsgBoxAddRoutingRule.Size" type="System.Drawing.Size, System.Drawing">
<value>227, 22</value>
</data>
<data name="menuMsgBoxFilter.Size" type="System.Drawing.Size, System.Drawing">
<value>227, 22</value>
</data>
<data name="&gt;&gt;toolSslBlank2.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;toolSslBlank1.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;toolSslInboundInfo.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="toolSslRoutingRule.Size" type="System.Drawing.Size, System.Drawing">
<value>0, 17</value>
</data>
<data name="toolSslInboundInfo.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 17</value>
</data>
<data name="&gt;&gt;toolSslInboundInfo.Name" xml:space="preserve">
<value>toolSslInboundInfo</value>
</data>
<data name="&gt;&gt;txtMsgBox.Name" xml:space="preserve">
<value>txtMsgBox</value>
</data>
<data name="toolSslBlank4.Size" type="System.Drawing.Size, System.Drawing">
<value>0, 17</value>
</data>
<data name="&gt;&gt;menuMsgBoxFilter.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="toolSslBlank1.Font" type="System.Drawing.Font, System.Drawing">
<value>微软雅黑, 8pt</value>
</data>
<data name="menuMsgBoxCopy.Size" type="System.Drawing.Size, System.Drawing">
<value>227, 22</value>
</data>
<data name="&gt;&gt;ssMain.Parent" xml:space="preserve">
<value>gbMsgTitle</value>
</data>
<data name="menuMsgBoxCopyAll.Size" type="System.Drawing.Size, System.Drawing">
<value>227, 22</value>
</data>
<data name="&gt;&gt;toolSslRoutingRule.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="menuMsgBoxAddRoutingRule.Text" xml:space="preserve">
<value>Add Routing Rule (Ctrl+V)</value>
</data>
<data name="toolSslServerSpeed.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleRight</value>
</data>
<data name="toolSslServerSpeed.Font" type="System.Drawing.Font, System.Drawing">
<value>微软雅黑, 8pt</value>
</data>
<data name="gbMsgTitle.Size" type="System.Drawing.Size, System.Drawing">
<value>696, 246</value>
</data>
<data name="toolSslInboundInfo.Text" xml:space="preserve">
<value>InboundInfo</value>
</data>
<data name="&gt;&gt;menuMsgBoxAddRoutingRule.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;menuMsgBoxClear.Name" xml:space="preserve">
<value>menuMsgBoxClear</value>
</data>
<data name="txtMsgBox.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="gbMsgTitle.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="&gt;&gt;menuMsgBoxCopy.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="txtMsgBox.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 17</value>
</data>
<data name="&gt;&gt;toolSslBlank4.Name" xml:space="preserve">
<value>toolSslBlank4</value>
</data>
<data name="&gt;&gt;txtMsgBox.Parent" xml:space="preserve">
<value>gbMsgTitle</value>
</data>
<data name="gbMsgTitle.Text" xml:space="preserve">
<value>Informations</value>
</data>
<data name="ssMain.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="toolSslBlank2.Size" type="System.Drawing.Size, System.Drawing">
<value>172, 17</value>
</data>
<data name="txtMsgBox.Multiline" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="menuMsgBoxClear.Text" xml:space="preserve">
<value>Clear All</value>
</data>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>6, 12</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="txtMsgBox.ScrollBars" type="System.Windows.Forms.ScrollBars, System.Windows.Forms">
<value>Vertical</value>
</data>
<data name="&gt;&gt;gbMsgTitle.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="ssMain.Size" type="System.Drawing.Size, System.Drawing">
<value>690, 22</value>
</data>
<data name="&gt;&gt;cmsMsgBox.Name" xml:space="preserve">
<value>cmsMsgBox</value>
</data>
<data name="txtMsgBox.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="&gt;&gt;cmsMsgBox.Type" xml:space="preserve">
<value>System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;ssMain.Type" xml:space="preserve">
<value>System.Windows.Forms.StatusStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="gbMsgTitle.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="txtMsgBox.Size" type="System.Drawing.Size, System.Drawing">
<value>690, 204</value>
</data>
<data name="menuMsgBoxClear.Size" type="System.Drawing.Size, System.Drawing">
<value>227, 22</value>
</data>
<data name="toolSslBlank1.Size" type="System.Drawing.Size, System.Drawing">
<value>172, 17</value>
</data>
<data name="&gt;&gt;toolSslBlank4.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>MainMsgControl</value>
</data>
<data name="gbMsgTitle.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>696, 246</value>
</data>
<data name="&gt;&gt;toolSslBlank1.Name" xml:space="preserve">
<value>toolSslBlank1</value>
</data>
<data name="toolSslServerSpeed.RightToLeft" type="System.Windows.Forms.RightToLeft, System.Windows.Forms">
<value>No</value>
</data>
<data name="menuMsgBoxCopyAll.Text" xml:space="preserve">
<value>Copy All</value>
</data>
<data name="toolSslServerSpeed.Size" type="System.Drawing.Size, System.Drawing">
<value>250, 17</value>
</data>
<data name="ssMain.Text" xml:space="preserve">
<value>statusStrip1</value>
</data>
<data name="&gt;&gt;menuMsgBoxAddRoutingRule.Name" xml:space="preserve">
<value>menuMsgBoxAddRoutingRule</value>
</data>
<data name="&gt;&gt;toolSslBlank2.Name" xml:space="preserve">
<value>toolSslBlank2</value>
</data>
<data name="menuMsgBoxFilter.Text" xml:space="preserve">
<value>Set message filters</value>
</data>
<data name="toolSslServerSpeed.Text" xml:space="preserve">
<value>SPEED Disabled</value>
</data>
<data name="&gt;&gt;txtMsgBox.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;gbMsgTitle.Name" xml:space="preserve">
<value>gbMsgTitle</value>
</data>
<data name="&gt;&gt;menuMsgBoxFilter.Name" xml:space="preserve">
<value>menuMsgBoxFilter</value>
</data>
<data name="&gt;&gt;ssMain.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;menuMsgBoxSelectAll.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;menuMsgBoxCopy.Name" xml:space="preserve">
<value>menuMsgBoxCopy</value>
</data>
<data name="&gt;&gt;txtMsgBox.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;toolSslServerSpeed.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="menuMsgBoxCopy.Text" xml:space="preserve">
<value>Copy (Ctrl+C)</value>
</data>
<data name="cmsMsgBox.Size" type="System.Drawing.Size, System.Drawing">
<value>228, 136</value>
</data>
<data name="&gt;&gt;menuMsgBoxCopyAll.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<metadata name="ssMain.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>131, 18</value>
</metadata>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="cmsMsgBox.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View File

@@ -0,0 +1,172 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="menuMsgBoxSelectAll.Size" type="System.Drawing.Size, System.Drawing">
<value>221, 22</value>
</data>
<data name="menuMsgBoxSelectAll.Text" xml:space="preserve">
<value>全选 (Ctrl+A)</value>
</data>
<data name="menuMsgBoxCopy.Size" type="System.Drawing.Size, System.Drawing">
<value>221, 22</value>
</data>
<data name="menuMsgBoxCopy.Text" xml:space="preserve">
<value>复制 (Ctrl+C)</value>
</data>
<data name="menuMsgBoxCopyAll.Size" type="System.Drawing.Size, System.Drawing">
<value>221, 22</value>
</data>
<data name="menuMsgBoxCopyAll.Text" xml:space="preserve">
<value>复制所有</value>
</data>
<data name="menuMsgBoxClear.Size" type="System.Drawing.Size, System.Drawing">
<value>221, 22</value>
</data>
<data name="menuMsgBoxClear.Text" xml:space="preserve">
<value>清除所有</value>
</data>
<data name="menuMsgBoxAddRoutingRule.Size" type="System.Drawing.Size, System.Drawing">
<value>221, 22</value>
</data>
<data name="menuMsgBoxAddRoutingRule.Text" xml:space="preserve">
<value>快速添加路由规则 (Ctrl+V)</value>
</data>
<data name="menuMsgBoxFilter.Size" type="System.Drawing.Size, System.Drawing">
<value>221, 22</value>
</data>
<data name="menuMsgBoxFilter.Text" xml:space="preserve">
<value>设置信息过滤器</value>
</data>
<data name="cmsMsgBox.Size" type="System.Drawing.Size, System.Drawing">
<value>222, 136</value>
</data>
<data name="toolSslBlank1.Size" type="System.Drawing.Size, System.Drawing">
<value>157, 17</value>
</data>
<data name="toolSslBlank2.Size" type="System.Drawing.Size, System.Drawing">
<value>157, 17</value>
</data>
<data name="gbMsgTitle.Text" xml:space="preserve">
<value>信息</value>
</data>
<data name="toolSslServerSpeed.Text" xml:space="preserve">
<value>网速显示未启用</value>
</data>
</root>

View File

@@ -30,12 +30,13 @@
{ {
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MsgFilterSetForm)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MsgFilterSetForm));
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
this.btnFilderProxy = new System.Windows.Forms.Button();
this.btnFilterDirect = new System.Windows.Forms.Button();
this.txtMsgFilter = new System.Windows.Forms.TextBox(); this.txtMsgFilter = new System.Windows.Forms.TextBox();
this.panel2 = new System.Windows.Forms.Panel(); this.panel2 = new System.Windows.Forms.Panel();
this.btnClose = new System.Windows.Forms.Button(); this.btnClose = new System.Windows.Forms.Button();
this.btnOK = new System.Windows.Forms.Button(); this.btnOK = new System.Windows.Forms.Button();
this.btnFilterDirect = new System.Windows.Forms.Button(); this.btnClear = new System.Windows.Forms.Button();
this.btnFilderProxy = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.panel2.SuspendLayout(); this.panel2.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
@@ -49,6 +50,20 @@
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
// //
// btnFilderProxy
//
resources.ApplyResources(this.btnFilderProxy, "btnFilderProxy");
this.btnFilderProxy.Name = "btnFilderProxy";
this.btnFilderProxy.UseVisualStyleBackColor = true;
this.btnFilderProxy.Click += new System.EventHandler(this.btnFilderProxy_Click);
//
// btnFilterDirect
//
resources.ApplyResources(this.btnFilterDirect, "btnFilterDirect");
this.btnFilterDirect.Name = "btnFilterDirect";
this.btnFilterDirect.UseVisualStyleBackColor = true;
this.btnFilterDirect.Click += new System.EventHandler(this.btnFilterDirect_Click);
//
// txtMsgFilter // txtMsgFilter
// //
resources.ApplyResources(this.txtMsgFilter, "txtMsgFilter"); resources.ApplyResources(this.txtMsgFilter, "txtMsgFilter");
@@ -56,6 +71,7 @@
// //
// panel2 // panel2
// //
this.panel2.Controls.Add(this.btnClear);
this.panel2.Controls.Add(this.btnClose); this.panel2.Controls.Add(this.btnClose);
this.panel2.Controls.Add(this.btnOK); this.panel2.Controls.Add(this.btnOK);
resources.ApplyResources(this.panel2, "panel2"); resources.ApplyResources(this.panel2, "panel2");
@@ -76,24 +92,18 @@
this.btnOK.UseVisualStyleBackColor = true; this.btnOK.UseVisualStyleBackColor = true;
this.btnOK.Click += new System.EventHandler(this.btnOK_Click); this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
// //
// btnFilterDirect // btnClear
// //
resources.ApplyResources(this.btnFilterDirect, "btnFilterDirect"); resources.ApplyResources(this.btnClear, "btnClear");
this.btnFilterDirect.Name = "btnFilterDirect"; this.btnClear.Name = "btnClear";
this.btnFilterDirect.UseVisualStyleBackColor = true; this.btnClear.UseVisualStyleBackColor = true;
this.btnFilterDirect.Click += new System.EventHandler(this.btnFilterDirect_Click); this.btnClear.Click += new System.EventHandler(this.btnClear_Click);
//
// btnFilderProxy
//
resources.ApplyResources(this.btnFilderProxy, "btnFilderProxy");
this.btnFilderProxy.Name = "btnFilderProxy";
this.btnFilderProxy.UseVisualStyleBackColor = true;
this.btnFilderProxy.Click += new System.EventHandler(this.btnFilderProxy_Click);
// //
// MsgFilterSetForm // MsgFilterSetForm
// //
resources.ApplyResources(this, "$this"); resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btnClose;
this.Controls.Add(this.groupBox1); this.Controls.Add(this.groupBox1);
this.Controls.Add(this.panel2); this.Controls.Add(this.panel2);
this.Name = "MsgFilterSetForm"; this.Name = "MsgFilterSetForm";
@@ -114,5 +124,6 @@
private System.Windows.Forms.Button btnOK; private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Button btnFilderProxy; private System.Windows.Forms.Button btnFilderProxy;
private System.Windows.Forms.Button btnFilterDirect; private System.Windows.Forms.Button btnFilterDirect;
private System.Windows.Forms.Button btnClear;
} }
} }

View File

@@ -13,6 +13,7 @@ namespace v2rayN.Forms
public partial class MsgFilterSetForm : BaseForm public partial class MsgFilterSetForm : BaseForm
{ {
public string MsgFilter { get; set; } public string MsgFilter { get; set; }
public bool ShowDefFilter { get; set; }
public MsgFilterSetForm() public MsgFilterSetForm()
{ {
@@ -22,6 +23,8 @@ namespace v2rayN.Forms
private void MsgFilterSetForm_Load(object sender, EventArgs e) private void MsgFilterSetForm_Load(object sender, EventArgs e)
{ {
txtMsgFilter.Text = MsgFilter; txtMsgFilter.Text = MsgFilter;
btnFilderProxy.Visible =
btnFilterDirect.Visible = ShowDefFilter;
} }
private void btnOK_Click(object sender, EventArgs e) private void btnOK_Click(object sender, EventArgs e)
@@ -44,5 +47,11 @@ namespace v2rayN.Forms
{ {
txtMsgFilter.Text = "^(?!.*direct).*$"; txtMsgFilter.Text = "^(?!.*direct).*$";
} }
private void btnClear_Click(object sender, EventArgs e)
{
MsgFilter = string.Empty;
this.DialogResult = DialogResult.OK;
}
} }
} }

View File

@@ -117,14 +117,78 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<data name="&gt;&gt;btnFilderProxy.Name" xml:space="preserve">
<value>btnFilderProxy</value>
</data>
<data name="&gt;&gt;btnFilderProxy.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;btnFilderProxy.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;btnFilderProxy.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;btnFilterDirect.Name" xml:space="preserve">
<value>btnFilterDirect</value>
</data>
<data name="&gt;&gt;btnFilterDirect.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;btnFilterDirect.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;btnFilterDirect.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="&gt;&gt;txtMsgFilter.Name" xml:space="preserve">
<value>txtMsgFilter</value>
</data>
<data name="&gt;&gt;txtMsgFilter.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;txtMsgFilter.Parent" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;txtMsgFilter.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="groupBox1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="groupBox1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>490, 76</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="groupBox1.TabIndex" type="System.Int32, mscorlib">
<value>8</value>
</data>
<data name="groupBox1.Text" xml:space="preserve">
<value>Filter</value>
</data>
<data name="&gt;&gt;groupBox1.Name" xml:space="preserve">
<value>groupBox1</value>
</data>
<data name="&gt;&gt;groupBox1.Type" xml:space="preserve">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;groupBox1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;groupBox1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="btnFilderProxy.Location" type="System.Drawing.Point, System.Drawing"> <data name="btnFilderProxy.Location" type="System.Drawing.Point, System.Drawing">
<value>157, 47</value> <value>157, 47</value>
</data> </data>
<data name="btnFilderProxy.Size" type="System.Drawing.Size, System.Drawing"> <data name="btnFilderProxy.Size" type="System.Drawing.Size, System.Drawing">
<value>95, 23</value> <value>95, 23</value>
</data> </data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="btnFilderProxy.TabIndex" type="System.Int32, mscorlib"> <data name="btnFilderProxy.TabIndex" type="System.Int32, mscorlib">
<value>13</value> <value>13</value>
</data> </data>
@@ -143,7 +207,6 @@
<data name="&gt;&gt;btnFilderProxy.ZOrder" xml:space="preserve"> <data name="&gt;&gt;btnFilderProxy.ZOrder" xml:space="preserve">
<value>0</value> <value>0</value>
</data> </data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="btnFilterDirect.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms"> <data name="btnFilterDirect.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value> <value>NoControl</value>
</data> </data>
@@ -192,81 +255,33 @@
<data name="&gt;&gt;txtMsgFilter.ZOrder" xml:space="preserve"> <data name="&gt;&gt;txtMsgFilter.ZOrder" xml:space="preserve">
<value>2</value> <value>2</value>
</data> </data>
<data name="groupBox1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms"> <data name="btnClear.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>Fill</value> <value>NoControl</value>
</data> </data>
<data name="groupBox1.Location" type="System.Drawing.Point, System.Drawing"> <data name="btnClear.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value> <value>211, 17</value>
</data> </data>
<data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing"> <data name="btnClear.Size" type="System.Drawing.Size, System.Drawing">
<value>490, 76</value> <value>75, 23</value>
</data> </data>
<data name="groupBox1.TabIndex" type="System.Int32, mscorlib"> <data name="btnClear.TabIndex" type="System.Int32, mscorlib">
<value>8</value> <value>14</value>
</data> </data>
<data name="groupBox1.Text" xml:space="preserve"> <data name="btnClear.Text" xml:space="preserve">
<value>Filter</value> <value>Clear</value>
</data> </data>
<data name="&gt;&gt;groupBox1.Name" xml:space="preserve"> <data name="&gt;&gt;btnClear.Name" xml:space="preserve">
<value>groupBox1</value> <value>btnClear</value>
</data> </data>
<data name="&gt;&gt;groupBox1.Type" xml:space="preserve"> <data name="&gt;&gt;btnClear.Type" xml:space="preserve">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;groupBox1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;groupBox1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;btnClose.Name" xml:space="preserve">
<value>btnClose</value>
</data>
<data name="&gt;&gt;btnClose.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="&gt;&gt;btnClose.Parent" xml:space="preserve"> <data name="&gt;&gt;btnClear.Parent" xml:space="preserve">
<value>panel2</value> <value>panel2</value>
</data> </data>
<data name="&gt;&gt;btnClose.ZOrder" xml:space="preserve"> <data name="&gt;&gt;btnClear.ZOrder" xml:space="preserve">
<value>0</value> <value>0</value>
</data> </data>
<data name="&gt;&gt;btnOK.Name" xml:space="preserve">
<value>btnOK</value>
</data>
<data name="&gt;&gt;btnOK.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;btnOK.Parent" xml:space="preserve">
<value>panel2</value>
</data>
<data name="&gt;&gt;btnOK.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="panel2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Bottom</value>
</data>
<data name="panel2.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 76</value>
</data>
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing">
<value>490, 60</value>
</data>
<data name="panel2.TabIndex" type="System.Int32, mscorlib">
<value>9</value>
</data>
<data name="&gt;&gt;panel2.Name" xml:space="preserve">
<value>panel2</value>
</data>
<data name="&gt;&gt;panel2.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;panel2.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;panel2.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="btnClose.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms"> <data name="btnClose.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value> <value>NoControl</value>
</data> </data>
@@ -292,7 +307,7 @@
<value>panel2</value> <value>panel2</value>
</data> </data>
<data name="&gt;&gt;btnClose.ZOrder" xml:space="preserve"> <data name="&gt;&gt;btnClose.ZOrder" xml:space="preserve">
<value>0</value> <value>1</value>
</data> </data>
<data name="btnOK.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms"> <data name="btnOK.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value> <value>NoControl</value>
@@ -319,6 +334,30 @@
<value>panel2</value> <value>panel2</value>
</data> </data>
<data name="&gt;&gt;btnOK.ZOrder" xml:space="preserve"> <data name="&gt;&gt;btnOK.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="panel2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Bottom</value>
</data>
<data name="panel2.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 76</value>
</data>
<data name="panel2.Size" type="System.Drawing.Size, System.Drawing">
<value>490, 60</value>
</data>
<data name="panel2.TabIndex" type="System.Int32, mscorlib">
<value>9</value>
</data>
<data name="&gt;&gt;panel2.Name" xml:space="preserve">
<value>panel2</value>
</data>
<data name="&gt;&gt;panel2.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;panel2.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;panel2.ZOrder" xml:space="preserve">
<value>1</value> <value>1</value>
</data> </data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">

View File

@@ -135,4 +135,7 @@
<data name="btnFilterDirect.Text" xml:space="preserve"> <data name="btnFilterDirect.Text" xml:space="preserve">
<value>过滤Direct</value> <value>过滤Direct</value>
</data> </data>
<data name="btnClear.Text" xml:space="preserve">
<value>清空</value>
</data>
</root> </root>

View File

@@ -68,6 +68,10 @@
this.txtKcpmtu = new System.Windows.Forms.TextBox(); this.txtKcpmtu = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label();
this.tabPage7 = new System.Windows.Forms.TabPage(); this.tabPage7 = new System.Windows.Forms.TabPage();
this.txttrayMenuServersLimit = new System.Windows.Forms.TextBox();
this.label17 = new System.Windows.Forms.Label();
this.txtautoUpdateSubInterval = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.chkEnableSecurityProtocolTls13 = new System.Windows.Forms.CheckBox(); this.chkEnableSecurityProtocolTls13 = new System.Windows.Forms.CheckBox();
this.chkEnableAutoAdjustMainLvColWidth = new System.Windows.Forms.CheckBox(); this.chkEnableAutoAdjustMainLvColWidth = new System.Windows.Forms.CheckBox();
this.btnSetLoopback = new System.Windows.Forms.Button(); this.btnSetLoopback = new System.Windows.Forms.Button();
@@ -94,6 +98,8 @@
this.labCoreType1 = new System.Windows.Forms.Label(); this.labCoreType1 = new System.Windows.Forms.Label();
this.tabPage3 = new System.Windows.Forms.TabPage(); this.tabPage3 = new System.Windows.Forms.TabPage();
this.groupBox2 = new System.Windows.Forms.GroupBox(); this.groupBox2 = new System.Windows.Forms.GroupBox();
this.label18 = new System.Windows.Forms.Label();
this.cmbSystemProxyAdvancedProtocol = new System.Windows.Forms.ComboBox();
this.label13 = new System.Windows.Forms.Label(); this.label13 = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label(); this.label12 = new System.Windows.Forms.Label();
this.txtsystemProxyExceptions = new System.Windows.Forms.TextBox(); this.txtsystemProxyExceptions = new System.Windows.Forms.TextBox();
@@ -114,34 +120,33 @@
// //
// btnClose // btnClose
// //
resources.ApplyResources(this.btnClose, "btnClose");
this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
resources.ApplyResources(this.btnClose, "btnClose");
this.btnClose.Name = "btnClose"; this.btnClose.Name = "btnClose";
this.btnClose.UseVisualStyleBackColor = true; this.btnClose.UseVisualStyleBackColor = true;
this.btnClose.Click += new System.EventHandler(this.btnClose_Click); this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
// //
// tabControl1 // tabControl1
// //
resources.ApplyResources(this.tabControl1, "tabControl1");
this.tabControl1.Controls.Add(this.tabPage1); this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2); this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Controls.Add(this.tabPage6); this.tabControl1.Controls.Add(this.tabPage6);
this.tabControl1.Controls.Add(this.tabPage7); this.tabControl1.Controls.Add(this.tabPage7);
this.tabControl1.Controls.Add(this.tabPageCoreType); this.tabControl1.Controls.Add(this.tabPageCoreType);
this.tabControl1.Controls.Add(this.tabPage3); this.tabControl1.Controls.Add(this.tabPage3);
resources.ApplyResources(this.tabControl1, "tabControl1");
this.tabControl1.Name = "tabControl1"; this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0; this.tabControl1.SelectedIndex = 0;
// //
// tabPage1 // tabPage1
// //
resources.ApplyResources(this.tabPage1, "tabPage1");
this.tabPage1.Controls.Add(this.groupBox1); this.tabPage1.Controls.Add(this.groupBox1);
resources.ApplyResources(this.tabPage1, "tabPage1");
this.tabPage1.Name = "tabPage1"; this.tabPage1.Name = "tabPage1";
this.tabPage1.UseVisualStyleBackColor = true; this.tabPage1.UseVisualStyleBackColor = true;
// //
// groupBox1 // groupBox1
// //
resources.ApplyResources(this.groupBox1, "groupBox1");
this.groupBox1.Controls.Add(this.label16); this.groupBox1.Controls.Add(this.label16);
this.groupBox1.Controls.Add(this.label4); this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.txtpass); this.groupBox1.Controls.Add(this.txtpass);
@@ -158,6 +163,7 @@
this.groupBox1.Controls.Add(this.label5); this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.txtlocalPort); this.groupBox1.Controls.Add(this.txtlocalPort);
this.groupBox1.Controls.Add(this.label2); this.groupBox1.Controls.Add(this.label2);
resources.ApplyResources(this.groupBox1, "groupBox1");
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
// //
@@ -207,8 +213,8 @@
// //
// cmbprotocol // cmbprotocol
// //
resources.ApplyResources(this.cmbprotocol, "cmbprotocol");
this.cmbprotocol.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbprotocol.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
resources.ApplyResources(this.cmbprotocol, "cmbprotocol");
this.cmbprotocol.FormattingEnabled = true; this.cmbprotocol.FormattingEnabled = true;
this.cmbprotocol.Items.AddRange(new object[] { this.cmbprotocol.Items.AddRange(new object[] {
resources.GetString("cmbprotocol.Items"), resources.GetString("cmbprotocol.Items"),
@@ -234,7 +240,6 @@
// //
// cmbloglevel // cmbloglevel
// //
resources.ApplyResources(this.cmbloglevel, "cmbloglevel");
this.cmbloglevel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbloglevel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbloglevel.FormattingEnabled = true; this.cmbloglevel.FormattingEnabled = true;
this.cmbloglevel.Items.AddRange(new object[] { this.cmbloglevel.Items.AddRange(new object[] {
@@ -243,6 +248,7 @@
resources.GetString("cmbloglevel.Items2"), resources.GetString("cmbloglevel.Items2"),
resources.GetString("cmbloglevel.Items3"), resources.GetString("cmbloglevel.Items3"),
resources.GetString("cmbloglevel.Items4")}); resources.GetString("cmbloglevel.Items4")});
resources.ApplyResources(this.cmbloglevel, "cmbloglevel");
this.cmbloglevel.Name = "cmbloglevel"; this.cmbloglevel.Name = "cmbloglevel";
// //
// label5 // label5
@@ -262,10 +268,10 @@
// //
// tabPage2 // tabPage2
// //
resources.ApplyResources(this.tabPage2, "tabPage2");
this.tabPage2.Controls.Add(this.linkDnsObjectDoc); this.tabPage2.Controls.Add(this.linkDnsObjectDoc);
this.tabPage2.Controls.Add(this.txtremoteDNS); this.tabPage2.Controls.Add(this.txtremoteDNS);
this.tabPage2.Controls.Add(this.label14); this.tabPage2.Controls.Add(this.label14);
resources.ApplyResources(this.tabPage2, "tabPage2");
this.tabPage2.Name = "tabPage2"; this.tabPage2.Name = "tabPage2";
this.tabPage2.UseVisualStyleBackColor = true; this.tabPage2.UseVisualStyleBackColor = true;
// //
@@ -288,7 +294,6 @@
// //
// tabPage6 // tabPage6
// //
resources.ApplyResources(this.tabPage6, "tabPage6");
this.tabPage6.Controls.Add(this.chkKcpcongestion); this.tabPage6.Controls.Add(this.chkKcpcongestion);
this.tabPage6.Controls.Add(this.txtKcpwriteBufferSize); this.tabPage6.Controls.Add(this.txtKcpwriteBufferSize);
this.tabPage6.Controls.Add(this.label10); this.tabPage6.Controls.Add(this.label10);
@@ -302,6 +307,7 @@
this.tabPage6.Controls.Add(this.label7); this.tabPage6.Controls.Add(this.label7);
this.tabPage6.Controls.Add(this.txtKcpmtu); this.tabPage6.Controls.Add(this.txtKcpmtu);
this.tabPage6.Controls.Add(this.label6); this.tabPage6.Controls.Add(this.label6);
resources.ApplyResources(this.tabPage6, "tabPage6");
this.tabPage6.Name = "tabPage6"; this.tabPage6.Name = "tabPage6";
this.tabPage6.UseVisualStyleBackColor = true; this.tabPage6.UseVisualStyleBackColor = true;
// //
@@ -373,7 +379,10 @@
// //
// tabPage7 // tabPage7
// //
resources.ApplyResources(this.tabPage7, "tabPage7"); this.tabPage7.Controls.Add(this.txttrayMenuServersLimit);
this.tabPage7.Controls.Add(this.label17);
this.tabPage7.Controls.Add(this.txtautoUpdateSubInterval);
this.tabPage7.Controls.Add(this.label3);
this.tabPage7.Controls.Add(this.chkEnableSecurityProtocolTls13); this.tabPage7.Controls.Add(this.chkEnableSecurityProtocolTls13);
this.tabPage7.Controls.Add(this.chkEnableAutoAdjustMainLvColWidth); this.tabPage7.Controls.Add(this.chkEnableAutoAdjustMainLvColWidth);
this.tabPage7.Controls.Add(this.btnSetLoopback); this.tabPage7.Controls.Add(this.btnSetLoopback);
@@ -385,9 +394,30 @@
this.tabPage7.Controls.Add(this.lbFreshrate); this.tabPage7.Controls.Add(this.lbFreshrate);
this.tabPage7.Controls.Add(this.chkEnableStatistics); this.tabPage7.Controls.Add(this.chkEnableStatistics);
this.tabPage7.Controls.Add(this.chkAutoRun); this.tabPage7.Controls.Add(this.chkAutoRun);
resources.ApplyResources(this.tabPage7, "tabPage7");
this.tabPage7.Name = "tabPage7"; this.tabPage7.Name = "tabPage7";
this.tabPage7.UseVisualStyleBackColor = true; this.tabPage7.UseVisualStyleBackColor = true;
// //
// txttrayMenuServersLimit
//
resources.ApplyResources(this.txttrayMenuServersLimit, "txttrayMenuServersLimit");
this.txttrayMenuServersLimit.Name = "txttrayMenuServersLimit";
//
// label17
//
resources.ApplyResources(this.label17, "label17");
this.label17.Name = "label17";
//
// txtautoUpdateSubInterval
//
resources.ApplyResources(this.txtautoUpdateSubInterval, "txtautoUpdateSubInterval");
this.txtautoUpdateSubInterval.Name = "txtautoUpdateSubInterval";
//
// label3
//
resources.ApplyResources(this.label3, "label3");
this.label3.Name = "label3";
//
// chkEnableSecurityProtocolTls13 // chkEnableSecurityProtocolTls13
// //
resources.ApplyResources(this.chkEnableSecurityProtocolTls13, "chkEnableSecurityProtocolTls13"); resources.ApplyResources(this.chkEnableSecurityProtocolTls13, "chkEnableSecurityProtocolTls13");
@@ -431,9 +461,9 @@
// //
// cbFreshrate // cbFreshrate
// //
resources.ApplyResources(this.cbFreshrate, "cbFreshrate");
this.cbFreshrate.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cbFreshrate.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbFreshrate.FormattingEnabled = true; this.cbFreshrate.FormattingEnabled = true;
resources.ApplyResources(this.cbFreshrate, "cbFreshrate");
this.cbFreshrate.Name = "cbFreshrate"; this.cbFreshrate.Name = "cbFreshrate";
// //
// lbFreshrate // lbFreshrate
@@ -455,7 +485,6 @@
// //
// tabPageCoreType // tabPageCoreType
// //
resources.ApplyResources(this.tabPageCoreType, "tabPageCoreType");
this.tabPageCoreType.Controls.Add(this.cmbCoreType6); this.tabPageCoreType.Controls.Add(this.cmbCoreType6);
this.tabPageCoreType.Controls.Add(this.labCoreType6); this.tabPageCoreType.Controls.Add(this.labCoreType6);
this.tabPageCoreType.Controls.Add(this.cmbCoreType5); this.tabPageCoreType.Controls.Add(this.cmbCoreType5);
@@ -468,14 +497,15 @@
this.tabPageCoreType.Controls.Add(this.labCoreType2); this.tabPageCoreType.Controls.Add(this.labCoreType2);
this.tabPageCoreType.Controls.Add(this.cmbCoreType1); this.tabPageCoreType.Controls.Add(this.cmbCoreType1);
this.tabPageCoreType.Controls.Add(this.labCoreType1); this.tabPageCoreType.Controls.Add(this.labCoreType1);
resources.ApplyResources(this.tabPageCoreType, "tabPageCoreType");
this.tabPageCoreType.Name = "tabPageCoreType"; this.tabPageCoreType.Name = "tabPageCoreType";
this.tabPageCoreType.UseVisualStyleBackColor = true; this.tabPageCoreType.UseVisualStyleBackColor = true;
// //
// cmbCoreType6 // cmbCoreType6
// //
resources.ApplyResources(this.cmbCoreType6, "cmbCoreType6");
this.cmbCoreType6.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbCoreType6.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbCoreType6.FormattingEnabled = true; this.cmbCoreType6.FormattingEnabled = true;
resources.ApplyResources(this.cmbCoreType6, "cmbCoreType6");
this.cmbCoreType6.Name = "cmbCoreType6"; this.cmbCoreType6.Name = "cmbCoreType6";
// //
// labCoreType6 // labCoreType6
@@ -485,9 +515,9 @@
// //
// cmbCoreType5 // cmbCoreType5
// //
resources.ApplyResources(this.cmbCoreType5, "cmbCoreType5");
this.cmbCoreType5.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbCoreType5.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbCoreType5.FormattingEnabled = true; this.cmbCoreType5.FormattingEnabled = true;
resources.ApplyResources(this.cmbCoreType5, "cmbCoreType5");
this.cmbCoreType5.Name = "cmbCoreType5"; this.cmbCoreType5.Name = "cmbCoreType5";
// //
// labCoreType5 // labCoreType5
@@ -497,9 +527,9 @@
// //
// cmbCoreType4 // cmbCoreType4
// //
resources.ApplyResources(this.cmbCoreType4, "cmbCoreType4");
this.cmbCoreType4.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbCoreType4.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbCoreType4.FormattingEnabled = true; this.cmbCoreType4.FormattingEnabled = true;
resources.ApplyResources(this.cmbCoreType4, "cmbCoreType4");
this.cmbCoreType4.Name = "cmbCoreType4"; this.cmbCoreType4.Name = "cmbCoreType4";
// //
// labCoreType4 // labCoreType4
@@ -509,9 +539,9 @@
// //
// cmbCoreType3 // cmbCoreType3
// //
resources.ApplyResources(this.cmbCoreType3, "cmbCoreType3");
this.cmbCoreType3.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbCoreType3.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbCoreType3.FormattingEnabled = true; this.cmbCoreType3.FormattingEnabled = true;
resources.ApplyResources(this.cmbCoreType3, "cmbCoreType3");
this.cmbCoreType3.Name = "cmbCoreType3"; this.cmbCoreType3.Name = "cmbCoreType3";
// //
// labCoreType3 // labCoreType3
@@ -521,9 +551,9 @@
// //
// cmbCoreType2 // cmbCoreType2
// //
resources.ApplyResources(this.cmbCoreType2, "cmbCoreType2");
this.cmbCoreType2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbCoreType2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbCoreType2.FormattingEnabled = true; this.cmbCoreType2.FormattingEnabled = true;
resources.ApplyResources(this.cmbCoreType2, "cmbCoreType2");
this.cmbCoreType2.Name = "cmbCoreType2"; this.cmbCoreType2.Name = "cmbCoreType2";
// //
// labCoreType2 // labCoreType2
@@ -533,9 +563,9 @@
// //
// cmbCoreType1 // cmbCoreType1
// //
resources.ApplyResources(this.cmbCoreType1, "cmbCoreType1");
this.cmbCoreType1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbCoreType1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbCoreType1.FormattingEnabled = true; this.cmbCoreType1.FormattingEnabled = true;
resources.ApplyResources(this.cmbCoreType1, "cmbCoreType1");
this.cmbCoreType1.Name = "cmbCoreType1"; this.cmbCoreType1.Name = "cmbCoreType1";
// //
// labCoreType1 // labCoreType1
@@ -545,20 +575,33 @@
// //
// tabPage3 // tabPage3
// //
resources.ApplyResources(this.tabPage3, "tabPage3");
this.tabPage3.Controls.Add(this.groupBox2); this.tabPage3.Controls.Add(this.groupBox2);
resources.ApplyResources(this.tabPage3, "tabPage3");
this.tabPage3.Name = "tabPage3"; this.tabPage3.Name = "tabPage3";
this.tabPage3.UseVisualStyleBackColor = true; this.tabPage3.UseVisualStyleBackColor = true;
// //
// groupBox2 // groupBox2
// //
resources.ApplyResources(this.groupBox2, "groupBox2"); this.groupBox2.Controls.Add(this.label18);
this.groupBox2.Controls.Add(this.cmbSystemProxyAdvancedProtocol);
this.groupBox2.Controls.Add(this.label13); this.groupBox2.Controls.Add(this.label13);
this.groupBox2.Controls.Add(this.label12); this.groupBox2.Controls.Add(this.label12);
this.groupBox2.Controls.Add(this.txtsystemProxyExceptions); this.groupBox2.Controls.Add(this.txtsystemProxyExceptions);
resources.ApplyResources(this.groupBox2, "groupBox2");
this.groupBox2.Name = "groupBox2"; this.groupBox2.Name = "groupBox2";
this.groupBox2.TabStop = false; this.groupBox2.TabStop = false;
// //
// label18
//
resources.ApplyResources(this.label18, "label18");
this.label18.Name = "label18";
//
// cmbSystemProxyAdvancedProtocol
//
this.cmbSystemProxyAdvancedProtocol.FormattingEnabled = true;
resources.ApplyResources(this.cmbSystemProxyAdvancedProtocol, "cmbSystemProxyAdvancedProtocol");
this.cmbSystemProxyAdvancedProtocol.Name = "cmbSystemProxyAdvancedProtocol";
//
// label13 // label13
// //
resources.ApplyResources(this.label13, "label13"); resources.ApplyResources(this.label13, "label13");
@@ -576,9 +619,9 @@
// //
// panel2 // panel2
// //
resources.ApplyResources(this.panel2, "panel2");
this.panel2.Controls.Add(this.btnClose); this.panel2.Controls.Add(this.btnClose);
this.panel2.Controls.Add(this.btnOK); this.panel2.Controls.Add(this.btnOK);
resources.ApplyResources(this.panel2, "panel2");
this.panel2.Name = "panel2"; this.panel2.Name = "panel2";
// //
// btnOK // btnOK
@@ -697,5 +740,11 @@
private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox txtpass; private System.Windows.Forms.TextBox txtpass;
private System.Windows.Forms.TextBox txtuser; private System.Windows.Forms.TextBox txtuser;
private System.Windows.Forms.TextBox txtautoUpdateSubInterval;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox txttrayMenuServersLimit;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.ComboBox cmbSystemProxyAdvancedProtocol;
private System.Windows.Forms.Label label18;
} }
} }

View File

@@ -18,6 +18,8 @@ namespace v2rayN.Forms
private void OptionSettingForm_Load(object sender, EventArgs e) private void OptionSettingForm_Load(object sender, EventArgs e)
{ {
cmbSystemProxyAdvancedProtocol.Items.AddRange(Global.IEProxyProtocols.ToArray());
InitBase(); InitBase();
InitKCP(); InitKCP();
@@ -58,6 +60,8 @@ namespace v2rayN.Forms
chkdefAllowInsecure.Checked = config.defAllowInsecure; chkdefAllowInsecure.Checked = config.defAllowInsecure;
txtsystemProxyExceptions.Text = config.systemProxyExceptions; txtsystemProxyExceptions.Text = config.systemProxyExceptions;
cmbSystemProxyAdvancedProtocol.Text = config.systemProxyAdvancedProtocol;
} }
@@ -111,9 +115,12 @@ namespace v2rayN.Forms
} }
chkIgnoreGeoUpdateCore.Checked = config.ignoreGeoUpdateCore; chkIgnoreGeoUpdateCore.Checked = config.ignoreGeoUpdateCore;
txtautoUpdateInterval.Text = config.autoUpdateInterval.ToString();
chkEnableAutoAdjustMainLvColWidth.Checked = config.uiItem.enableAutoAdjustMainLvColWidth; chkEnableAutoAdjustMainLvColWidth.Checked = config.uiItem.enableAutoAdjustMainLvColWidth;
chkEnableSecurityProtocolTls13.Checked = config.enableSecurityProtocolTls13; chkEnableSecurityProtocolTls13.Checked = config.enableSecurityProtocolTls13;
txtautoUpdateInterval.Text = config.autoUpdateInterval.ToString();
txtautoUpdateSubInterval.Text = config.autoUpdateSubInterval.ToString();
txttrayMenuServersLimit.Text = config.trayMenuServersLimit.ToString();
} }
private void InitCoreType() private void InitCoreType()
@@ -250,6 +257,8 @@ namespace v2rayN.Forms
config.systemProxyExceptions = txtsystemProxyExceptions.Text.TrimEx(); config.systemProxyExceptions = txtsystemProxyExceptions.Text.TrimEx();
config.systemProxyAdvancedProtocol = cmbSystemProxyAdvancedProtocol.Text.TrimEx();
return 0; return 0;
} }
@@ -304,10 +313,12 @@ namespace v2rayN.Forms
config.keepOlderDedupl = chkKeepOlderDedupl.Checked; config.keepOlderDedupl = chkKeepOlderDedupl.Checked;
config.ignoreGeoUpdateCore = chkIgnoreGeoUpdateCore.Checked; config.ignoreGeoUpdateCore = chkIgnoreGeoUpdateCore.Checked;
config.autoUpdateInterval = Utils.ToInt(txtautoUpdateInterval.Text);
config.uiItem.enableAutoAdjustMainLvColWidth = chkEnableAutoAdjustMainLvColWidth.Checked; config.uiItem.enableAutoAdjustMainLvColWidth = chkEnableAutoAdjustMainLvColWidth.Checked;
config.enableSecurityProtocolTls13 = chkEnableSecurityProtocolTls13.Checked; config.enableSecurityProtocolTls13 = chkEnableSecurityProtocolTls13.Checked;
config.autoUpdateInterval = Utils.ToInt(txtautoUpdateInterval.Text);
config.autoUpdateSubInterval = Utils.ToInt(txtautoUpdateSubInterval.Text);
config.trayMenuServersLimit = Utils.ToInt(txttrayMenuServersLimit.Text);
return 0; return 0;
} }
@@ -337,6 +348,6 @@ namespace v2rayN.Forms
{ {
Process.Start(Utils.GetPath("EnableLoopback.exe")); Process.Start(Utils.GetPath("EnableLoopback.exe"));
} }
} }
} }

File diff suppressed because it is too large Load Diff

View File

@@ -121,15 +121,120 @@
<value>取消(&amp;C)</value> <value>取消(&amp;C)</value>
</data> </data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="tabControl1.Size" type="System.Drawing.Size, System.Drawing">
<value>662, 469</value>
</data>
<data name="tabPage1.Size" type="System.Drawing.Size, System.Drawing"> <data name="tabPage1.Size" type="System.Drawing.Size, System.Drawing">
<value>654, 443</value> <value>654, 443</value>
</data> </data>
<data name="tabPage1.Text" xml:space="preserve"> <data name="tabPage1.Text" xml:space="preserve">
<value> Core:基础设置 </value> <value> Core:基础设置 </value>
</data> </data>
<data name="tabPage2.Size" type="System.Drawing.Size, System.Drawing">
<value>654, 443</value>
</data>
<data name="tabPage2.Text" xml:space="preserve">
<value> Core:DNS设置 </value>
</data>
<data name="tabPage6.Size" type="System.Drawing.Size, System.Drawing">
<value>654, 443</value>
</data>
<data name="tabPage6.Text" xml:space="preserve">
<value> Core:KCP设置 </value>
</data>
<data name="txttrayMenuServersLimit.Location" type="System.Drawing.Point, System.Drawing">
<value>248, 211</value>
</data>
<data name="label17.Size" type="System.Drawing.Size, System.Drawing">
<value>185, 12</value>
</data>
<data name="label17.Text" xml:space="preserve">
<value>托盘右键菜单服务器展示数量限制</value>
</data>
<data name="txtautoUpdateSubInterval.Location" type="System.Drawing.Point, System.Drawing">
<value>248, 184</value>
</data>
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
<value>173, 12</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>自动更新订阅的间隔(单位小时)</value>
</data>
<data name="chkEnableSecurityProtocolTls13.Text" xml:space="preserve">
<value>启用安全协议TLS v1.3 (订阅/检查更新/测速)</value>
</data>
<data name="chkEnableAutoAdjustMainLvColWidth.Size" type="System.Drawing.Size, System.Drawing">
<value>204, 16</value>
</data>
<data name="chkEnableAutoAdjustMainLvColWidth.Text" xml:space="preserve">
<value>自动调整服务器列宽在更新订阅后</value>
</data>
<data name="btnSetLoopback.Text" xml:space="preserve">
<value>解除Windows10 UWP应用回环代理限制</value>
</data>
<data name="txtautoUpdateInterval.Location" type="System.Drawing.Point, System.Drawing">
<value>248, 157</value>
</data>
<data name="label15.Size" type="System.Drawing.Size, System.Drawing">
<value>191, 12</value>
</data>
<data name="label15.Text" xml:space="preserve">
<value>自动更新Geo文件的间隔(单位小时)</value>
</data>
<data name="chkIgnoreGeoUpdateCore.Size" type="System.Drawing.Size, System.Drawing">
<value>150, 16</value>
</data>
<data name="chkIgnoreGeoUpdateCore.Text" xml:space="preserve">
<value>更新Core时忽略Geo文件</value>
</data>
<data name="chkKeepOlderDedupl.Size" type="System.Drawing.Size, System.Drawing">
<value>156, 16</value>
</data>
<data name="chkKeepOlderDedupl.Text" xml:space="preserve">
<value>去重时保留序号较小的项</value>
</data>
<data name="cbFreshrate.Location" type="System.Drawing.Point, System.Drawing">
<value>431, 37</value>
</data>
<data name="lbFreshrate.Location" type="System.Drawing.Point, System.Drawing">
<value>339, 41</value>
</data>
<data name="lbFreshrate.Size" type="System.Drawing.Size, System.Drawing">
<value>77, 12</value>
</data>
<data name="lbFreshrate.Text" xml:space="preserve">
<value>统计刷新频率</value>
</data>
<data name="chkEnableStatistics.Size" type="System.Drawing.Size, System.Drawing">
<value>300, 16</value>
</data>
<data name="chkEnableStatistics.Text" xml:space="preserve">
<value>启用统计(实时网速显示和使用流量显示,需要重启)</value>
</data>
<data name="chkAutoRun.Size" type="System.Drawing.Size, System.Drawing">
<value>180, 16</value>
</data>
<data name="chkAutoRun.Text" xml:space="preserve">
<value>开机自动启动(可能会不成功)</value>
</data>
<data name="tabPage7.Size" type="System.Drawing.Size, System.Drawing">
<value>654, 443</value>
</data>
<data name="tabPage7.Text" xml:space="preserve">
<value> v2rayN设置 </value>
</data>
<data name="tabPageCoreType.Size" type="System.Drawing.Size, System.Drawing">
<value>654, 443</value>
</data>
<data name="tabPageCoreType.Text" xml:space="preserve">
<value> Core类型设置 </value>
</data>
<data name="tabPage3.Size" type="System.Drawing.Size, System.Drawing">
<value>654, 443</value>
</data>
<data name="tabPage3.Text" xml:space="preserve">
<value> 系统代理设置 </value>
</data>
<data name="tabControl1.Size" type="System.Drawing.Size, System.Drawing">
<value>662, 469</value>
</data>
<data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing"> <data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>648, 437</value> <value>648, 437</value>
</data> </data>
@@ -220,12 +325,6 @@
<data name="label2.Text" xml:space="preserve"> <data name="label2.Text" xml:space="preserve">
<value>本地监听端口</value> <value>本地监听端口</value>
</data> </data>
<data name="tabPage2.Size" type="System.Drawing.Size, System.Drawing">
<value>654, 443</value>
</data>
<data name="tabPage2.Text" xml:space="preserve">
<value> Core:DNS设置 </value>
</data>
<data name="linkDnsObjectDoc.Size" type="System.Drawing.Size, System.Drawing"> <data name="linkDnsObjectDoc.Size" type="System.Drawing.Size, System.Drawing">
<value>161, 12</value> <value>161, 12</value>
</data> </data>
@@ -238,81 +337,6 @@
<data name="label14.Text" xml:space="preserve"> <data name="label14.Text" xml:space="preserve">
<value>自定义DNS(可多个,用逗号(,)隔开)</value> <value>自定义DNS(可多个,用逗号(,)隔开)</value>
</data> </data>
<data name="tabPage6.Size" type="System.Drawing.Size, System.Drawing">
<value>654, 443</value>
</data>
<data name="tabPage6.Text" xml:space="preserve">
<value> Core:KCP设置 </value>
</data>
<data name="tabPage7.Size" type="System.Drawing.Size, System.Drawing">
<value>654, 443</value>
</data>
<data name="tabPage7.Text" xml:space="preserve">
<value> v2rayN设置 </value>
</data>
<data name="chkEnableSecurityProtocolTls13.Text" xml:space="preserve">
<value>启用安全协议TLS v1.3 (订阅/检查更新/测速)</value>
</data>
<data name="chkEnableAutoAdjustMainLvColWidth.Size" type="System.Drawing.Size, System.Drawing">
<value>204, 16</value>
</data>
<data name="chkEnableAutoAdjustMainLvColWidth.Text" xml:space="preserve">
<value>自动调整服务器列宽在更新订阅后</value>
</data>
<data name="btnSetLoopback.Text" xml:space="preserve">
<value>解除Windows10 UWP应用回环代理限制</value>
</data>
<data name="txtautoUpdateInterval.Location" type="System.Drawing.Point, System.Drawing">
<value>274, 134</value>
</data>
<data name="label15.Size" type="System.Drawing.Size, System.Drawing">
<value>227, 12</value>
</data>
<data name="label15.Text" xml:space="preserve">
<value>自动更新订阅和Geo文件的间隔(单位小时)</value>
</data>
<data name="chkIgnoreGeoUpdateCore.Size" type="System.Drawing.Size, System.Drawing">
<value>150, 16</value>
</data>
<data name="chkIgnoreGeoUpdateCore.Text" xml:space="preserve">
<value>更新Core时忽略Geo文件</value>
</data>
<data name="chkKeepOlderDedupl.Size" type="System.Drawing.Size, System.Drawing">
<value>156, 16</value>
</data>
<data name="chkKeepOlderDedupl.Text" xml:space="preserve">
<value>去重时保留序号较小的项</value>
</data>
<data name="lbFreshrate.Size" type="System.Drawing.Size, System.Drawing">
<value>77, 12</value>
</data>
<data name="lbFreshrate.Text" xml:space="preserve">
<value>统计刷新频率</value>
</data>
<data name="chkEnableStatistics.Size" type="System.Drawing.Size, System.Drawing">
<value>372, 16</value>
</data>
<data name="chkEnableStatistics.Text" xml:space="preserve">
<value>启用统计(实时网速显示和使用流量显示需要重启v2rayN客户端)</value>
</data>
<data name="chkAutoRun.Size" type="System.Drawing.Size, System.Drawing">
<value>180, 16</value>
</data>
<data name="chkAutoRun.Text" xml:space="preserve">
<value>开机自动启动(可能会不成功)</value>
</data>
<data name="tabPageCoreType.Size" type="System.Drawing.Size, System.Drawing">
<value>654, 443</value>
</data>
<data name="tabPageCoreType.Text" xml:space="preserve">
<value> Core类型设置 </value>
</data>
<data name="tabPage3.Size" type="System.Drawing.Size, System.Drawing">
<value>654, 443</value>
</data>
<data name="tabPage3.Text" xml:space="preserve">
<value> 系统代理设置 </value>
</data>
<data name="groupBox2.Size" type="System.Drawing.Size, System.Drawing"> <data name="groupBox2.Size" type="System.Drawing.Size, System.Drawing">
<value>654, 443</value> <value>654, 443</value>
</data> </data>
@@ -349,4 +373,7 @@
<data name="$this.Text" xml:space="preserve"> <data name="$this.Text" xml:space="preserve">
<value>参数设置</value> <value>参数设置</value>
</data> </data>
<data name="label18.Text" xml:space="preserve">
<value>高级代理设置, 协议选择(可选)</value>
</data>
</root> </root>

View File

@@ -42,6 +42,7 @@
this.label4 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label();
this.cmbOutboundTag = new System.Windows.Forms.ComboBox(); this.cmbOutboundTag = new System.Windows.Forms.ComboBox();
this.panel4 = new System.Windows.Forms.Panel(); this.panel4 = new System.Windows.Forms.Panel();
this.chkAutoSort = new System.Windows.Forms.CheckBox();
this.btnClose = new System.Windows.Forms.Button(); this.btnClose = new System.Windows.Forms.Button();
this.btnOK = new System.Windows.Forms.Button(); this.btnOK = new System.Windows.Forms.Button();
this.panel2 = new System.Windows.Forms.Panel(); this.panel2 = new System.Windows.Forms.Panel();
@@ -63,7 +64,6 @@
// //
// panel3 // panel3
// //
resources.ApplyResources(this.panel3, "panel3");
this.panel3.Controls.Add(this.chkEnabled); this.panel3.Controls.Add(this.chkEnabled);
this.panel3.Controls.Add(this.clbInboundTag); this.panel3.Controls.Add(this.clbInboundTag);
this.panel3.Controls.Add(this.label2); this.panel3.Controls.Add(this.label2);
@@ -74,6 +74,7 @@
this.panel3.Controls.Add(this.labRoutingTips); this.panel3.Controls.Add(this.labRoutingTips);
this.panel3.Controls.Add(this.label4); this.panel3.Controls.Add(this.label4);
this.panel3.Controls.Add(this.cmbOutboundTag); this.panel3.Controls.Add(this.cmbOutboundTag);
resources.ApplyResources(this.panel3, "panel3");
this.panel3.Name = "panel3"; this.panel3.Name = "panel3";
// //
// chkEnabled // chkEnabled
@@ -84,8 +85,8 @@
// //
// clbInboundTag // clbInboundTag
// //
resources.ApplyResources(this.clbInboundTag, "clbInboundTag");
this.clbInboundTag.CheckOnClick = true; this.clbInboundTag.CheckOnClick = true;
resources.ApplyResources(this.clbInboundTag, "clbInboundTag");
this.clbInboundTag.FormattingEnabled = true; this.clbInboundTag.FormattingEnabled = true;
this.clbInboundTag.Items.AddRange(new object[] { this.clbInboundTag.Items.AddRange(new object[] {
resources.GetString("clbInboundTag.Items"), resources.GetString("clbInboundTag.Items"),
@@ -100,8 +101,8 @@
// //
// clbProtocol // clbProtocol
// //
resources.ApplyResources(this.clbProtocol, "clbProtocol");
this.clbProtocol.CheckOnClick = true; this.clbProtocol.CheckOnClick = true;
resources.ApplyResources(this.clbProtocol, "clbProtocol");
this.clbProtocol.FormattingEnabled = true; this.clbProtocol.FormattingEnabled = true;
this.clbProtocol.Items.AddRange(new object[] { this.clbProtocol.Items.AddRange(new object[] {
resources.GetString("clbProtocol.Items"), resources.GetString("clbProtocol.Items"),
@@ -127,8 +128,8 @@
// //
// labRoutingTips // labRoutingTips
// //
resources.ApplyResources(this.labRoutingTips, "labRoutingTips");
this.labRoutingTips.ForeColor = System.Drawing.Color.Brown; this.labRoutingTips.ForeColor = System.Drawing.Color.Brown;
resources.ApplyResources(this.labRoutingTips, "labRoutingTips");
this.labRoutingTips.Name = "labRoutingTips"; this.labRoutingTips.Name = "labRoutingTips";
// //
// label4 // label4
@@ -138,26 +139,33 @@
// //
// cmbOutboundTag // cmbOutboundTag
// //
resources.ApplyResources(this.cmbOutboundTag, "cmbOutboundTag");
this.cmbOutboundTag.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbOutboundTag.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbOutboundTag.FormattingEnabled = true; this.cmbOutboundTag.FormattingEnabled = true;
this.cmbOutboundTag.Items.AddRange(new object[] { this.cmbOutboundTag.Items.AddRange(new object[] {
resources.GetString("cmbOutboundTag.Items"), resources.GetString("cmbOutboundTag.Items"),
resources.GetString("cmbOutboundTag.Items1"), resources.GetString("cmbOutboundTag.Items1"),
resources.GetString("cmbOutboundTag.Items2")}); resources.GetString("cmbOutboundTag.Items2")});
resources.ApplyResources(this.cmbOutboundTag, "cmbOutboundTag");
this.cmbOutboundTag.Name = "cmbOutboundTag"; this.cmbOutboundTag.Name = "cmbOutboundTag";
// //
// panel4 // panel4
// //
resources.ApplyResources(this.panel4, "panel4"); this.panel4.Controls.Add(this.chkAutoSort);
this.panel4.Controls.Add(this.btnClose); this.panel4.Controls.Add(this.btnClose);
this.panel4.Controls.Add(this.btnOK); this.panel4.Controls.Add(this.btnOK);
resources.ApplyResources(this.panel4, "panel4");
this.panel4.Name = "panel4"; this.panel4.Name = "panel4";
// //
// chkAutoSort
//
resources.ApplyResources(this.chkAutoSort, "chkAutoSort");
this.chkAutoSort.Name = "chkAutoSort";
this.chkAutoSort.UseVisualStyleBackColor = true;
//
// btnClose // btnClose
// //
resources.ApplyResources(this.btnClose, "btnClose");
this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
resources.ApplyResources(this.btnClose, "btnClose");
this.btnClose.Name = "btnClose"; this.btnClose.Name = "btnClose";
this.btnClose.UseVisualStyleBackColor = true; this.btnClose.UseVisualStyleBackColor = true;
this.btnClose.Click += new System.EventHandler(this.btnClose_Click); this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
@@ -171,15 +179,15 @@
// //
// panel2 // panel2
// //
resources.ApplyResources(this.panel2, "panel2");
this.panel2.Controls.Add(this.groupBox2); this.panel2.Controls.Add(this.groupBox2);
this.panel2.Controls.Add(this.groupBox1); this.panel2.Controls.Add(this.groupBox1);
resources.ApplyResources(this.panel2, "panel2");
this.panel2.Name = "panel2"; this.panel2.Name = "panel2";
// //
// groupBox2 // groupBox2
// //
resources.ApplyResources(this.groupBox2, "groupBox2");
this.groupBox2.Controls.Add(this.txtIP); this.groupBox2.Controls.Add(this.txtIP);
resources.ApplyResources(this.groupBox2, "groupBox2");
this.groupBox2.Name = "groupBox2"; this.groupBox2.Name = "groupBox2";
this.groupBox2.TabStop = false; this.groupBox2.TabStop = false;
// //
@@ -190,8 +198,8 @@
// //
// groupBox1 // groupBox1
// //
resources.ApplyResources(this.groupBox1, "groupBox1");
this.groupBox1.Controls.Add(this.txtDomain); this.groupBox1.Controls.Add(this.txtDomain);
resources.ApplyResources(this.groupBox1, "groupBox1");
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
// //
@@ -214,6 +222,7 @@
this.panel3.ResumeLayout(false); this.panel3.ResumeLayout(false);
this.panel3.PerformLayout(); this.panel3.PerformLayout();
this.panel4.ResumeLayout(false); this.panel4.ResumeLayout(false);
this.panel4.PerformLayout();
this.panel2.ResumeLayout(false); this.panel2.ResumeLayout(false);
this.groupBox2.ResumeLayout(false); this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout(); this.groupBox2.PerformLayout();
@@ -245,5 +254,6 @@
private System.Windows.Forms.CheckedListBox clbInboundTag; private System.Windows.Forms.CheckedListBox clbInboundTag;
private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label2;
private System.Windows.Forms.CheckBox chkEnabled; private System.Windows.Forms.CheckBox chkEnabled;
private System.Windows.Forms.CheckBox chkAutoSort;
} }
} }

View File

@@ -48,8 +48,16 @@ namespace v2rayN.Forms
} }
rulesItem.inboundTag = inboundTag; rulesItem.inboundTag = inboundTag;
rulesItem.outboundTag = cmbOutboundTag.Text; rulesItem.outboundTag = cmbOutboundTag.Text;
rulesItem.domain = Utils.String2ListSorted(txtDomain.Text); if (chkAutoSort.Checked)
rulesItem.ip = Utils.String2ListSorted(txtIP.Text); {
rulesItem.domain = Utils.String2ListSorted(txtDomain.Text);
rulesItem.ip = Utils.String2ListSorted(txtIP.Text);
}
else
{
rulesItem.domain = Utils.String2List(txtDomain.Text);
rulesItem.ip = Utils.String2List(txtIP.Text);
}
var protocol = new List<string>(); var protocol = new List<string>();
for (int i = 0; i < clbProtocol.Items.Count; i++) for (int i = 0; i < clbProtocol.Items.Count; i++)

File diff suppressed because it is too large Load Diff

View File

@@ -170,4 +170,7 @@
<data name="$this.Text" xml:space="preserve"> <data name="$this.Text" xml:space="preserve">
<value>路由规则详情设置</value> <value>路由规则详情设置</value>
</data> </data>
<data name="chkAutoSort.Text" xml:space="preserve">
<value>保存时Domain和IP自动排序</value>
</data>
</root> </root>

View File

@@ -15,7 +15,10 @@ namespace v2rayN
public const string xrayCoreUrl = "https://github.com/XTLS/Xray-core/releases"; public const string xrayCoreUrl = "https://github.com/XTLS/Xray-core/releases";
public const string NUrl = @"https://github.com/2dust/v2rayN/releases"; public const string NUrl = @"https://github.com/2dust/v2rayN/releases";
public const string clashCoreUrl = "https://github.com/Dreamacro/clash/releases"; public const string clashCoreUrl = "https://github.com/Dreamacro/clash/releases";
public const string clashMetaCoreUrl = "https://github.com/MetaCubeX/Clash.Meta/releases";
public const string hysteriaCoreUrl = "https://github.com/HyNetwork/hysteria/releases"; public const string hysteriaCoreUrl = "https://github.com/HyNetwork/hysteria/releases";
public const string naiveproxyCoreUrl = "https://github.com/klzgrad/naiveproxy/releases";
public const string geoUrl = "https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/{0}.dat";
@@ -64,9 +67,10 @@ namespace v2rayN
/// </summary> /// </summary>
public const string v2raySampleHttpresponseFileName = "v2rayN.Sample.SampleHttpresponse.txt"; public const string v2raySampleHttpresponseFileName = "v2rayN.Sample.SampleHttpresponse.txt";
public const string CustomRoutingFileName = "v2rayN.Sample.custom_routing_"; public const string CustomRoutingFileName = "v2rayN.Sample.custom_routing_";
public const string v2raySampleInbound = "v2rayN.Sample.SampleInbound.txt";
/// <summary> /// <summary>
/// 默认加密方式 /// 默认加密方式
@@ -111,6 +115,7 @@ namespace v2rayN
public const string InboundSocks = "socks"; public const string InboundSocks = "socks";
public const string InboundHttp = "http"; public const string InboundHttp = "http";
public const string InboundSocks2 = "socks2";
public const string InboundHttp2 = "http2"; public const string InboundHttp2 = "http2";
public const string Loopback = "127.0.0.1"; public const string Loopback = "127.0.0.1";
public const string InboundAPITagName = "api"; public const string InboundAPITagName = "api";
@@ -195,12 +200,19 @@ namespace v2rayN
public const string StatisticLogOverall = "StatisticLogOverall.json"; public const string StatisticLogOverall = "StatisticLogOverall.json";
public const string IEProxyExceptions = "localhost;127.*;10.*;172.16.*;172.17.*;172.18.*;172.19.*;172.20.*;172.21.*;172.22.*;172.23.*;172.24.*;172.25.*;172.26.*;172.27.*;172.28.*;172.29.*;172.30.*;172.31.*;192.168.*"; public const string IEProxyExceptions = "localhost;127.*;10.*;172.16.*;172.17.*;172.18.*;172.19.*;172.20.*;172.21.*;172.22.*;172.23.*;172.24.*;172.25.*;172.26.*;172.27.*;172.28.*;172.29.*;172.30.*;172.31.*;192.168.*";
public static readonly List<string> IEProxyProtocols = new List<string> {
"{ip}:{http_port}",
"socks={ip}:{socks_port}",
"http={ip}:{http_port};https={ip}:{http_port};ftp={ip}:{http_port};socks={ip}:{socks_port}",
"http=http://{ip}:{http_port};https=http://{ip}:{http_port}",
""
};
public const string RoutingRuleComma = "<COMMA>"; public const string RoutingRuleComma = "<COMMA>";
public static readonly List<string> vmessSecuritys = new List<string> { "aes-128-gcm", "chacha20-poly1305", "auto", "none", "zero" }; public static readonly List<string> vmessSecuritys = new List<string> { "aes-128-gcm", "chacha20-poly1305", "auto", "none", "zero" };
public static readonly List<string> ssSecuritys = new List<string> { "aes-256-gcm", "aes-128-gcm", "chacha20-poly1305", "chacha20-ietf-poly1305", "none", "plain" }; public static readonly List<string> ssSecuritys = new List<string> { "aes-256-gcm", "aes-128-gcm", "chacha20-poly1305", "chacha20-ietf-poly1305", "none", "plain" };
public static readonly List<string> ssSecuritysInXray = new List<string> { "aes-256-gcm", "aes-128-gcm", "chacha20-poly1305", "chacha20-ietf-poly1305", "xchacha20-poly1305", "xchacha20-ietf-poly1305", "none", "plain" }; public static readonly List<string> ssSecuritysInXray = new List<string> { "aes-256-gcm", "aes-128-gcm", "chacha20-poly1305", "chacha20-ietf-poly1305", "xchacha20-poly1305", "xchacha20-ietf-poly1305", "none", "plain", "2022-blake3-aes-128-gcm", "2022-blake3-aes-256-gcm", "2022-blake3-chacha20-poly1305" };
public static readonly List<string> xtlsFlows = new List<string> { "", "xtls-rprx-origin", "xtls-rprx-origin-udp443", "xtls-rprx-direct", "xtls-rprx-direct-udp443" }; public static readonly List<string> xtlsFlows = new List<string> { "", "xtls-rprx-origin", "xtls-rprx-origin-udp443", "xtls-rprx-direct", "xtls-rprx-direct-udp443" };
public static readonly List<string> networks = new List<string> { "tcp", "kcp", "ws", "h2", "quic", "grpc" }; public static readonly List<string> networks = new List<string> { "tcp", "kcp", "ws", "h2", "quic", "grpc" };
public static readonly List<string> kcpHeaderTypes = new List<string> { "srtp", "utp", "wechat-video", "dtls", "wireguard" }; public static readonly List<string> kcpHeaderTypes = new List<string> { "srtp", "utp", "wechat-video", "dtls", "wireguard" };

View File

@@ -6,6 +6,7 @@ using v2rayN.Mode;
using v2rayN.Base; using v2rayN.Base;
using System.Linq; using System.Linq;
using v2rayN.Tool; using v2rayN.Tool;
using System.Threading.Tasks;
namespace v2rayN.Handler namespace v2rayN.Handler
{ {
@@ -207,7 +208,28 @@ namespace v2rayN.Handler
{ {
lock (objLock) lock (objLock)
{ {
Utils.ToJsonFile(config, Utils.GetPath(configRes)); try
{
//save temp file
var resPath = Utils.GetPath(configRes);
var tempPath = $"{resPath}_temp";
if (Utils.ToJsonFile(config, tempPath) != 0)
{
return;
}
if (File.Exists(resPath))
{
File.Delete(resPath);
}
//rename
File.Move(tempPath, resPath);
}
catch (Exception ex)
{
Utils.SaveLog("ToJsonFile", ex);
}
} }
} }
@@ -284,7 +306,17 @@ namespace v2rayN.Handler
vmessItem.indexId = string.Empty; vmessItem.indexId = string.Empty;
vmessItem.remarks = string.Format("{0}-clone", item.remarks); vmessItem.remarks = string.Format("{0}-clone", item.remarks);
AddServerCommon(ref config, vmessItem); if (vmessItem.configType == EConfigType.Custom)
{
vmessItem.address = Utils.GetConfigPath(vmessItem.address);
if (AddCustomServer(ref config, vmessItem, false) == 0)
{
}
}
else
{
AddServerCommon(ref config, vmessItem);
}
} }
ToJsonFile(config); ToJsonFile(config);
@@ -442,7 +474,7 @@ namespace v2rayN.Handler
try try
{ {
File.Copy(fileName, Path.Combine(Utils.GetConfigPath(), newFileName)); File.Copy(fileName, Utils.GetConfigPath(newFileName));
if (blDelete) if (blDelete)
{ {
File.Delete(fileName); File.Delete(fileName);
@@ -940,14 +972,39 @@ namespace v2rayN.Handler
vmessItem.address = fileName; vmessItem.address = fileName;
vmessItem.remarks = "clash_custom"; vmessItem.remarks = "clash_custom";
} }
//Is hysteria configuration
else if (clipboardData.IndexOf("server") >= 0
&& clipboardData.IndexOf("up") >= 0
&& clipboardData.IndexOf("down") >= 0
&& clipboardData.IndexOf("listen") >= 0)
{
var fileName = Utils.GetTempPath($"{Utils.GetGUID(false)}.json");
File.WriteAllText(fileName, clipboardData);
vmessItem.coreType = ECoreType.hysteria;
vmessItem.address = fileName;
vmessItem.remarks = "hysteria_custom";
}
//Is naiveproxy configuration
else if (clipboardData.IndexOf("listen") >= 0
&& clipboardData.IndexOf("proxy") >= 0)
{
var fileName = Utils.GetTempPath($"{Utils.GetGUID(false)}.json");
File.WriteAllText(fileName, clipboardData);
vmessItem.coreType = ECoreType.naiveproxy;
vmessItem.address = fileName;
vmessItem.remarks = "naiveproxy_custom";
}
//Is Other configuration //Is Other configuration
else else
{ {
var fileName = Utils.GetTempPath($"{Utils.GetGUID(false)}.txt"); return -1;
File.WriteAllText(fileName, clipboardData); //var fileName = Utils.GetTempPath($"{Utils.GetGUID(false)}.txt");
//File.WriteAllText(fileName, clipboardData);
vmessItem.address = fileName; //vmessItem.address = fileName;
vmessItem.remarks = "other_custom"; //vmessItem.remarks = "other_custom";
} }
if (!Utils.IsNullOrEmpty(subid)) if (!Utils.IsNullOrEmpty(subid))
@@ -977,6 +1034,56 @@ namespace v2rayN.Handler
} }
} }
private static int AddBatchServers4SsSIP008(ref Config config, string clipboardData, string subid, List<VmessItem> lstOriSub, string groupId)
{
if (Utils.IsNullOrEmpty(clipboardData))
{
return -1;
}
if (!Utils.IsNullOrEmpty(subid))
{
RemoveServerViaSubid(ref config, subid);
}
//SsSIP008
var lstSsServer = Utils.FromJson<List<SsServer>>(clipboardData);
if (lstSsServer == null || lstSsServer.Count <= 0)
{
var ssSIP008 = Utils.FromJson<SsSIP008>(clipboardData);
if (ssSIP008 != null && ssSIP008.servers != null && ssSIP008.servers.Count > 0)
{
lstSsServer = ssSIP008.servers;
}
}
if (lstSsServer != null && lstSsServer.Count > 0)
{
int counter = 0;
foreach (var it in lstSsServer)
{
var ssItem = new VmessItem()
{
subid = subid,
groupId = groupId,
remarks = it.remarks,
security = it.method,
id = it.password,
address = it.server,
port = Utils.ToInt(it.server_port)
};
if (AddShadowsocksServer(ref config, ssItem, false) == 0)
{
counter++;
}
}
ToJsonFile(config);
return counter;
}
return -1;
}
public static int AddBatchServers(ref Config config, string clipboardData, string subid, string groupId) public static int AddBatchServers(ref Config config, string clipboardData, string subid, string groupId)
{ {
List<VmessItem> lstOriSub = null; List<VmessItem> lstOriSub = null;
@@ -991,6 +1098,11 @@ namespace v2rayN.Handler
counter = AddBatchServers(ref config, Utils.Base64Decode(clipboardData), subid, lstOriSub, groupId); counter = AddBatchServers(ref config, Utils.Base64Decode(clipboardData), subid, lstOriSub, groupId);
} }
if (counter < 1)
{
counter = AddBatchServers4SsSIP008(ref config, clipboardData, subid, lstOriSub, groupId);
}
//maybe other sub //maybe other sub
if (counter < 1) if (counter < 1)
{ {
@@ -1206,6 +1318,10 @@ namespace v2rayN.Handler
{ {
config.routingIndex = 0; config.routingIndex = 0;
} }
if (config.trayMenuServersLimit <= 0)
{
config.trayMenuServersLimit = 30;
}
Global.reloadV2ray = true; Global.reloadV2ray = true;

View File

@@ -46,12 +46,12 @@ namespace v2rayN.Handler
Proxy = webProxy Proxy = webProxy
}); });
var progress = new Progress<double>(); var progress = new Progress<string>();
progress.ProgressChanged += (sender, value) => progress.ProgressChanged += (sender, value) =>
{ {
if (UpdateCompleted != null) if (UpdateCompleted != null)
{ {
string msg = string.Format("{0} M/s", value.ToString("#0.0")).PadLeft(9, ' '); string msg = string.Format("{0} M/s", value).PadLeft(9, ' ');
UpdateCompleted(this, new ResultEventArgs(false, msg)); UpdateCompleted(this, new ResultEventArgs(false, msg));
} }
}; };
@@ -156,7 +156,11 @@ namespace v2rayN.Handler
{ {
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", Utils.Base64Encode(uri.UserInfo)); client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", Utils.Base64Encode(uri.UserInfo));
} }
var result = await HttpClientHelper.GetInstance().GetAsync(client, url);
var cts = new CancellationTokenSource();
cts.CancelAfter(1000 * 30);
var result = await HttpClientHelper.GetInstance().GetAsync(client, url, cts.Token);
return result; return result;
} }
catch (Exception ex) catch (Exception ex)
@@ -172,25 +176,21 @@ namespace v2rayN.Handler
{ {
if (webProxy == null) if (webProxy == null)
{ {
var httpPort = LazyConfig.Instance.GetConfig().GetLocalPort(Global.InboundHttp2); var httpPort = LazyConfig.Instance.GetConfig().GetLocalPort(Global.InboundHttp);
webProxy = new WebProxy(Global.Loopback, httpPort); webProxy = new WebProxy(Global.Loopback, httpPort);
} }
Task<int> t = Task.Run(() => try
{ {
try string status = GetRealPingTime(Global.SpeedPingTestUrl, webProxy, out int responseTime);
{ bool noError = Utils.IsNullOrEmpty(status);
string status = GetRealPingTime(Global.SpeedPingTestUrl, webProxy, out int responseTime); return noError ? responseTime : -1;
bool noError = Utils.IsNullOrEmpty(status); }
return noError ? responseTime : -1; catch (Exception ex)
} {
catch (Exception ex) Utils.SaveLog(ex.Message, ex);
{ return -1;
Utils.SaveLog(ex.Message, ex); }
return -1;
}
});
return t.Result;
} }
catch (Exception ex) catch (Exception ex)
{ {
@@ -206,7 +206,7 @@ namespace v2rayN.Handler
try try
{ {
HttpWebRequest myHttpWebRequest = (HttpWebRequest)WebRequest.Create(url); HttpWebRequest myHttpWebRequest = (HttpWebRequest)WebRequest.Create(url);
myHttpWebRequest.Timeout = 5000; myHttpWebRequest.Timeout = 30 * 1000;
myHttpWebRequest.Proxy = webProxy; myHttpWebRequest.Proxy = webProxy;
Stopwatch timer = new Stopwatch(); Stopwatch timer = new Stopwatch();
@@ -237,7 +237,7 @@ namespace v2rayN.Handler
{ {
return null; return null;
} }
var httpPort = LazyConfig.Instance.GetConfig().GetLocalPort(Global.InboundHttp2); var httpPort = LazyConfig.Instance.GetConfig().GetLocalPort(Global.InboundHttp);
var webProxy = new WebProxy(Global.Loopback, httpPort); var webProxy = new WebProxy(Global.Loopback, httpPort);
if (RunAvailabilityCheck(webProxy) > 0) if (RunAvailabilityCheck(webProxy) > 0)
{ {

View File

@@ -66,12 +66,22 @@ namespace v2rayN.Handler
{ {
coreInfos = new List<CoreInfo>(); coreInfos = new List<CoreInfo>();
coreInfos.Add(new CoreInfo
{
coreType = ECoreType.v2rayN,
coreUrl = Global.NUrl,
coreLatestUrl = Global.NUrl + "/latest",
coreDownloadUrl = Global.NUrl + "/download/{0}/v2rayN.zip",
});
coreInfos.Add(new CoreInfo coreInfos.Add(new CoreInfo
{ {
coreType = ECoreType.v2fly, coreType = ECoreType.v2fly,
coreExes = new List<string> { "wv2ray", "v2ray" }, coreExes = new List<string> { "wv2ray", "v2ray" },
arguments = "", arguments = "",
coreUrl = Global.v2flyCoreUrl, coreUrl = Global.v2flyCoreUrl,
coreLatestUrl = Global.v2flyCoreUrl + "/latest",
coreDownloadUrl = Global.v2flyCoreUrl + "/download/{0}/v2ray-windows-{1}.zip",
match = "V2Ray" match = "V2Ray"
}); });
@@ -81,17 +91,27 @@ namespace v2rayN.Handler
coreExes = new List<string> { "xray" }, coreExes = new List<string> { "xray" },
arguments = "", arguments = "",
coreUrl = Global.xrayCoreUrl, coreUrl = Global.xrayCoreUrl,
coreLatestUrl = Global.xrayCoreUrl + "/latest",
coreDownloadUrl = Global.xrayCoreUrl + "/download/{0}/Xray-windows-{1}.zip",
match = "Xray" match = "Xray"
}); });
coreInfos.Add(new CoreInfo coreInfos.Add(new CoreInfo
{ {
coreType = ECoreType.clash, coreType = ECoreType.clash,
coreExes = new List<string> { "clash-windows-amd64", "clash-windows-386", "clash" }, coreExes = new List<string> { "clash-windows-amd64-v3", "clash-windows-amd64", "clash-windows-386", "clash" },
arguments = "-f config.json", arguments = "-f config.json",
coreUrl = Global.clashCoreUrl coreUrl = Global.clashCoreUrl
}); });
coreInfos.Add(new CoreInfo
{
coreType = ECoreType.clash_meta,
coreExes = new List<string> { "Clash.Meta-windows-amd64v1", "Clash.Meta-windows-amd64", "Clash.Meta-windows-386", "Clash.Meta", "clash" },
arguments = "-f config.json",
coreUrl = Global.clashMetaCoreUrl
});
coreInfos.Add(new CoreInfo coreInfos.Add(new CoreInfo
{ {
coreType = ECoreType.hysteria, coreType = ECoreType.hysteria,
@@ -99,6 +119,14 @@ namespace v2rayN.Handler
arguments = "", arguments = "",
coreUrl = Global.hysteriaCoreUrl coreUrl = Global.hysteriaCoreUrl
}); });
coreInfos.Add(new CoreInfo
{
coreType = ECoreType.naiveproxy,
coreExes = new List<string> { "naiveproxy", "naive" },
arguments = "config.json",
coreUrl = Global.naiveproxyCoreUrl
});
} }
} }

View File

@@ -32,12 +32,59 @@ namespace v2rayN.Handler
{ {
try try
{ {
int index = (int)config.sysProxyType;
//Load from routing setting
var createdIcon = GetNotifyIcon4Routing(config);
if (createdIcon != null)
{
return createdIcon;
}
//Load from local file
var fileName = Utils.GetPath($"NotifyIcon{index + 1}.ico");
if (File.Exists(fileName))
{
return new Icon(fileName);
}
switch (index)
{
case 0:
return Properties.Resources.NotifyIcon1;
case 1:
return Properties.Resources.NotifyIcon2;
case 2:
return Properties.Resources.NotifyIcon3;
}
return Properties.Resources.NotifyIcon1;
}
catch (Exception ex)
{
Utils.SaveLog(ex.Message, ex);
return def;
}
}
private Icon GetNotifyIcon4Routing(Config config)
{
try
{
if (!config.enableRoutingAdvanced)
{
return null;
}
var item = config.routings[config.routingIndex];
if (Utils.IsNullOrEmpty(item.customIcon) || !File.Exists(item.customIcon))
{
return null;
}
Color color = ColorTranslator.FromHtml("#3399CC"); Color color = ColorTranslator.FromHtml("#3399CC");
int index = (int)config.sysProxyType; int index = (int)config.sysProxyType;
if (index > 0) if (index > 0)
{ {
color = (new Color[] { Color.Red, Color.Purple, Color.DarkGreen, Color.Orange, Color.DarkSlateBlue, Color.RoyalBlue })[index - 1]; color = (new Color[] { Color.Red, Color.Purple, Color.DarkGreen, Color.Orange, Color.DarkSlateBlue, Color.RoyalBlue })[index - 1];
//color = ColorTranslator.FromHtml(new string[] { "#CC0066", "#CC6600", "#99CC99", "#666699" }[index - 1]);
} }
int width = 128; int width = 128;
@@ -47,23 +94,10 @@ namespace v2rayN.Handler
Graphics graphics = Graphics.FromImage(bitmap); Graphics graphics = Graphics.FromImage(bitmap);
SolidBrush drawBrush = new SolidBrush(color); SolidBrush drawBrush = new SolidBrush(color);
var customIcon = false; graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
if (config.enableRoutingAdvanced) //graphics.FillRectangle(drawBrush, new Rectangle(0, 0, width, height));
{ graphics.DrawImage(new Bitmap(item.customIcon), 0, 0, width, height);
var item = config.routings[config.routingIndex]; graphics.FillEllipse(drawBrush, width/2, width/2, width/2, width/2);
if (!Utils.IsNullOrEmpty(item.customIcon) && File.Exists(item.customIcon))
{
graphics.FillRectangle(drawBrush, new Rectangle(0, 0, width, height));
graphics.DrawImage(new Bitmap(item.customIcon), 0, 0, width, height);
customIcon = true;
}
}
if (!customIcon)
{
graphics.FillEllipse(drawBrush, new Rectangle(0, 0, width, height));
int zoom = 16;
graphics.DrawImage(new Bitmap(Properties.Resources.notify, width - zoom, width - zoom), zoom / 2, zoom / 2);
}
Icon createdIcon = Icon.FromHandle(bitmap.GetHicon()); Icon createdIcon = Icon.FromHandle(bitmap.GetHicon());
@@ -76,7 +110,7 @@ namespace v2rayN.Handler
catch (Exception ex) catch (Exception ex)
{ {
Utils.SaveLog(ex.Message, ex); Utils.SaveLog(ex.Message, ex);
return def; return null;
} }
} }
@@ -208,40 +242,54 @@ namespace v2rayN.Handler
private void UpdateTaskRun(Config config, Action<bool, string> update) private void UpdateTaskRun(Config config, Action<bool, string> update)
{ {
var autoUpdateSubTime = DateTime.Now;
var autoUpdateGeoTime = DateTime.Now;
Thread.Sleep(60000);
Utils.SaveLog("UpdateTaskRun");
var updateHandle = new UpdateHandle(); var updateHandle = new UpdateHandle();
while (true) while (true)
{ {
Thread.Sleep(60000); var dtNow = DateTime.Now;
if (config.autoUpdateInterval <= 0)
if (config.autoUpdateSubInterval > 0)
{ {
continue; if ((dtNow - autoUpdateSubTime).Hours % config.autoUpdateSubInterval == 0)
{
updateHandle.UpdateSubscriptionProcess(config, true, (bool success, string msg) =>
{
update(success, msg);
if (success)
Utils.SaveLog("subscription" + msg);
});
autoUpdateSubTime = dtNow;
}
Thread.Sleep(60000);
} }
Utils.SaveLog("UpdateTaskRun");
updateHandle.UpdateSubscriptionProcess(config, true, (bool success, string msg) => if (config.autoUpdateInterval > 0)
{ {
update(success, msg); if ((dtNow - autoUpdateGeoTime).Hours % config.autoUpdateInterval == 0)
if (success) {
Utils.SaveLog("subscription" + msg); updateHandle.UpdateGeoFile("geosite", config, (bool success, string msg) =>
}); {
update(false, msg);
if (success)
Utils.SaveLog("geosite" + msg);
});
Thread.Sleep(60000); updateHandle.UpdateGeoFile("geoip", config, (bool success, string msg) =>
{
update(false, msg);
if (success)
Utils.SaveLog("geoip" + msg);
});
autoUpdateGeoTime = dtNow;
}
}
updateHandle.UpdateGeoFile("geosite", config, (bool success, string msg) => Thread.Sleep(1000 * 3600);
{
update(false, msg);
if (success)
Utils.SaveLog("geosite" + msg);
});
updateHandle.UpdateGeoFile("geoip", config, (bool success, string msg) =>
{
update(false, msg);
if (success)
Utils.SaveLog("geoip" + msg);
});
Thread.Sleep(1000 * 3600 * config.autoUpdateInterval);
} }
} }

View File

@@ -594,17 +594,30 @@ namespace v2rayN.Handler
address = parsedUrl.IdnHost, address = parsedUrl.IdnHost,
port = parsedUrl.Port, port = parsedUrl.Port,
}; };
// parse base64 UserInfo
string rawUserInfo = parsedUrl.GetComponents(UriComponents.UserInfo, UriFormat.UriEscaped); string rawUserInfo = parsedUrl.GetComponents(UriComponents.UserInfo, UriFormat.UriEscaped);
string userInfo = Utils.Base64Decode(rawUserInfo); //2022-blake3
string[] userInfoParts = userInfo.Split(new char[] { ':' }, 2); if (rawUserInfo.Contains(":"))
if (userInfoParts.Length != 2)
{ {
return null; string[] userInfoParts = rawUserInfo.Split(new char[] { ':' }, 2);
if (userInfoParts.Length != 2)
{
return null;
}
server.security = userInfoParts[0];
server.id = Utils.UrlDecode(userInfoParts[1]);
}
else
{
// parse base64 UserInfo
string userInfo = Utils.Base64Decode(rawUserInfo);
string[] userInfoParts = userInfo.Split(new char[] { ':' }, 2);
if (userInfoParts.Length != 2)
{
return null;
}
server.security = userInfoParts[0];
server.id = userInfoParts[1];
} }
server.security = userInfoParts[0];
server.id = userInfoParts[1];
NameValueCollection queryParameters = HttpUtility.ParseQueryString(parsedUrl.Query); NameValueCollection queryParameters = HttpUtility.ParseQueryString(parsedUrl.Query);
if (queryParameters["plugin"] != null) if (queryParameters["plugin"] != null)

View File

@@ -59,7 +59,8 @@ namespace v2rayN.Handler
try try
{ {
int port = config.GetLocalPort(Global.InboundHttp2); int port = config.GetLocalPort(Global.InboundHttp);
int portSocks = config.GetLocalPort(Global.InboundSocks);
if (port <= 0) if (port <= 0)
{ {
return false; return false;
@@ -67,7 +68,20 @@ namespace v2rayN.Handler
if (type == ESysProxyType.ForcedChange) if (type == ESysProxyType.ForcedChange)
{ {
var strExceptions = $"{config.constItem.defIEProxyExceptions};{config.systemProxyExceptions}"; var strExceptions = $"{config.constItem.defIEProxyExceptions};{config.systemProxyExceptions}";
SetIEProxy(true, $"{Global.Loopback}:{port}", strExceptions);
var strProxy = string.Empty;
if (Utils.IsNullOrEmpty(config.systemProxyAdvancedProtocol))
{
strProxy = $"{Global.Loopback}:{port}";
}
else
{
strProxy = config.systemProxyAdvancedProtocol
.Replace("{ip}", Global.Loopback)
.Replace("{http_port}", port.ToString())
.Replace("{socks_port}", portSocks.ToString());
}
SetIEProxy(true, strProxy, strExceptions);
} }
else if (type == ESysProxyType.ForcedClear) else if (type == ESysProxyType.ForcedClear)
{ {
@@ -96,41 +110,6 @@ namespace v2rayN.Handler
} }
} }
public static void SetIEProxy(bool enable, bool global, string strProxy)
{
//Read();
//if (!_userSettings.UserSettingsRecorded)
//{
// // record user settings
// ExecSysproxy("query");
// //ParseQueryStr(_queryStr);
//}
string arguments;
if (enable)
{
arguments = global
? $"global {strProxy} {Global.IEProxyExceptions}"
: $"pac {strProxy}";
}
else
{
// restore user settings
string flags = _userSettings.Flags;
string proxy_server = _userSettings.ProxyServer ?? "-";
string bypass_list = _userSettings.BypassList ?? "-";
string pac_url = _userSettings.PacUrl ?? "-";
arguments = $"set {flags} {proxy_server} {bypass_list} {pac_url}";
// have to get new settings
_userSettings.UserSettingsRecorded = false;
}
//Save();
ExecSysproxy(arguments);
}
public static void SetIEProxy(bool global, string strProxy, string strExceptions) public static void SetIEProxy(bool global, string strProxy, string strExceptions)
{ {

View File

@@ -3,6 +3,7 @@ using System.Diagnostics;
using System.IO; using System.IO;
using System.Text; using System.Text;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using v2rayN.Base; using v2rayN.Base;
@@ -30,14 +31,6 @@ namespace v2rayN.Handler
} }
} }
private readonly string nLatestUrl = Global.NUrl + "/latest";
private const string nUrl = Global.NUrl + "/download/{0}/v2rayN.zip";
private readonly string v2flyCoreLatestUrl = Global.v2flyCoreUrl + "/latest";
private const string v2flyCoreUrl = Global.v2flyCoreUrl + "/download/{0}/v2ray-windows-{1}.zip";
private readonly string xrayCoreLatestUrl = Global.xrayCoreUrl + "/latest";
private const string xrayCoreUrl = Global.xrayCoreUrl + "/download/{0}/Xray-windows-{1}.zip";
private const string geoUrl = "https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/{0}.dat";
public void CheckUpdateGuiN(Config config, Action<bool, string> update) public void CheckUpdateGuiN(Config config, Action<bool, string> update)
{ {
_config = config; _config = config;
@@ -178,6 +171,16 @@ namespace v2rayN.Handler
Task.Run(async () => Task.Run(async () =>
{ {
//Turn off system proxy
bool bSysProxyType = false;
if (!blProxy && config.sysProxyType == ESysProxyType.ForcedChange)
{
bSysProxyType = true;
config.sysProxyType = ESysProxyType.ForcedClear;
SysProxyHandle.UpdateSysProxy(config, false);
Thread.Sleep(3000);
}
foreach (var item in config.subItem) foreach (var item in config.subItem)
{ {
if (item.enabled == false) if (item.enabled == false)
@@ -217,7 +220,14 @@ namespace v2rayN.Handler
} }
_updateFunc(false, $"-------------------------------------------------------"); _updateFunc(false, $"-------------------------------------------------------");
} }
//restore system proxy
if (bSysProxyType)
{
config.sysProxyType = ESysProxyType.ForcedChange;
SysProxyHandle.UpdateSysProxy(config, false);
}
_updateFunc(true, $"{ResUI.MsgUpdateSubscriptionEnd}"); _updateFunc(true, $"{ResUI.MsgUpdateSubscriptionEnd}");
}); });
} }
@@ -226,7 +236,7 @@ namespace v2rayN.Handler
{ {
_config = config; _config = config;
_updateFunc = update; _updateFunc = update;
var url = string.Format(geoUrl, geoName); var url = string.Format(Global.geoUrl, geoName);
DownloadHandle downloadHandle = null; DownloadHandle downloadHandle = null;
if (downloadHandle == null) if (downloadHandle == null)
@@ -250,8 +260,8 @@ namespace v2rayN.Handler
File.Delete(targetPath); File.Delete(targetPath);
} }
File.Move(fileName, targetPath); File.Move(fileName, targetPath);
//_updateFunc(true, ""); //_updateFunc(true, "");
} }
} }
catch (Exception ex) catch (Exception ex)
{ {
@@ -272,29 +282,24 @@ namespace v2rayN.Handler
} }
public void RunAvailabilityCheck(Action<bool, string> update)
{
Task.Run(() =>
{
var time = (new DownloadHandle()).RunAvailabilityCheck(null);
update(false, string.Format(ResUI.TestMeOutput, time));
});
}
#region private #region private
private async void CheckUpdateAsync(ECoreType type) private async void CheckUpdateAsync(ECoreType type)
{ {
try try
{ {
string url; var coreInfo = LazyConfig.Instance.GetCoreInfo(type);
if (type == ECoreType.v2fly) string url = coreInfo.coreLatestUrl;
{
url = v2flyCoreLatestUrl;
}
else if (type == ECoreType.Xray)
{
url = xrayCoreLatestUrl;
}
else if (type == ECoreType.v2rayN)
{
url = nLatestUrl;
}
else
{
throw new ArgumentException("Type");
}
var result = await (new DownloadHandle()).UrlRedirectAsync(url, true); var result = await (new DownloadHandle()).UrlRedirectAsync(url, true);
if (!Utils.IsNullOrEmpty(result)) if (!Utils.IsNullOrEmpty(result))
@@ -368,6 +373,7 @@ namespace v2rayN.Handler
try try
{ {
string version = redirectUrl.Substring(redirectUrl.LastIndexOf("/", StringComparison.Ordinal) + 1); string version = redirectUrl.Substring(redirectUrl.LastIndexOf("/", StringComparison.Ordinal) + 1);
var coreInfo = LazyConfig.Instance.GetCoreInfo(type);
string curVersion; string curVersion;
string message; string message;
@@ -377,20 +383,20 @@ namespace v2rayN.Handler
curVersion = "v" + getCoreVersion(type); curVersion = "v" + getCoreVersion(type);
message = string.Format(ResUI.IsLatestCore, curVersion); message = string.Format(ResUI.IsLatestCore, curVersion);
string osBit = Environment.Is64BitProcess ? "64" : "32"; string osBit = Environment.Is64BitProcess ? "64" : "32";
url = string.Format(v2flyCoreUrl, version, osBit); url = string.Format(coreInfo.coreDownloadUrl, version, osBit);
} }
else if (type == ECoreType.Xray) else if (type == ECoreType.Xray)
{ {
curVersion = "v" + getCoreVersion(type); curVersion = "v" + getCoreVersion(type);
message = string.Format(ResUI.IsLatestCore, curVersion); message = string.Format(ResUI.IsLatestCore, curVersion);
string osBit = Environment.Is64BitProcess ? "64" : "32"; string osBit = Environment.Is64BitProcess ? "64" : "32";
url = string.Format(xrayCoreUrl, version, osBit); url = string.Format(coreInfo.coreDownloadUrl, version, osBit);
} }
else if (type == ECoreType.v2rayN) else if (type == ECoreType.v2rayN)
{ {
curVersion = FileVersionInfo.GetVersionInfo(Utils.GetExePath()).FileVersion.ToString(); curVersion = FileVersionInfo.GetVersionInfo(Utils.GetExePath()).FileVersion.ToString();
message = string.Format(ResUI.IsLatestN, curVersion); message = string.Format(ResUI.IsLatestN, curVersion);
url = string.Format(nUrl, version); url = string.Format(coreInfo.coreDownloadUrl, version);
} }
else else
{ {

View File

@@ -146,48 +146,35 @@ namespace v2rayN.Handler
{ {
try try
{ {
Inbounds inbound = v2rayConfig.inbounds[0]; v2rayConfig.inbounds = new List<Inbounds>();
inbound.tag = Global.InboundSocks;
inbound.port = config.inbound[0].localPort; Inbounds inbound = GetInbound(config.inbound[0], Global.InboundSocks, 0, true);
inbound.protocol = config.inbound[0].protocol; v2rayConfig.inbounds.Add(inbound);
if (config.inbound[0].allowLANConn)
{
inbound.listen = "0.0.0.0";
}
else
{
inbound.listen = Global.Loopback;
}
//udp
inbound.settings.udp = config.inbound[0].udpEnabled;
inbound.sniffing.enabled = config.inbound[0].sniffingEnabled;
//http //http
Inbounds inbound2 = v2rayConfig.inbounds[1]; Inbounds inbound2 = GetInbound(config.inbound[0], Global.InboundHttp, 1, false);
inbound2.tag = Global.InboundHttp; v2rayConfig.inbounds.Add(inbound2);
inbound2.port = config.GetLocalPort(Global.InboundHttp);
inbound2.protocol = Global.InboundHttp;
inbound2.listen = inbound.listen;
inbound2.settings.allowTransparent = false;
inbound2.sniffing.enabled = inbound.sniffing.enabled;
//auth if (config.inbound[0].allowLANConn)
if (!Utils.IsNullOrEmpty(config.inbound[0].user) && !Utils.IsNullOrEmpty(config.inbound[0].pass))
{ {
inbound.settings.auth = "password"; Inbounds inbound3 = GetInbound(config.inbound[0], Global.InboundSocks2, 2, true);
inbound.settings.accounts = new List<AccountsItem> { new AccountsItem() { user = config.inbound[0].user, pass = config.inbound[0].pass } }; inbound3.listen = "0.0.0.0";
inbound2.settings.auth = "password"; v2rayConfig.inbounds.Add(inbound3);
inbound2.settings.accounts = new List<AccountsItem> { new AccountsItem() { user = config.inbound[0].user, pass = config.inbound[0].pass } };
}
//http Loopback Inbounds inbound4 = GetInbound(config.inbound[0], Global.InboundHttp2, 3, false);
Inbounds inbound3 = v2rayConfig.inbounds[2]; inbound4.listen = "0.0.0.0";
inbound3.tag = Global.InboundHttp2; v2rayConfig.inbounds.Add(inbound4);
inbound3.port = config.GetLocalPort(Global.InboundHttp2);
inbound3.protocol = Global.InboundHttp; //auth
inbound3.listen = Global.Loopback; if (!Utils.IsNullOrEmpty(config.inbound[0].user) && !Utils.IsNullOrEmpty(config.inbound[0].pass))
inbound3.settings.allowTransparent = false; {
inbound3.sniffing.enabled = inbound.sniffing.enabled; inbound3.settings.auth = "password";
inbound3.settings.accounts = new List<AccountsItem> { new AccountsItem() { user = config.inbound[0].user, pass = config.inbound[0].pass } };
inbound4.settings.auth = "password";
inbound4.settings.accounts = new List<AccountsItem> { new AccountsItem() { user = config.inbound[0].user, pass = config.inbound[0].pass } };
}
}
} }
catch catch
{ {
@@ -195,6 +182,28 @@ namespace v2rayN.Handler
return 0; return 0;
} }
private static Inbounds GetInbound(InItem inItem, string tag, int offset, bool bSocks)
{
string result = Utils.GetEmbedText(Global.v2raySampleInbound);
if (Utils.IsNullOrEmpty(result))
{
return null;
}
var inbound = Utils.FromJson<Inbounds>(result);
if (inbound == null)
{
return null;
}
inbound.tag = tag;
inbound.port = inItem.localPort + offset;
inbound.protocol = bSocks ? Global.InboundSocks : Global.InboundHttp;
inbound.settings.udp = inItem.udpEnabled;
inbound.sniffing.enabled = inItem.sniffingEnabled;
return inbound;
}
/// <summary> /// <summary>
/// 路由 /// 路由
/// </summary> /// </summary>
@@ -932,7 +941,7 @@ namespace v2rayN.Handler
string addressFileName = node.address; string addressFileName = node.address;
if (!File.Exists(addressFileName)) if (!File.Exists(addressFileName))
{ {
addressFileName = Path.Combine(Utils.GetConfigPath(), addressFileName); addressFileName = Utils.GetConfigPath(addressFileName);
} }
if (!File.Exists(addressFileName)) if (!File.Exists(addressFileName))
{ {
@@ -957,7 +966,8 @@ namespace v2rayN.Handler
case ECoreType.Xray: case ECoreType.Xray:
break; break;
case ECoreType.clash: case ECoreType.clash:
fileContent.Add($"port: {LazyConfig.Instance.GetConfig().GetLocalPort(Global.InboundHttp2)}"); case ECoreType.clash_meta:
fileContent.Add($"port: {LazyConfig.Instance.GetConfig().GetLocalPort(Global.InboundHttp)}");
fileContent.Add($"socks-port: {LazyConfig.Instance.GetConfig().GetLocalPort(Global.InboundSocks)}"); fileContent.Add($"socks-port: {LazyConfig.Instance.GetConfig().GetLocalPort(Global.InboundSocks)}");
break; break;
} }

View File

@@ -254,7 +254,7 @@ namespace v2rayN.Handler
try try
{ {
string fileName = V2rayFindexe(new List<string> { "xray" }); string fileName = V2rayFindexe(new List<string> { "xray", "wv2ray", "v2ray" });
if (fileName == "") return -1; if (fileName == "") return -1;
Process p = new Process Process p = new Process

View File

@@ -124,17 +124,19 @@ namespace v2rayN.Mode
{ {
get; set; get; set;
} }
public string systemProxyAdvancedProtocol { get; set; }
public int autoUpdateInterval { get; set; } = 0;
public int autoUpdateInterval public int autoUpdateSubInterval { get; set; } = 0;
{
get; set;
} = 0;
public bool enableSecurityProtocolTls13 public bool enableSecurityProtocolTls13
{ {
get; set; get; set;
} }
public int trayMenuServersLimit { get; set; }
#endregion #endregion
#region other entities #region other entities
@@ -208,27 +210,27 @@ namespace v2rayN.Mode
public int GetLocalPort(string protocol) public int GetLocalPort(string protocol)
{ {
if (protocol == Global.InboundHttp) int localPort = inbound.FirstOrDefault(t => t.protocol == Global.InboundSocks).localPort;
if (protocol == Global.InboundSocks)
{ {
return GetLocalPort(Global.InboundSocks) + 1; return localPort;
}
else if (protocol == Global.InboundHttp)
{
return localPort + 1;
}
else if (protocol == Global.InboundSocks2)
{
return localPort + 2;
} }
else if (protocol == Global.InboundHttp2) else if (protocol == Global.InboundHttp2)
{ {
return GetLocalPort(Global.InboundSocks) + 2; return localPort + 3;
} }
else if (protocol == "speedtest") else if (protocol == "speedtest")
{ {
return GetLocalPort(Global.InboundSocks) + 103; return localPort + 103;
}
int localPort = 0;
foreach (InItem inItem in inbound)
{
if (inItem.protocol.Equals(protocol))
{
localPort = inItem.localPort;
break;
}
} }
return localPort; return localPort;
} }

View File

@@ -14,6 +14,10 @@ namespace v2rayN.Mode
public string coreUrl { get; set; } public string coreUrl { get; set; }
public string coreLatestUrl { get; set; }
public string coreDownloadUrl { get; set; }
public string match { get; set; } public string match { get; set; }
} }
} }

View File

@@ -6,7 +6,9 @@ namespace v2rayN.Mode
v2fly = 1, v2fly = 1,
Xray = 2, Xray = 2,
clash = 11, clash = 11,
clash_meta = 12,
hysteria = 21, hysteria = 21,
naiveproxy = 22,
v2rayN = 99 v2rayN = 99
} }
} }

View File

@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
namespace v2rayN.Mode
{
public class SsSIP008
{
public List<SsServer> servers { get; set; }
}
[Serializable]
public class SsServer
{
public string remarks { get; set; }
public string server { get; set; }
public string server_port { get; set; }
public string method { get; set; }
public string password { get; set; }
public string plugin { get; set; }
}
}

View File

@@ -32,4 +32,4 @@ using System.Runtime.InteropServices;
// 方法是按如下所示使用“*”: // 方法是按如下所示使用“*”:
//[assembly: AssemblyVersion("1.0.*")] //[assembly: AssemblyVersion("1.0.*")]
//[assembly: AssemblyVersion("1.0.0")] //[assembly: AssemblyVersion("1.0.0")]
[assembly: AssemblyFileVersion("5.14")] [assembly: AssemblyFileVersion("5.26")]

View File

@@ -110,6 +110,36 @@ namespace v2rayN.Properties {
} }
} }
/// <summary>
/// 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。
/// </summary>
internal static System.Drawing.Icon NotifyIcon1 {
get {
object obj = ResourceManager.GetObject("NotifyIcon1", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。
/// </summary>
internal static System.Drawing.Icon NotifyIcon2 {
get {
object obj = ResourceManager.GetObject("NotifyIcon2", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。
/// </summary>
internal static System.Drawing.Icon NotifyIcon3 {
get {
object obj = ResourceManager.GetObject("NotifyIcon3", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary> /// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。 /// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary> /// </summary>

View File

@@ -157,4 +157,13 @@
<data name="share" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="share" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\share.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\resources\share.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="NotifyIcon1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\NotifyIcon1.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="NotifyIcon2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\NotifyIcon2.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="NotifyIcon3" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\NotifyIcon3.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root> </root>

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

View File

@@ -321,6 +321,24 @@ namespace v2rayN.Resx {
} }
} }
/// <summary>
/// 查找类似 LAN 的本地化字符串。
/// </summary>
internal static string LabLAN {
get {
return ResourceManager.GetString("LabLAN", resourceCulture);
}
}
/// <summary>
/// 查找类似 Local 的本地化字符串。
/// </summary>
internal static string LabLocal {
get {
return ResourceManager.GetString("LabLocal", resourceCulture);
}
}
/// <summary> /// <summary>
/// 查找类似 Address 的本地化字符串。 /// 查找类似 Address 的本地化字符串。
/// </summary> /// </summary>
@@ -582,6 +600,15 @@ namespace v2rayN.Resx {
} }
} }
/// <summary>
/// 查找类似 Servers (Filter : {0}) 的本地化字符串。
/// </summary>
internal static string MsgServerTitle {
get {
return ResourceManager.GetString("MsgServerTitle", resourceCulture);
}
}
/// <summary> /// <summary>
/// 查找类似 Simplify PAC Success 的本地化字符串。 /// 查找类似 Simplify PAC Success 的本地化字符串。
/// </summary> /// </summary>
@@ -953,7 +980,7 @@ namespace v2rayN.Resx {
} }
/// <summary> /// <summary>
/// 查找类似 The ping of current service: {0} 的本地化字符串。 /// 查找类似 The ping of current service: {0} ms 的本地化字符串。
/// </summary> /// </summary>
internal static string TestMeOutput { internal static string TestMeOutput {
get { get {

View File

@@ -356,7 +356,7 @@
<value>Scan import URL successfully</value> <value>Scan import URL successfully</value>
</data> </data>
<data name="TestMeOutput" xml:space="preserve"> <data name="TestMeOutput" xml:space="preserve">
<value>The ping of current service: {0}</value> <value>The ping of current service: {0} ms</value>
</data> </data>
<data name="OperationSuccess" xml:space="preserve"> <data name="OperationSuccess" xml:space="preserve">
<value>Operation success</value> <value>Operation success</value>
@@ -463,4 +463,13 @@
<data name="TooManyServersTip" xml:space="preserve"> <data name="TooManyServersTip" xml:space="preserve">
<value>Too many servers, please open the main interface</value> <value>Too many servers, please open the main interface</value>
</data> </data>
<data name="LabLAN" xml:space="preserve">
<value>LAN</value>
</data>
<data name="LabLocal" xml:space="preserve">
<value>Local</value>
</data>
<data name="MsgServerTitle" xml:space="preserve">
<value>Servers (Filter : {0})</value>
</data>
</root> </root>

View File

@@ -356,7 +356,7 @@
<value>扫描导入URL成功</value> <value>扫描导入URL成功</value>
</data> </data>
<data name="TestMeOutput" xml:space="preserve"> <data name="TestMeOutput" xml:space="preserve">
<value>当前服务的真连接延迟: {0}</value> <value>当前服务的真连接延迟: {0} ms</value>
</data> </data>
<data name="OperationSuccess" xml:space="preserve"> <data name="OperationSuccess" xml:space="preserve">
<value>操作成功</value> <value>操作成功</value>
@@ -463,4 +463,13 @@
<data name="TooManyServersTip" xml:space="preserve"> <data name="TooManyServersTip" xml:space="preserve">
<value>服务器太多,请打开主界面操作</value> <value>服务器太多,请打开主界面操作</value>
</data> </data>
<data name="LabLAN" xml:space="preserve">
<value>局域网</value>
</data>
<data name="LabLocal" xml:space="preserve">
<value>本地</value>
</data>
<data name="MsgServerTitle" xml:space="preserve">
<value>服务器 (过滤器 : {0})</value>
</data>
</root> </root>

View File

@@ -0,0 +1,18 @@
{
"tag": "tag1",
"port": 10808,
"protocol": "socks",
"listen": "127.0.0.1",
"settings": {
"auth": "noauth",
"udp": true,
"allowTransparent": false
},
"sniffing": {
"enabled": true,
"destOverride": [
"http",
"tls"
]
}
}

View File

@@ -23,6 +23,7 @@ using Newtonsoft.Json.Linq;
using System.Web; using System.Web;
using log4net; using log4net;
using System.Linq; using System.Linq;
using System.Security.Cryptography;
namespace v2rayN namespace v2rayN
{ {
@@ -397,6 +398,20 @@ namespace v2rayN
{ {
return HttpUtility.UrlDecode(url); return HttpUtility.UrlDecode(url);
} }
public static string GetMD5(string str)
{
var md5 = MD5.Create();
byte[] byteOld = Encoding.UTF8.GetBytes(str);
byte[] byteNew = md5.ComputeHash(byteOld);
StringBuilder sb = new StringBuilder();
foreach (byte b in byteNew)
{
sb.Append(b.ToString("x2"));
}
return sb.ToString();
}
#endregion #endregion
@@ -529,7 +544,13 @@ namespace v2rayN
#region #region
private static string autoRunName = "v2rayNAutoRun"; private static string autoRunName
{
get
{
return $"v2rayNAutoRun_{GetMD5(StartupPath())}";
}
}
private static string autoRunRegPath private static string autoRunRegPath
{ {
get get
@@ -961,7 +982,7 @@ namespace v2rayN
// return path to store temporary files // return path to store temporary files
public static string GetTempPath(string filename = "") public static string GetTempPath(string filename = "")
{ {
string _tempPath = Path.Combine(StartupPath(), "v2ray_win_temp"); string _tempPath = Path.Combine(StartupPath(), "guiTemps");
if (!Directory.Exists(_tempPath)) if (!Directory.Exists(_tempPath))
{ {
Directory.CreateDirectory(_tempPath); Directory.CreateDirectory(_tempPath);

View File

@@ -109,6 +109,12 @@
<Compile Include="Forms\BaseServerForm.Designer.cs"> <Compile Include="Forms\BaseServerForm.Designer.cs">
<DependentUpon>BaseServerForm.cs</DependentUpon> <DependentUpon>BaseServerForm.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Forms\MainMsgControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Forms\MainMsgControl.Designer.cs">
<DependentUpon>MainMsgControl.cs</DependentUpon>
</Compile>
<Compile Include="Forms\MsgFilterSetForm.cs"> <Compile Include="Forms\MsgFilterSetForm.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@@ -210,6 +216,7 @@
<Compile Include="Mode\SysproxyConfig.cs" /> <Compile Include="Mode\SysproxyConfig.cs" />
<Compile Include="Mode\EConfigType.cs" /> <Compile Include="Mode\EConfigType.cs" />
<Compile Include="Mode\ServerTestItem.cs" /> <Compile Include="Mode\ServerTestItem.cs" />
<Compile Include="Mode\SsSIP008.cs" />
<Compile Include="Properties\Resources.Designer.cs"> <Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen> <AutoGen>True</AutoGen>
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>
@@ -286,6 +293,12 @@
<DependentUpon>MainForm.cs</DependentUpon> <DependentUpon>MainForm.cs</DependentUpon>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Forms\MainMsgControl.resx">
<DependentUpon>MainMsgControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\MainMsgControl.zh-Hans.resx">
<DependentUpon>MainMsgControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\MsgFilterSetForm.resx"> <EmbeddedResource Include="Forms\MsgFilterSetForm.resx">
<DependentUpon>MsgFilterSetForm.cs</DependentUpon> <DependentUpon>MsgFilterSetForm.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
@@ -462,6 +475,10 @@
<None Include="Resources\minimize.png" /> <None Include="Resources\minimize.png" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="Resources\NotifyIcon1.ico" />
<Content Include="Resources\NotifyIcon2.ico" />
<Content Include="Resources\NotifyIcon3.ico" />
<EmbeddedResource Include="Sample\SampleInbound.txt" />
<None Include="Resources\share.png" /> <None Include="Resources\share.png" />
<None Include="Resources\promotion.png" /> <None Include="Resources\promotion.png" />
<None Include="Resources\sub.png" /> <None Include="Resources\sub.png" />
@@ -472,13 +489,13 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Google.Protobuf"> <PackageReference Include="Google.Protobuf">
<Version>3.20.0</Version> <Version>3.21.1</Version>
</PackageReference> </PackageReference>
<PackageReference Include="Grpc.Core"> <PackageReference Include="Grpc.Core">
<Version>2.45.0</Version> <Version>2.46.3</Version>
</PackageReference> </PackageReference>
<PackageReference Include="Grpc.Tools"> <PackageReference Include="Grpc.Tools">
<Version>2.45.0</Version> <Version>2.46.3</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
</PackageReference> </PackageReference>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 60 KiB