Compare commits

...

26 Commits
5.15 ... 5.21

Author SHA1 Message Date
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
39 changed files with 3197 additions and 3797 deletions

View File

@@ -162,7 +162,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 +176,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 +215,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

@@ -22,6 +22,7 @@ namespace v2rayN.Forms
cmbCoreType.Items.Add("clash"); cmbCoreType.Items.Add("clash");
cmbCoreType.Items.Add("clash_meta"); 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;
@@ -151,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

@@ -345,7 +345,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;
@@ -389,13 +389,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)
{ {
@@ -1277,26 +1270,12 @@ namespace v2rayN.Forms
} }
ConfigHandler.SaveConfig(ref config, false); ConfigHandler.SaveConfig(ref config, false);
DisplayToolStatus();
mainMsgControl.DisplayToolStatus(config);
notifyMain.Icon = this.Icon = MainFormHandler.Instance.GetNotifyIcon(config, this.Icon);
} }
private void DisplayToolStatus()
{
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)
{
sb.Append(" | ");
sb.Append($"{ResUI.SystemProxy} {Global.Loopback}:{config.GetLocalPort(Global.InboundHttp2)}");
}
mainMsgControl.SetToolSslInfo("inbound", sb.ToString());
notifyMain.Icon = MainFormHandler.Instance.GetNotifyIcon(config, this.Icon);
}
#endregion #endregion

View File

@@ -61,6 +61,7 @@ namespace v2rayN.Forms
this.txtMsgBox.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(226)))), ((int)(((byte)(228))))); this.txtMsgBox.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(226)))), ((int)(((byte)(228)))));
this.txtMsgBox.Name = "txtMsgBox"; this.txtMsgBox.Name = "txtMsgBox";
this.txtMsgBox.ReadOnly = true; this.txtMsgBox.ReadOnly = true;
this.txtMsgBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtMsgBox_KeyDown);
// //
// cmsMsgBox // cmsMsgBox
// //
@@ -130,6 +131,7 @@ namespace v2rayN.Forms
this.toolSslServerSpeed, this.toolSslServerSpeed,
this.toolSslBlank4}); this.toolSslBlank4});
this.ssMain.Name = "ssMain"; this.ssMain.Name = "ssMain";
this.ssMain.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.ssMain_ItemClicked);
// //
// toolSslInboundInfo // toolSslInboundInfo
// //

View File

