From 025a4491edeb32fb9e479daa8b2f5b97e6e7fc0f Mon Sep 17 00:00:00 2001 From: CGQAQ Date: Fri, 23 Aug 2019 15:51:37 +0800 Subject: [PATCH] Add ping and speedtest hotkeys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 增加测速快捷键 --- v2rayN/v2rayN/Forms/MainForm.Designer.cs | 25 +- v2rayN/v2rayN/Forms/MainForm.cs | 22 +- v2rayN/v2rayN/Forms/MainForm.resx | 180 +-- .../Forms/OptionSettingForm.Designer.cs | 9 + v2rayN/v2rayN/Forms/OptionSettingForm.cs | 3 + v2rayN/v2rayN/Forms/OptionSettingForm.resx | 1182 +++++------------ .../Forms/OptionSettingForm.zh-Hans.resx | 3 + v2rayN/v2rayN/Mode/Config.cs | 5 + 8 files changed, 490 insertions(+), 939 deletions(-) diff --git a/v2rayN/v2rayN/Forms/MainForm.Designer.cs b/v2rayN/v2rayN/Forms/MainForm.Designer.cs index c6e1bba8..92bca0ba 100644 --- a/v2rayN/v2rayN/Forms/MainForm.Designer.cs +++ b/v2rayN/v2rayN/Forms/MainForm.Designer.cs @@ -82,8 +82,10 @@ this.toolSslSocksPortLab = new System.Windows.Forms.ToolStripStatusLabel(); this.toolSslSocksPort = new System.Windows.Forms.ToolStripStatusLabel(); this.toolSslBlank1 = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolSslHttpPortLab = new System.Windows.Forms.ToolStripStatusLabel(); this.toolSslHttpPort = new System.Windows.Forms.ToolStripStatusLabel(); this.toolSslBlank2 = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolSslPacPortLab = new System.Windows.Forms.ToolStripStatusLabel(); this.toolSslPacPort = new System.Windows.Forms.ToolStripStatusLabel(); this.toolSslBlank3 = new System.Windows.Forms.ToolStripStatusLabel(); this.panel1 = new System.Windows.Forms.Panel(); @@ -111,8 +113,6 @@ this.tsbPromotion = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator11 = new System.Windows.Forms.ToolStripSeparator(); this.tsbClose = new System.Windows.Forms.ToolStripButton(); - this.toolSslHttpPortLab = new System.Windows.Forms.ToolStripStatusLabel(); - this.toolSslPacPortLab = new System.Windows.Forms.ToolStripStatusLabel(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); @@ -147,6 +147,7 @@ this.lvServers.FullRowSelect = true; this.lvServers.GridLines = true; this.lvServers.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; + this.lvServers.HideSelection = false; this.lvServers.Items.AddRange(new System.Windows.Forms.ListViewItem[] { ((System.Windows.Forms.ListViewItem)(resources.GetObject("lvServers.Items")))}); this.lvServers.MultiSelect = false; @@ -507,6 +508,11 @@ resources.ApplyResources(this.toolSslBlank1, "toolSslBlank1"); this.toolSslBlank1.Spring = true; // + // toolSslHttpPortLab + // + this.toolSslHttpPortLab.Name = "toolSslHttpPortLab"; + resources.ApplyResources(this.toolSslHttpPortLab, "toolSslHttpPortLab"); + // // toolSslHttpPort // this.toolSslHttpPort.Name = "toolSslHttpPort"; @@ -518,6 +524,11 @@ resources.ApplyResources(this.toolSslBlank2, "toolSslBlank2"); this.toolSslBlank2.Spring = true; // + // toolSslPacPortLab + // + this.toolSslPacPortLab.Name = "toolSslPacPortLab"; + resources.ApplyResources(this.toolSslPacPortLab, "toolSslPacPortLab"); + // // toolSslPacPort // this.toolSslPacPort.Name = "toolSslPacPort"; @@ -702,16 +713,6 @@ this.tsbClose.Name = "tsbClose"; this.tsbClose.Click += new System.EventHandler(this.tsbClose_Click); // - // toolSslHttpPortLab - // - this.toolSslHttpPortLab.Name = "toolSslHttpPortLab"; - resources.ApplyResources(this.toolSslHttpPortLab, "toolSslHttpPortLab"); - // - // toolSslPacPortLab - // - this.toolSslPacPortLab.Name = "toolSslPacPortLab"; - resources.ApplyResources(this.toolSslPacPortLab, "toolSslPacPortLab"); - // // MainForm // resources.ApplyResources(this, "$this"); diff --git a/v2rayN/v2rayN/Forms/MainForm.cs b/v2rayN/v2rayN/Forms/MainForm.cs index b96cc3a7..1ba50537 100644 --- a/v2rayN/v2rayN/Forms/MainForm.cs +++ b/v2rayN/v2rayN/Forms/MainForm.cs @@ -80,7 +80,7 @@ namespace v2rayN.Forms { //config.uiItem.mainQRCodeWidth = splitContainer1.SplitterDistance; } - + private const int WM_QUERYENDSESSION = 0x0011; protected override void WndProc(ref Message m) { @@ -360,6 +360,22 @@ namespace v2rayN.Forms menuSelectAll_Click(null, null); break; } + if (config.enableHotkey) + { + if (e.KeyCode == Keys.T) + { + // Speed test selected servers + GetLvSelectedIndex(); + ServerSpeedTest(); + } + else if (e.KeyCode == Keys.P) + { + // Ping selected servers + GetLvSelectedIndex(); + ClearTestResult(); + bgwPing.RunWorkerAsync(); + } + } } switch (e.KeyCode) { @@ -884,6 +900,7 @@ namespace v2rayN.Forms } catch { + } } @@ -1394,8 +1411,7 @@ namespace v2rayN.Forms Utils.RegWriteValue(Global.MyRegPath, Global.MyRegKeyLanguage, value); } + #endregion - - } } diff --git a/v2rayN/v2rayN/Forms/MainForm.resx b/v2rayN/v2rayN/Forms/MainForm.resx index 61cfde87..d2f676fc 100644 --- a/v2rayN/v2rayN/Forms/MainForm.resx +++ b/v2rayN/v2rayN/Forms/MainForm.resx @@ -404,33 +404,12 @@ NoControl - - 265, 164 - - - cmsMain - - - System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - v2rayN - - - True - 264, 22 Enable Http proxy - - 264, 22 - - - Http proxy mode - 547, 22 @@ -455,6 +434,12 @@ Only open PAC, do not automatically configure PAC + + 264, 22 + + + Http proxy mode + 264, 22 @@ -488,6 +473,21 @@ Exit + + 265, 164 + + + cmsMain + + + System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + v2rayN + + + True + 232, 17 @@ -567,7 +567,7 @@ 0, 17 - 238, 17 + 282, 17 38, 17 @@ -579,7 +579,7 @@ 0, 17 - 238, 17 + 282, 17 31, 17 @@ -591,7 +591,7 @@ 0, 17 - 238, 17 + 282, 17 3, 151 @@ -671,42 +671,9 @@ 409, 17 - - 0, 0 - - - 992, 56 - - - 6 - - - tsMain - - - System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 5 - 6, 56 - - Magenta - - - 93, 53 - - - Subscription - - - ImageAboveText - 197, 22 @@ -719,6 +686,18 @@ Update subscription + + Magenta + + + 93, 53 + + + Subscription + + + ImageAboveText + 6, 56 @@ -766,18 +745,6 @@ 6, 56 - - Magenta - - - 128, 53 - - - Check for updates - - - ImageAboveText - 338, 22 @@ -802,21 +769,21 @@ Simplify PAC (please set Core route) - - 6, 56 - - + Magenta - - 48, 53 + + 128, 53 - - Help + + Check for updates - + ImageAboveText + + 6, 56 + 187, 22 @@ -838,6 +805,18 @@ 语言-[中文简体] + + Magenta + + + 48, 53 + + + Help + + + ImageAboveText + Magenta @@ -872,6 +851,27 @@ ImageAboveText + + 0, 0 + + + 992, 56 + + + 6 + + + tsMain + + + System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 5 + True @@ -1148,6 +1148,12 @@ System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + toolSslHttpPortLab + + + System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + toolSslHttpPort @@ -1160,6 +1166,12 @@ System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + toolSslPacPortLab + + + System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + toolSslPacPort @@ -1310,18 +1322,6 @@ System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - toolSslHttpPortLab - - - System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - toolSslPacPortLab - - - System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - MainForm diff --git a/v2rayN/v2rayN/Forms/OptionSettingForm.Designer.cs b/v2rayN/v2rayN/Forms/OptionSettingForm.Designer.cs index 8c5eb9b9..59060468 100644 --- a/v2rayN/v2rayN/Forms/OptionSettingForm.Designer.cs +++ b/v2rayN/v2rayN/Forms/OptionSettingForm.Designer.cs @@ -82,6 +82,7 @@ this.txtKcpmtu = new System.Windows.Forms.TextBox(); this.label6 = new System.Windows.Forms.Label(); this.tabPage7 = new System.Windows.Forms.TabPage(); + this.chkEnableHotkey = new System.Windows.Forms.CheckBox(); this.chkAllowLANConn = new System.Windows.Forms.CheckBox(); this.txturlGFWList = new System.Windows.Forms.TextBox(); this.label13 = new System.Windows.Forms.Label(); @@ -473,6 +474,7 @@ // // tabPage7 // + this.tabPage7.Controls.Add(this.chkEnableHotkey); this.tabPage7.Controls.Add(this.chkAllowLANConn); this.tabPage7.Controls.Add(this.txturlGFWList); this.tabPage7.Controls.Add(this.label13); @@ -481,6 +483,12 @@ this.tabPage7.Name = "tabPage7"; this.tabPage7.UseVisualStyleBackColor = true; // + // chkEnableHotkey + // + resources.ApplyResources(this.chkEnableHotkey, "chkEnableHotkey"); + this.chkEnableHotkey.Name = "chkEnableHotkey"; + this.chkEnableHotkey.UseVisualStyleBackColor = true; + // // chkAllowLANConn // resources.ApplyResources(this.chkAllowLANConn, "chkAllowLANConn"); @@ -619,5 +627,6 @@ private System.Windows.Forms.CheckBox chksniffingEnabled; private System.Windows.Forms.CheckBox chksniffingEnabled2; private System.Windows.Forms.Button btnSetDefRountingRule; + private System.Windows.Forms.CheckBox chkEnableHotkey; } } \ No newline at end of file diff --git a/v2rayN/v2rayN/Forms/OptionSettingForm.cs b/v2rayN/v2rayN/Forms/OptionSettingForm.cs index e45af2b6..db858bbd 100644 --- a/v2rayN/v2rayN/Forms/OptionSettingForm.cs +++ b/v2rayN/v2rayN/Forms/OptionSettingForm.cs @@ -293,6 +293,9 @@ namespace v2rayN.Forms config.allowLANConn = chkAllowLANConn.Checked; + //快捷键 + config.enableHotkey = chkEnableHotkey.Checked; + return 0; } diff --git a/v2rayN/v2rayN/Forms/OptionSettingForm.resx b/v2rayN/v2rayN/Forms/OptionSettingForm.resx index 9a4a727c..5d6fe55e 100644 --- a/v2rayN/v2rayN/Forms/OptionSettingForm.resx +++ b/v2rayN/v2rayN/Forms/OptionSettingForm.resx @@ -183,273 +183,6 @@ 0 - - tabPage3 - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabControl2 - - - 0 - - - tabPage4 - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabControl2 - - - 1 - - - tabPage5 - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabControl2 - - - 2 - - - Fill - - - 3, 124 - - - 618, 446 - - - 12 - - - tabControl2 - - - System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox2 - - - 0 - - - 356, 43 - - - 229, 23 - - - 18 - - - Set default custom routing rules - - - btnSetDefRountingRule - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panel3 - - - 0 - - - AsIs - - - IPIfNonMatch - - - IPOnDemand - - - 123, 13 - - - 209, 20 - - - 16 - - - cmbdomainStrategy - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panel3 - - - 1 - - - 5, 83 - - - 598, 16 - - - 13 - - - *Set the rules, separated by commas (,); support Domain (pure string / regular / subdomain) and IP - - - labRoutingTips - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panel3 - - - 2 - - - True - - - NoControl - - - 13, 17 - - - 95, 12 - - - 17 - - - Domain strategy - - - label15 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panel3 - - - 3 - - - True - - - NoControl - - - 13, 50 - - - 77, 12 - - - 15 - - - Routing mode - - - label12 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panel3 - - - 4 - - - Global - - - Bypassing the LAN address - - - Bypass mainland address - - - Bypassing LAN and mainland address - - - 123, 46 - - - 209, 20 - - - 14 - - - cmbroutingMode - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panel3 - - - 5 - - - Top - - - 3, 17 - - - 618, 107 - - - 19 - - - panel3 - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox2 - - - 1 - - - Fill - - - 3, 3 - - - 624, 573 - - - 12 - groupBox2 @@ -672,6 +405,51 @@ 2 + + True + + + NoControl + + + 15, 60 + + + 102, 16 + + + 29 + + + Enable hotkey(Ctrl+P ping servers / Ctrl+T speed test) + + + chkEnableHotkey + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage7 + + + 0 + + + True + + + 15, 38 + + + 204, 16 + + + 29 + + + Allow connections from the LAN + chkAllowLANConn @@ -682,7 +460,16 @@ tabPage7 - 0 + 1 + + + 30, 132 + + + 468, 21 + + + 28 txturlGFWList @@ -694,7 +481,22 @@ tabPage7 - 1 + 2 + + + True + + + 30, 111 + + + 431, 12 + + + 27 + + + Custom GFWList address (please fill in the blank without customization) label13 @@ -706,7 +508,22 @@ tabPage7 - 2 + 3 + + + True + + + 15, 16 + + + 132, 16 + + + 23 + + + Boot automatically chkAutoRun @@ -718,7 +535,7 @@ tabPage7 - 3 + 4 4, 22 @@ -999,18 +816,6 @@ 6 - - groupBox1 - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage1 - - - 0 - True @@ -1032,18 +837,6 @@ False - - chksniffingEnabled2 - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 0 - True @@ -1062,18 +855,6 @@ Turn on Sniffing - - chksniffingEnabled - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 1 - 33, 192 @@ -1083,18 +864,6 @@ 30 - - txtremoteDNS - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 2 - True @@ -1110,18 +879,6 @@ Custom DNS (multiple, separated by commas (,)) - - label14 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 3 - True @@ -1137,18 +894,6 @@ Turn on Mux Multiplexing - - chkmuxEnabled - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 4 - True @@ -1167,18 +912,6 @@ False - - chkAllowIn2 - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 5 - True @@ -1197,18 +930,6 @@ False - - chkudpEnabled2 - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 6 - socks @@ -1227,18 +948,6 @@ False - - cmbprotocol2 - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 7 - True @@ -1257,18 +966,6 @@ False - - label3 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 8 - 124, 60 @@ -1281,18 +978,6 @@ False - - txtlocalPort2 - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 9 - False @@ -1311,18 +996,6 @@ 12 - - cmbprotocol - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 10 - True @@ -1338,18 +1011,6 @@ protocol - - label1 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 11 - True @@ -1365,18 +1026,6 @@ Enable UDP - - chkudpEnabled - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 12 - True @@ -1392,18 +1041,6 @@ Record local logs - - chklogEnabled - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 13 - debug @@ -1428,18 +1065,6 @@ 6 - - cmbloglevel - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 14 - True @@ -1455,18 +1080,6 @@ Log level - - label5 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 15 - 124, 25 @@ -1476,18 +1089,6 @@ 3 - - txtlocalPort - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 16 - True @@ -1503,17 +1104,89 @@ Listening port - - label2 + + tabControl2 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - groupBox1 + + groupBox2 - - 17 + + 0 + + + panel3 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox2 + + + 1 + + + Fill + + + 3, 3 + + + 624, 573 + + + 12 + + + tabPage3 + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabControl2 + + + 0 + + + tabPage4 + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabControl2 + + + 1 + + + tabPage5 + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabControl2 + + + 2 + + + Fill + + + 3, 124 + + + 618, 446 + + + 12 txtUseragent @@ -1542,18 +1215,6 @@ Proxy's Domain or IP - - tabPage3 - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabControl2 - - - 0 - Fill @@ -1572,18 +1233,6 @@ 0 - - txtUseragent - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage3 - - - 0 - txtUserdirect @@ -1611,18 +1260,6 @@ Directly connected Domain or IP - - tabPage4 - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabControl2 - - - 1 - Fill @@ -1641,18 +1278,6 @@ 1 - - txtUserdirect - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage4 - - - 0 - txtUserblock @@ -1680,18 +1305,6 @@ Blocked Domain or IP - - tabPage5 - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabControl2 - - - 2 - Fill @@ -1710,18 +1323,189 @@ 1 - - txtUserblock + + btnSetDefRountingRule - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tabPage5 + + panel3 - + 0 + + cmbdomainStrategy + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel3 + + + 1 + + + labRoutingTips + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel3 + + + 2 + + + label15 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel3 + + + 3 + + + label12 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel3 + + + 4 + + + cmbroutingMode + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + panel3 + + + 5 + + + Top + + + 3, 17 + + + 618, 107 + + + 19 + + + 356, 43 + + + 229, 23 + + + 18 + + + Set default custom routing rules + + + AsIs + + + IPIfNonMatch + + + IPOnDemand + + + 123, 13 + + + 209, 20 + + + 16 + + + 5, 83 + + + 598, 16 + + + 13 + + + *Set the rules, separated by commas (,); support Domain (pure string / regular / subdomain) and IP + + + True + + + NoControl + + + 13, 17 + + + 95, 12 + + + 17 + + + Domain strategy + + + True + + + NoControl + + + 13, 50 + + + 77, 12 + + + 15 + + + Routing mode + + + Global + + + Bypassing the LAN address + + + Bypass mainland address + + + Bypassing LAN and mainland address + + + 123, 46 + + + 209, 20 + + + 14 + True @@ -1737,18 +1521,6 @@ congestion - - chkKcpcongestion - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage6 - - - 0 - 345, 100 @@ -1758,18 +1530,6 @@ 15 - - txtKcpwriteBufferSize - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage6 - - - 1 - True @@ -1785,18 +1545,6 @@ writeBufferSize - - label10 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage6 - - - 2 - 111, 100 @@ -1806,18 +1554,6 @@ 13 - - txtKcpreadBufferSize - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage6 - - - 3 - True @@ -1833,18 +1569,6 @@ readBufferSize - - label11 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage6 - - - 4 - 345, 62 @@ -1854,18 +1578,6 @@ 11 - - txtKcpdownlinkCapacity - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage6 - - - 5 - True @@ -1881,18 +1593,6 @@ downlinkCapacity - - label8 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage6 - - - 6 - 111, 62 @@ -1902,18 +1602,6 @@ 9 - - txtKcpuplinkCapacity - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage6 - - - 7 - True @@ -1929,18 +1617,6 @@ uplinkCapacity - - label9 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage6 - - - 8 - 345, 24 @@ -1950,18 +1626,6 @@ 7 - - txtKcptti - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage6 - - - 9 - True @@ -1977,18 +1641,6 @@ tti - - label7 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage6 - - - 10 - 111, 24 @@ -1998,18 +1650,6 @@ 5 - - txtKcpmtu - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage6 - - - 11 - True @@ -2025,120 +1665,6 @@ mtu - - label6 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage6 - - - 12 - - - True - - - 15, 42 - - - 204, 16 - - - 29 - - - Allow connections from the LAN - - - chkAllowLANConn - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage7 - - - 0 - - - 30, 132 - - - 468, 21 - - - 28 - - - txturlGFWList - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage7 - - - 1 - - - True - - - 30, 111 - - - 431, 12 - - - 27 - - - Custom GFWList address (please fill in the blank without customization) - - - label13 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage7 - - - 2 - - - True - - - 15, 16 - - - 132, 16 - - - 23 - - - Boot automatically - - - chkAutoRun - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage7 - - - 3 - btnOK @@ -2187,18 +1713,6 @@ &OK - - btnOK - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panel2 - - - 1 - Top @@ -2223,9 +1737,9 @@ 2 - + True - + 6, 12 diff --git a/v2rayN/v2rayN/Forms/OptionSettingForm.zh-Hans.resx b/v2rayN/v2rayN/Forms/OptionSettingForm.zh-Hans.resx index d0a2519d..7eb0a790 100644 --- a/v2rayN/v2rayN/Forms/OptionSettingForm.zh-Hans.resx +++ b/v2rayN/v2rayN/Forms/OptionSettingForm.zh-Hans.resx @@ -288,4 +288,7 @@ 参数设置 + + 启用快捷键(Ctrl+P ping 选中服务器/ Ctrl+T 测速选中服务器) + \ No newline at end of file diff --git a/v2rayN/v2rayN/Mode/Config.cs b/v2rayN/v2rayN/Mode/Config.cs index 929efece..86b86d14 100644 --- a/v2rayN/v2rayN/Mode/Config.cs +++ b/v2rayN/v2rayN/Mode/Config.cs @@ -91,6 +91,11 @@ namespace v2rayN.Mode /// public bool allowLANConn { get; set; } + /// + /// 启用快捷键 + /// + public bool enableHotkey{ get; set; } + /// /// 自定义远程DNS ///