@@ -9,6 +9,7 @@ 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.Base;
using v2rayN.Mode;
using v2rayN.Resx; using v2rayN.Resx;
namespace v2rayN.Forms namespace v2rayN.Forms
@@ -78,6 +79,32 @@ namespace v2rayN.Forms
}); });
} }
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) public void SetToolSslInfo(string type, string value)
{ {
switch (type) switch (type)
@@ -162,6 +189,14 @@ namespace v2rayN.Forms
gbMsgTitle.Text = string.Format(ResUI.MsgInformationTitle, 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 #endregion

View File

@@ -126,12 +126,12 @@
<data name="menuMsgBoxSelectAll.Text" xml:space="preserve"> <data name="menuMsgBoxSelectAll.Text" xml:space="preserve">
<value>Select All (Ctrl+A)</value> <value>Select All (Ctrl+A)</value>
</data> </data>
<data name="&gt;&gt;ssMain.Name" xml:space="preserve">
<value>ssMain</value>
</data>
<data name="&gt;&gt;menuMsgBoxSelectAll.Name" xml:space="preserve"> <data name="&gt;&gt;menuMsgBoxSelectAll.Name" xml:space="preserve">
<value>menuMsgBoxSelectAll</value> <value>menuMsgBoxSelectAll</value>
</data> </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>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="toolSslServerSpeed.AutoSize" type="System.Boolean, mscorlib"> <data name="toolSslServerSpeed.AutoSize" type="System.Boolean, mscorlib">
<value>False</value> <value>False</value>
@@ -146,9 +146,6 @@
<data name="menuMsgBoxSelectAll.Size" type="System.Drawing.Size, System.Drawing"> <data name="menuMsgBoxSelectAll.Size" type="System.Drawing.Size, System.Drawing">
<value>227, 22</value> <value>227, 22</value>
</data> </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;menuMsgBoxCopyAll.Name" xml:space="preserve"> <data name="&gt;&gt;menuMsgBoxCopyAll.Name" xml:space="preserve">
<value>menuMsgBoxCopyAll</value> <value>menuMsgBoxCopyAll</value>
</data> </data>
@@ -173,8 +170,8 @@
<data name="&gt;&gt;toolSslBlank1.Type" xml:space="preserve"> <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> <value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing"> <data name="&gt;&gt;toolSslInboundInfo.Type" xml:space="preserve">
<value>6, 12</value> <value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="toolSslRoutingRule.Size" type="System.Drawing.Size, System.Drawing"> <data name="toolSslRoutingRule.Size" type="System.Drawing.Size, System.Drawing">
<value>0, 17</value> <value>0, 17</value>
@@ -188,6 +185,9 @@
<data name="&gt;&gt;txtMsgBox.Name" xml:space="preserve"> <data name="&gt;&gt;txtMsgBox.Name" xml:space="preserve">
<value>txtMsgBox</value> <value>txtMsgBox</value>
</data> </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"> <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> <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
@@ -209,9 +209,6 @@
<data name="menuMsgBoxAddRoutingRule.Text" xml:space="preserve"> <data name="menuMsgBoxAddRoutingRule.Text" xml:space="preserve">
<value>Add Routing Rule (Ctrl+V)</value> <value>Add Routing Rule (Ctrl+V)</value>
</data> </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="toolSslServerSpeed.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing"> <data name="toolSslServerSpeed.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleRight</value> <value>MiddleRight</value>
</data> </data>
@@ -224,15 +221,15 @@
<data name="toolSslInboundInfo.Text" xml:space="preserve"> <data name="toolSslInboundInfo.Text" xml:space="preserve">
<value>InboundInfo</value> <value>InboundInfo</value>
</data> </data>
<data name="&gt;&gt;txtMsgBox.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;menuMsgBoxAddRoutingRule.Type" xml:space="preserve"> <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> <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="&gt;&gt;menuMsgBoxClear.Name" xml:space="preserve"> <data name="&gt;&gt;menuMsgBoxClear.Name" xml:space="preserve">
<value>menuMsgBoxClear</value> <value>menuMsgBoxClear</value>
</data> </data>
<data name="txtMsgBox.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="gbMsgTitle.TabIndex" type="System.Int32, mscorlib"> <data name="gbMsgTitle.TabIndex" type="System.Int32, mscorlib">
<value>5</value> <value>5</value>
</data> </data>
@@ -242,9 +239,6 @@
<data name="txtMsgBox.Location" type="System.Drawing.Point, System.Drawing"> <data name="txtMsgBox.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 17</value> <value>3, 17</value>
</data> </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;toolSslBlank4.Name" xml:space="preserve"> <data name="&gt;&gt;toolSslBlank4.Name" xml:space="preserve">
<value>toolSslBlank4</value> <value>toolSslBlank4</value>
</data> </data>
@@ -260,15 +254,15 @@
<data name="toolSslBlank2.Size" type="System.Drawing.Size, System.Drawing"> <data name="toolSslBlank2.Size" type="System.Drawing.Size, System.Drawing">
<value>172, 17</value> <value>172, 17</value>
</data> </data>
<data name="&gt;&gt;menuMsgBoxAddRoutingRule.Name" xml:space="preserve">
<value>menuMsgBoxAddRoutingRule</value>
</data>
<data name="txtMsgBox.Multiline" type="System.Boolean, mscorlib"> <data name="txtMsgBox.Multiline" type="System.Boolean, mscorlib">
<value>True</value> <value>True</value>
</data> </data>
<data name="menuMsgBoxClear.Text" xml:space="preserve"> <data name="menuMsgBoxClear.Text" xml:space="preserve">
<value>Clear All</value> <value>Clear All</value>
</data> </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" /> <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"> <data name="txtMsgBox.ScrollBars" type="System.Windows.Forms.ScrollBars, System.Windows.Forms">
<value>Vertical</value> <value>Vertical</value>
@@ -282,6 +276,9 @@
<data name="&gt;&gt;cmsMsgBox.Name" xml:space="preserve"> <data name="&gt;&gt;cmsMsgBox.Name" xml:space="preserve">
<value>cmsMsgBox</value> <value>cmsMsgBox</value>
</data> </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"> <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> <value>System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
@@ -303,8 +300,8 @@
<data name="&gt;&gt;toolSslBlank4.Type" xml:space="preserve"> <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> <value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="menuMsgBoxCopyAll.Text" xml:space="preserve"> <data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>Copy All</value> <value>MainMsgControl</value>
</data> </data>
<data name="gbMsgTitle.Location" type="System.Drawing.Point, System.Drawing"> <data name="gbMsgTitle.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value> <value>0, 0</value>
@@ -318,26 +315,29 @@
<data name="toolSslServerSpeed.RightToLeft" type="System.Windows.Forms.RightToLeft, System.Windows.Forms"> <data name="toolSslServerSpeed.RightToLeft" type="System.Windows.Forms.RightToLeft, System.Windows.Forms">
<value>No</value> <value>No</value>
</data> </data>
<data name="menuMsgBoxCopy.Text" xml:space="preserve"> <data name="menuMsgBoxCopyAll.Text" xml:space="preserve">
<value>Copy (Ctrl+C)</value> <value>Copy All</value>
</data>
<data name="toolSslServerSpeed.Size" type="System.Drawing.Size, System.Drawing">
<value>250, 17</value>
</data> </data>
<data name="ssMain.Text" xml:space="preserve"> <data name="ssMain.Text" xml:space="preserve">
<value>statusStrip1</value> <value>statusStrip1</value>
</data> </data>
<data name="&gt;&gt;menuMsgBoxSelectAll.Type" xml:space="preserve"> <data name="&gt;&gt;menuMsgBoxAddRoutingRule.Name" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>menuMsgBoxAddRoutingRule</value>
</data> </data>
<data name="&gt;&gt;toolSslBlank2.Name" xml:space="preserve"> <data name="&gt;&gt;toolSslBlank2.Name" xml:space="preserve">
<value>toolSslBlank2</value> <value>toolSslBlank2</value>
</data> </data>
<data name="&gt;&gt;menuMsgBoxCopyAll.Type" xml:space="preserve"> <data name="menuMsgBoxFilter.Text" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>Set message filters</value>
</data> </data>
<data name="toolSslServerSpeed.Text" xml:space="preserve"> <data name="toolSslServerSpeed.Text" xml:space="preserve">
<value>SPEED Disabled</value> <value>SPEED Disabled</value>
</data> </data>
<data name="txtMsgBox.TabIndex" type="System.Int32, mscorlib"> <data name="&gt;&gt;txtMsgBox.ZOrder" xml:space="preserve">
<value>4</value> <value>0</value>
</data> </data>
<data name="&gt;&gt;gbMsgTitle.Name" xml:space="preserve"> <data name="&gt;&gt;gbMsgTitle.Name" xml:space="preserve">
<value>gbMsgTitle</value> <value>gbMsgTitle</value>
@@ -348,40 +348,37 @@
<data name="&gt;&gt;ssMain.ZOrder" xml:space="preserve"> <data name="&gt;&gt;ssMain.ZOrder" xml:space="preserve">
<value>1</value> <value>1</value>
</data> </data>
<data name="&gt;&gt;$this.Name" xml:space="preserve"> <data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>MainMsgControl</value> <value>System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="txtMsgBox.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms"> <data name="&gt;&gt;menuMsgBoxSelectAll.Type" xml:space="preserve">
<value>Fill</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;menuMsgBoxCopy.Name" xml:space="preserve"> <data name="&gt;&gt;menuMsgBoxCopy.Name" xml:space="preserve">
<value>menuMsgBoxCopy</value> <value>menuMsgBoxCopy</value>
</data> </data>
<data name="toolSslBlank4.Size" type="System.Drawing.Size, System.Drawing"> <data name="&gt;&gt;txtMsgBox.Type" xml:space="preserve">
<value>0, 17</value> <value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="&gt;&gt;ssMain.Name" xml:space="preserve"> <data name="&gt;&gt;toolSslServerSpeed.Type" xml:space="preserve">
<value>ssMain</value> <value>System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="menuMsgBoxFilter.Text" xml:space="preserve"> <data name="menuMsgBoxCopy.Text" xml:space="preserve">
<value>Set message filters</value> <value>Copy (Ctrl+C)</value>
</data> </data>
<data name="cmsMsgBox.Size" type="System.Drawing.Size, System.Drawing"> <data name="cmsMsgBox.Size" type="System.Drawing.Size, System.Drawing">
<value>228, 136</value> <value>228, 136</value>
</data> </data>
<data name="toolSslServerSpeed.Size" type="System.Drawing.Size, System.Drawing"> <data name="&gt;&gt;menuMsgBoxCopyAll.Type" xml:space="preserve">
<value>250, 17</value> <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<metadata name="cmsMsgBox.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="ssMain.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value> <value>131, 18</value>
</metadata>
<metadata name="$this.Language" type="System.Globalization.CultureInfo, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>zh-Hans</value>
</metadata> </metadata>
<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="ssMain.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="cmsMsgBox.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>131, 18</value> <value>17, 17</value>
</metadata> </metadata>
</root> </root>

View File

@@ -117,25 +117,56 @@
<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="gbMsgTitle.Text" xml:space="preserve"> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<value>信息</value> <data name="menuMsgBoxSelectAll.Size" type="System.Drawing.Size, System.Drawing">
</data> <value>221, 22</value>
<data name="menuMsgBoxAddRoutingRule.Text" xml:space="preserve">
<value>快速添加路由规则 (Ctrl+V)</value>
</data>
<data name="menuMsgBoxClear.Text" xml:space="preserve">
<value>清除所有</value>
</data>
<data name="menuMsgBoxCopy.Text" xml:space="preserve">
<value>复制 (Ctrl+C)</value>
</data>
<data name="menuMsgBoxCopyAll.Text" xml:space="preserve">
<value>复制所有</value>
</data>
<data name="menuMsgBoxFilter.Text" xml:space="preserve">
<value>设置信息过滤器</value>
</data> </data>
<data name="menuMsgBoxSelectAll.Text" xml:space="preserve"> <data name="menuMsgBoxSelectAll.Text" xml:space="preserve">
<value>全选 (Ctrl+A)</value> <value>全选 (Ctrl+A)</value>
</data> </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> </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;
} }

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

@@ -17,6 +17,7 @@ namespace v2rayN
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 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";
@@ -65,9 +66,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>
/// 默认加密方式 /// 默认加密方式
@@ -112,6 +114,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";
@@ -196,6 +199,13 @@ 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>";

View File

@@ -284,7 +284,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 +452,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 +950,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))
@@ -1206,6 +1241,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));
} }
}; };
@@ -172,7 +172,7 @@ 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);
} }
@@ -233,7 +233,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

@@ -87,7 +87,7 @@ namespace v2rayN.Handler
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
}); });
@@ -96,9 +96,8 @@ namespace v2rayN.Handler
{ {
coreType = ECoreType.clash_meta, coreType = ECoreType.clash_meta,
coreExes = new List<string> { "Clash.Meta-windows-amd64v1", "Clash.Meta-windows-amd64", "Clash.Meta-windows-386", "Clash.Meta", "clash" }, coreExes = new List<string> { "Clash.Meta-windows-amd64v1", "Clash.Meta-windows-amd64", "Clash.Meta-windows-386", "Clash.Meta", "clash" },
arguments = "-f config.yaml", arguments = "-f config.json",
coreUrl = Global.clashMetaCoreUrl, coreUrl = Global.clashMetaCoreUrl
match = "Clash Meta"
}); });
coreInfos.Add(new CoreInfo coreInfos.Add(new CoreInfo
@@ -108,6 +107,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,24 +94,8 @@ 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.FillRectangle(drawBrush, new Rectangle(0, 0, width, height));
if (config.enableRoutingAdvanced) graphics.DrawImage(new Bitmap(item.customIcon), 0, 0, width, height);
{
var item = config.routings[config.routingIndex];
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());
drawBrush.Dispose(); drawBrush.Dispose();
@@ -76,7 +107,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 +239,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

@@ -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;
@@ -178,6 +179,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 +228,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}");
}); });
} }

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))
{ {
@@ -958,7 +967,7 @@ namespace v2rayN.Handler
break; break;
case ECoreType.clash: case ECoreType.clash:
case ECoreType.clash_meta: case ECoreType.clash_meta:
fileContent.Add($"port: {LazyConfig.Instance.GetConfig().GetLocalPort(Global.InboundHttp2)}"); 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

@@ -124,17 +124,19 @@ namespace v2rayN.Mode
{ {
get; set; get; set;
} }
public string systemProxyAdvancedProtocol { get; set; }
public int autoUpdateInterval public int autoUpdateInterval { get; set; } = 0;
{
get; set; public int autoUpdateSubInterval { get; set; } = 0;
} = 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

@@ -8,6 +8,7 @@ namespace v2rayN.Mode
clash = 11, clash = 11,
clash_meta = 12, clash_meta = 12,
hysteria = 21, hysteria = 21,
naiveproxy = 22,
v2rayN = 99 v2rayN = 99
} }
} }

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.15")] [assembly: AssemblyFileVersion("5.21")]

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>

View File

@@ -463,4 +463,10 @@
<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>
</root> </root>

View File

@@ -463,4 +463,10 @@
<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>
</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

@@ -474,6 +474,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" />

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 60 KiB