diff --git a/v2rayN/v2rayN.sln b/v2rayN/v2rayN.sln index 64cf71f4..f4dc9d50 100644 --- a/v2rayN/v2rayN.sln +++ b/v2rayN/v2rayN.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.28010.2050 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29926.136 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "v2rayN", "v2rayN\v2rayN.csproj", "{0A9785E6-D256-4B73-9757-4EF59955FD1E}" EndProject @@ -35,7 +35,8 @@ Global HideSolutionNode = FALSE EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution - RESX_SortFileContentOnSave = True + RESX_ResXSortingComparison = CurrentCulture SolutionGuid = {56B88873-C9CC-4069-A1E5-DABD6C6E865E} + RESX_SortFileContentOnSave = True EndGlobalSection EndGlobal diff --git a/v2rayN/v2rayN/Base/HttpWebServerB.cs b/v2rayN/v2rayN/Base/HttpWebServerB.cs index fcbca1dd..6434b9ea 100644 --- a/v2rayN/v2rayN/Base/HttpWebServerB.cs +++ b/v2rayN/v2rayN/Base/HttpWebServerB.cs @@ -41,7 +41,7 @@ namespace v2rayN.Base listener.Start(); Utils.SaveLog("WebserverB running..."); - while (true) + while (true && listener != null) { if (!listener.Pending()) { diff --git a/v2rayN/v2rayN/Base/ListViewSort.cs b/v2rayN/v2rayN/Base/ListViewSort.cs new file mode 100644 index 00000000..4ea29705 --- /dev/null +++ b/v2rayN/v2rayN/Base/ListViewSort.cs @@ -0,0 +1,42 @@ +using System.Windows.Forms; + +namespace v2rayN.Base +{ + + // ref: https://stackoverflow.com/questions/1214289/how-do-i-sort-integers-in-a-listview + class Sorter : System.Collections.IComparer + { + public int Column = 0; + public int Sorting = 0; + public int Compare(object x, object y) // IComparer Member + { + if (!(x is ListViewItem) || !(y is ListViewItem)) + return (0); + + ListViewItem l1 = (ListViewItem)x; + ListViewItem l2 = (ListViewItem)y; + + int doIntSort = Sorting; + if (doIntSort > 0 // Tag will be number + && (ulong.TryParse(l1.SubItems[Column].Tag?.ToString(), out ulong fl1) + && ulong.TryParse(l2.SubItems[Column].Tag?.ToString(), out ulong fl2)) // fallback to text + ) + { + if (doIntSort == 1) + return fl1.CompareTo(fl2); + else + return fl2.CompareTo(fl1); + } + else + { + string str1 = l1.SubItems[Column].Text; + string str2 = l2.SubItems[Column].Text; + + if (doIntSort == -1 || doIntSort == 1) + return str1.CompareTo(str2); + else + return str2.CompareTo(str1); + } + } + } +} diff --git a/v2rayN/v2rayN/Base/WebClientEx.cs b/v2rayN/v2rayN/Base/WebClientEx.cs index 096826cc..e581575c 100644 --- a/v2rayN/v2rayN/Base/WebClientEx.cs +++ b/v2rayN/v2rayN/Base/WebClientEx.cs @@ -5,10 +5,7 @@ namespace v2rayN.Base { class WebClientEx : WebClient { - public int Timeout - { - get; set; - } + public int Timeout { get; set; } public WebClientEx(int timeout = 3000) { Timeout = timeout; diff --git a/v2rayN/v2rayN/Forms/MainForm.Designer.cs b/v2rayN/v2rayN/Forms/MainForm.Designer.cs index 4e516b81..aff2d35f 100644 --- a/v2rayN/v2rayN/Forms/MainForm.Designer.cs +++ b/v2rayN/v2rayN/Forms/MainForm.Designer.cs @@ -55,7 +55,7 @@ this.menuTcpingServer = new System.Windows.Forms.ToolStripMenuItem(); this.menuRealPingServer = new System.Windows.Forms.ToolStripMenuItem(); this.menuSpeedServer = new System.Windows.Forms.ToolStripMenuItem(); - this.tsbTestMe = new System.Windows.Forms.ToolStripMenuItem(); + this.menuTestMe = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator(); this.menuExport2ClientConfig = new System.Windows.Forms.ToolStripMenuItem(); this.menuExport2ServerConfig = new System.Windows.Forms.ToolStripMenuItem(); @@ -94,6 +94,8 @@ this.toolSslPacPortLab = new System.Windows.Forms.ToolStripStatusLabel(); this.toolSslPacPort = new System.Windows.Forms.ToolStripStatusLabel(); this.toolSslBlank3 = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolSslRouting = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolSslServerLatency = new System.Windows.Forms.ToolStripStatusLabel(); this.toolSslServerSpeed = new System.Windows.Forms.ToolStripStatusLabel(); this.toolSslBlank4 = new System.Windows.Forms.ToolStripStatusLabel(); this.panel1 = new System.Windows.Forms.Panel(); @@ -153,20 +155,21 @@ // // lvServers // + this.lvServers.AllowColumnReorder = true; this.lvServers.ContextMenuStrip = this.cmsLv; resources.ApplyResources(this.lvServers, "lvServers"); 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; this.lvServers.Name = "lvServers"; this.lvServers.UseCompatibleStateImageBehavior = false; this.lvServers.View = System.Windows.Forms.View.Details; + this.lvServers.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.lvServers_ColumnClick); + this.lvServers.ColumnReordered += new System.Windows.Forms.ColumnReorderedEventHandler(this.lvServers_ColumnReordered); + this.lvServers.ColumnWidthChanged += new System.Windows.Forms.ColumnWidthChangedEventHandler(this.lvServers_ColumnWidthChanged); this.lvServers.SelectedIndexChanged += new System.EventHandler(this.lvServers_SelectedIndexChanged); - this.lvServers.Click += new System.EventHandler(this.lvServers_Click); this.lvServers.DoubleClick += new System.EventHandler(this.lvServers_DoubleClick); this.lvServers.KeyDown += new System.Windows.Forms.KeyEventHandler(this.lvServers_KeyDown); // @@ -196,7 +199,7 @@ this.menuTcpingServer, this.menuRealPingServer, this.menuSpeedServer, - this.tsbTestMe, + this.menuTestMe, this.toolStripSeparator6, this.menuExport2ClientConfig, this.menuExport2ServerConfig, @@ -335,11 +338,11 @@ resources.ApplyResources(this.menuSpeedServer, "menuSpeedServer"); this.menuSpeedServer.Click += new System.EventHandler(this.menuSpeedServer_Click); // - // tsbTestMe + // menuTestMe // - this.tsbTestMe.Name = "tsbTestMe"; - resources.ApplyResources(this.tsbTestMe, "tsbTestMe"); - this.tsbTestMe.Click += new System.EventHandler(this.tsbTestMe_Click); + this.menuTestMe.Name = "menuTestMe"; + resources.ApplyResources(this.menuTestMe, "menuTestMe"); + this.menuTestMe.Click += new System.EventHandler(this.menuTestMe_Click); // // toolStripSeparator6 // @@ -533,6 +536,7 @@ // // ssMain // + this.ssMain.AllowItemReorder = true; this.ssMain.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolSslSocksPortLab, this.toolSslSocksPort, @@ -543,65 +547,124 @@ this.toolSslPacPortLab, this.toolSslPacPort, this.toolSslBlank3, + this.toolSslRouting, + this.toolSslServerLatency, this.toolSslServerSpeed, this.toolSslBlank4}); resources.ApplyResources(this.ssMain, "ssMain"); this.ssMain.Name = "ssMain"; + this.ssMain.ShowItemToolTips = true; + this.ssMain.TabStop = true; this.ssMain.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.ssMain_ItemClicked); // // toolSslSocksPortLab // - resources.ApplyResources(this.toolSslSocksPortLab, "toolSslSocksPortLab"); + this.toolSslSocksPortLab.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.toolSslSocksPortLab.Name = "toolSslSocksPortLab"; + this.toolSslSocksPortLab.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never; + resources.ApplyResources(this.toolSslSocksPortLab, "toolSslSocksPortLab"); // // toolSslSocksPort // + this.toolSslSocksPort.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.toolSslSocksPort.Name = "toolSslSocksPort"; + this.toolSslSocksPort.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never; resources.ApplyResources(this.toolSslSocksPort, "toolSslSocksPort"); // // toolSslBlank1 // - resources.ApplyResources(this.toolSslBlank1, "toolSslBlank1"); + this.toolSslBlank1.AutoToolTip = true; + this.toolSslBlank1.BorderSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Right; + this.toolSslBlank1.BorderStyle = System.Windows.Forms.Border3DStyle.SunkenInner; + this.toolSslBlank1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.toolSslBlank1.Name = "toolSslBlank1"; + this.toolSslBlank1.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never; + resources.ApplyResources(this.toolSslBlank1, "toolSslBlank1"); this.toolSslBlank1.Spring = true; // // toolSslHttpPortLab // - resources.ApplyResources(this.toolSslHttpPortLab, "toolSslHttpPortLab"); + this.toolSslHttpPortLab.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.toolSslHttpPortLab.Name = "toolSslHttpPortLab"; + this.toolSslHttpPortLab.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never; + resources.ApplyResources(this.toolSslHttpPortLab, "toolSslHttpPortLab"); // // toolSslHttpPort // + this.toolSslHttpPort.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.toolSslHttpPort.Name = "toolSslHttpPort"; + this.toolSslHttpPort.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never; resources.ApplyResources(this.toolSslHttpPort, "toolSslHttpPort"); // // toolSslBlank2 // - resources.ApplyResources(this.toolSslBlank2, "toolSslBlank2"); + this.toolSslBlank2.AutoToolTip = true; + this.toolSslBlank2.BorderSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Right; + this.toolSslBlank2.BorderStyle = System.Windows.Forms.Border3DStyle.SunkenInner; + this.toolSslBlank2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.toolSslBlank2.Name = "toolSslBlank2"; + this.toolSslBlank2.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never; + resources.ApplyResources(this.toolSslBlank2, "toolSslBlank2"); this.toolSslBlank2.Spring = true; // // toolSslPacPortLab // - resources.ApplyResources(this.toolSslPacPortLab, "toolSslPacPortLab"); + this.toolSslPacPortLab.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.toolSslPacPortLab.Name = "toolSslPacPortLab"; + this.toolSslPacPortLab.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never; + resources.ApplyResources(this.toolSslPacPortLab, "toolSslPacPortLab"); // // toolSslPacPort // + this.toolSslPacPort.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.toolSslPacPort.Name = "toolSslPacPort"; + this.toolSslPacPort.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never; resources.ApplyResources(this.toolSslPacPort, "toolSslPacPort"); // // toolSslBlank3 // - resources.ApplyResources(this.toolSslBlank3, "toolSslBlank3"); + this.toolSslBlank3.AutoToolTip = true; + this.toolSslBlank3.BorderSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Right; + this.toolSslBlank3.BorderStyle = System.Windows.Forms.Border3DStyle.SunkenInner; + this.toolSslBlank3.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.toolSslBlank3.Name = "toolSslBlank3"; + this.toolSslBlank3.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never; + resources.ApplyResources(this.toolSslBlank3, "toolSslBlank3"); this.toolSslBlank3.Spring = true; // + // toolSslRouting + // + this.toolSslRouting.BorderSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Right; + this.toolSslRouting.BorderStyle = System.Windows.Forms.Border3DStyle.SunkenInner; + this.toolSslRouting.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.toolSslRouting.IsLink = true; + this.toolSslRouting.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline; + this.toolSslRouting.LinkColor = System.Drawing.SystemColors.ControlText; + this.toolSslRouting.Margin = new System.Windows.Forms.Padding(0, 3, 5, 2); + this.toolSslRouting.Name = "toolSslRouting"; + this.toolSslRouting.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never; + resources.ApplyResources(this.toolSslRouting, "toolSslRouting"); + this.toolSslRouting.Click += new System.EventHandler(this.toolSslRouting_Click); + // + // toolSslServerLatency + // + resources.ApplyResources(this.toolSslServerLatency, "toolSslServerLatency"); + this.toolSslServerLatency.BorderSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Right; + this.toolSslServerLatency.BorderStyle = System.Windows.Forms.Border3DStyle.SunkenInner; + this.toolSslServerLatency.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.toolSslServerLatency.IsLink = true; + this.toolSslServerLatency.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline; + this.toolSslServerLatency.LinkColor = System.Drawing.SystemColors.ControlText; + this.toolSslServerLatency.Margin = new System.Windows.Forms.Padding(0, 3, 5, 2); + this.toolSslServerLatency.Name = "toolSslServerLatency"; + this.toolSslServerLatency.Click += new System.EventHandler(this.toolSslServerLatency_Click); + // // toolSslServerSpeed // - resources.ApplyResources(this.toolSslServerSpeed, "toolSslServerSpeed"); this.toolSslServerSpeed.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.toolSslServerSpeed.Name = "toolSslServerSpeed"; + resources.ApplyResources(this.toolSslServerSpeed, "toolSslServerSpeed"); + this.toolSslServerSpeed.Click += new System.EventHandler(this.toolSslServerSpeed_Click); // // toolSslBlank4 // @@ -819,6 +882,7 @@ this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing); this.Load += new System.EventHandler(this.MainForm_Load); this.Shown += new System.EventHandler(this.MainForm_Shown); + this.ResizeEnd += new System.EventHandler(this.MainForm_ResizeEnd); this.VisibleChanged += new System.EventHandler(this.MainForm_VisibleChanged); this.Resize += new System.EventHandler(this.MainForm_Resize); this.scMain.Panel1.ResumeLayout(false); @@ -932,9 +996,11 @@ private System.Windows.Forms.ToolStripMenuItem tsbV2rayWebsite; private System.Windows.Forms.ToolStripMenuItem menuKeepNothing; private System.Windows.Forms.ToolStripMenuItem menuKeepPACNothing; - private System.Windows.Forms.ToolStripMenuItem tsbTestMe; + private System.Windows.Forms.ToolStripMenuItem menuTestMe; private System.Windows.Forms.ToolStripButton tsbReload; private System.Windows.Forms.ToolStripButton tsbQRCodeSwitch; + private System.Windows.Forms.ToolStripStatusLabel toolSslServerLatency; + private System.Windows.Forms.ToolStripStatusLabel toolSslRouting; } } diff --git a/v2rayN/v2rayN/Forms/MainForm.cs b/v2rayN/v2rayN/Forms/MainForm.cs index a6b79333..0f6ecc3d 100644 --- a/v2rayN/v2rayN/Forms/MainForm.cs +++ b/v2rayN/v2rayN/Forms/MainForm.cs @@ -11,13 +11,15 @@ using v2rayN.Tool; using System.Diagnostics; using System.Drawing; using System.Net; +using System.Threading.Tasks; +using System.Linq; namespace v2rayN.Forms { public partial class MainForm : BaseForm { private V2rayHandler v2rayHandler; - private List lvSelecteds = new List(); + private List lvSelecteds = new List(); // 使用前需用 GetServerListSelectedConfigIndex 更新 private StatisticsHandler statistics = null; #region Window 事件 @@ -33,14 +35,7 @@ namespace v2rayN.Forms Application.ApplicationExit += (sender, args) => { - v2rayHandler.V2rayStop(); - - HttpProxyHandle.CloseHttpAgent(config); - PACServerHandle.Stop(); - - ConfigHandler.SaveConfig(ref config); - statistics?.SaveToFile(); - statistics?.Close(); + Closes(); }; } @@ -54,6 +49,8 @@ namespace v2rayN.Forms { statistics = new StatisticsHandler(config, UpdateStatisticsHandler); } + + Microsoft.Win32.SystemEvents.DisplaySettingsChanged += new EventHandler(SystemEvents_DisplaySettingsChanged); } private void MainForm_VisibleChanged(object sender, EventArgs e) @@ -85,7 +82,6 @@ namespace v2rayN.Forms { if (e.CloseReason == CloseReason.UserClosing) { - StorageUI(); e.Cancel = true; HideForm(); return; @@ -123,7 +119,9 @@ namespace v2rayN.Forms // break; // } //} + #endregion + #region 窗口大小和列宽等取/存 private void RestoreUI() { scMain.Panel2Collapsed = true; @@ -134,20 +132,21 @@ namespace v2rayN.Forms this.Height = config.uiItem.mainSize.Height; } - for (int k = 0; k < lvServers.Columns.Count; k++) + foreach (ColumnHeader c in lvServers.Columns) { - var width = ConfigHandler.GetformMainLvColWidth(ref config, ((EServerColName)k).ToString(), lvServers.Columns[k].Width); - lvServers.Columns[k].Width = width; + var width = ConfigHandler.GetformMainLvColWidth(ref config, c.Name, c.Width); + c.Width = width; } } + // Deprecated. private void StorageUI() { config.uiItem.mainSize = new Size(this.Width, this.Height); - for (int k = 0; k < lvServers.Columns.Count; k++) + foreach (ColumnHeader c in lvServers.Columns) { - ConfigHandler.AddformMainLvColWidth(ref config, ((EServerColName)k).ToString(), lvServers.Columns[k].Width); + ConfigHandler.AddformMainLvColWidth(ref config, c.Name, c.Width); } } @@ -170,32 +169,40 @@ namespace v2rayN.Forms /// private void InitServersView() { + lvServers.ListViewItemSorter = new Sorter(); + lvServers.BeginUpdate(); lvServers.Items.Clear(); - lvServers.GridLines = true; - lvServers.FullRowSelect = true; - lvServers.View = View.Details; - lvServers.Scrollable = true; - lvServers.MultiSelect = true; - lvServers.HeaderStyle = ColumnHeaderStyle.Nonclickable; - - lvServers.Columns.Add("", 30); - lvServers.Columns.Add(UIRes.I18N("LvServiceType"), 80); - lvServers.Columns.Add(UIRes.I18N("LvAlias"), 100); - lvServers.Columns.Add(UIRes.I18N("LvAddress"), 120); - lvServers.Columns.Add(UIRes.I18N("LvPort"), 50); - lvServers.Columns.Add(UIRes.I18N("LvEncryptionMethod"), 90); - lvServers.Columns.Add(UIRes.I18N("LvTransportProtocol"), 70); - lvServers.Columns.Add(UIRes.I18N("LvSubscription"), 50); - lvServers.Columns.Add(UIRes.I18N("LvTestResults"), 70, HorizontalAlignment.Right); + lvServers.Columns.Add(EServerColName.def.ToString(), "", 30); + lvServers.Columns.Add(EServerColName.type.ToString(), UIRes.I18N("LvServiceType"), 80); + lvServers.Columns.Add(EServerColName.remarks.ToString(), UIRes.I18N("LvAlias"), 100); + lvServers.Columns.Add(EServerColName.address.ToString(), UIRes.I18N("LvAddress"), 120); + lvServers.Columns.Add(EServerColName.port.ToString(), UIRes.I18N("LvPort"), 50); + lvServers.Columns.Add(EServerColName.security.ToString(), UIRes.I18N("LvEncryptionMethod"), 90); + lvServers.Columns.Add(EServerColName.network.ToString(), UIRes.I18N("LvTransportProtocol"), 70); + lvServers.Columns.Add(EServerColName.subRemarks.ToString(), UIRes.I18N("LvSubscription"), 50); + lvServers.Columns.Add(EServerColName.testResult.ToString(), UIRes.I18N("LvTestResults"), 70); + lvServers.Columns[EServerColName.port.ToString()].Tag = Global.sortMode.Numeric.ToString(); if (statistics != null && statistics.Enable) { - lvServers.Columns.Add(UIRes.I18N("LvTodayDownloadDataAmount"), 70); - lvServers.Columns.Add(UIRes.I18N("LvTodayUploadDataAmount"), 70); - lvServers.Columns.Add(UIRes.I18N("LvTotalDownloadDataAmount"), 70); - lvServers.Columns.Add(UIRes.I18N("LvTotalUploadDataAmount"), 70); + lvServers.Columns.Add(EServerColName.todayDown.ToString(), UIRes.I18N("LvTodayDownloadDataAmount"), 70); + lvServers.Columns.Add(EServerColName.todayUp.ToString(), UIRes.I18N("LvTodayUploadDataAmount"), 70); + lvServers.Columns.Add(EServerColName.totalDown.ToString(), UIRes.I18N("LvTotalDownloadDataAmount"), 70); + lvServers.Columns.Add(EServerColName.totalUp.ToString(), UIRes.I18N("LvTotalUploadDataAmount"), 70); + + lvServers.Columns[EServerColName.todayDown.ToString()].Tag = Global.sortMode.Numeric.ToString(); + lvServers.Columns[EServerColName.todayUp.ToString()].Tag = Global.sortMode.Numeric.ToString(); + lvServers.Columns[EServerColName.totalDown.ToString()].Tag = Global.sortMode.Numeric.ToString(); + lvServers.Columns[EServerColName.totalUp.ToString()].Tag = Global.sortMode.Numeric.ToString(); + } + + foreach (ColumnHeader c in lvServers.Columns) + { + if (config.uiItem.mainLvColLayout == null) break; + int i = config.uiItem.mainLvColLayout.IndexOf(c.Name); + if (i >= 0) c.DisplayIndex = i; } lvServers.EndUpdate(); } @@ -205,9 +212,9 @@ namespace v2rayN.Forms /// private void RefreshServersView() { - lvServers.BeginUpdate(); lvServers.Items.Clear(); + List lst = new List(); for (int k = 0; k < config.vmess.Count; k++) { string def = string.Empty; @@ -222,10 +229,23 @@ namespace v2rayN.Forms VmessItem item = config.vmess[k]; - void _addSubItem(ListViewItem i, string name, string text) + void _addSubItem(ListViewItem i, string name, string text, object tag = null) { - i.SubItems.Add(new ListViewItem.ListViewSubItem() { Name = name, Text = text }); + var n = new ListViewItem.ListViewSubItem() { Text = text }; + n.Name = name; // new don't accept it. + n.Tag = tag; // cell's data store. + i.SubItems.Add(n); } + ListViewItem lvItem = new ListViewItem(def); + lvItem.Tag = k; // the Tag of line is config's index. + _addSubItem(lvItem, EServerColName.type.ToString(), ((EConfigType)item.configType).ToString()); + _addSubItem(lvItem, EServerColName.remarks.ToString(), item.remarks); + _addSubItem(lvItem, EServerColName.address.ToString(), item.address); + _addSubItem(lvItem, EServerColName.port.ToString(), item.port.ToString(), item.port); + _addSubItem(lvItem, EServerColName.security.ToString(), item.security); + _addSubItem(lvItem, EServerColName.network.ToString(), item.network); + _addSubItem(lvItem, EServerColName.subRemarks.ToString(), item.getSubRemarks(config)); + _addSubItem(lvItem, EServerColName.testResult.ToString(), item.testResult); bool stats = statistics != null && statistics.Enable; if (stats) { @@ -237,38 +257,26 @@ namespace v2rayN.Forms todayUp = Utils.HumanFy(sItem.todayUp); todayDown = Utils.HumanFy(sItem.todayDown); } - } - ListViewItem lvItem = new ListViewItem(def); - _addSubItem(lvItem, EServerColName.type.ToString(), ((EConfigType)item.configType).ToString()); - _addSubItem(lvItem, EServerColName.remarks.ToString(), item.remarks); - _addSubItem(lvItem, EServerColName.address.ToString(), item.address); - _addSubItem(lvItem, EServerColName.port.ToString(), item.port.ToString()); - _addSubItem(lvItem, EServerColName.security.ToString(), item.security); - _addSubItem(lvItem, EServerColName.network.ToString(), item.network); - _addSubItem(lvItem, EServerColName.subRemarks.ToString(), item.getSubRemarks(config)); - _addSubItem(lvItem, EServerColName.testResult.ToString(), item.testResult); - if (stats) - { - _addSubItem(lvItem, EServerColName.todayDown.ToString(), todayDown); - _addSubItem(lvItem, EServerColName.todayUp.ToString(), todayUp); - _addSubItem(lvItem, EServerColName.totalDown.ToString(), totalDown); - _addSubItem(lvItem, EServerColName.totalUp.ToString(), totalUp); + _addSubItem(lvItem, EServerColName.todayDown.ToString(), todayDown, sItem?.todayDown); + _addSubItem(lvItem, EServerColName.todayUp.ToString(), todayUp, sItem?.todayUp); + _addSubItem(lvItem, EServerColName.totalDown.ToString(), totalDown, sItem?.totalDown); + _addSubItem(lvItem, EServerColName.totalUp.ToString(), totalUp, sItem?.totalUp); } - if (k % 2 == 1) // 隔行着色 + if (config.interlaceColoring && k % 2 == 1) // 隔行着色 { - lvItem.BackColor = Color.WhiteSmoke; + lvItem.BackColor = SystemColors.Control; } if (config.index.Equals(k)) { //lvItem.Checked = true; - lvItem.ForeColor = Color.DodgerBlue; + lvItem.ForeColor = SystemColors.MenuHighlight; lvItem.Font = new Font(lvItem.Font, FontStyle.Bold); } - if (lvItem != null) lvServers.Items.Add(lvItem); + if (lvItem != null) lst.Add(lvItem); } - lvServers.EndUpdate(); + lvServers.Items.AddRange(lst.ToArray()); //if (lvServers.Items.Count > 0) //{ @@ -323,26 +331,24 @@ namespace v2rayN.Forms private void lvServers_SelectedIndexChanged(object sender, EventArgs e) { - int index = -1; - try - { - if (lvServers.SelectedIndices.Count > 0) - { - index = lvServers.SelectedIndices[0]; - } - } - catch - { - } - if (index < 0) - { - return; - } - //qrCodeControl.showQRCode(index, config); + RefreshQRCodePanel(); } + private void RefreshQRCodePanel() + { + if (scMain.Panel2Collapsed) return; // saving cpu. + + int index = GetConfigIndexFromServerListSelected(); + if (index < 0) return; + qrCodeControl.showQRCode(index, config); + } + private void RefreshTaryIcon() + { + notifyMain.Icon = MainFormHandler.Instance.GetNotifyIcon(config, this.Icon); + } private void DisplayToolStatus() { + ssMain.SuspendLayout(); toolSslSocksPort.Text = toolSslHttpPort.Text = toolSslPacPort.Text = "OFF"; @@ -367,7 +373,26 @@ namespace v2rayN.Forms } } - notifyMain.Icon = MainFormHandler.Instance.GetNotifyIcon(config, this.Icon); + string routingStatus = ""; + switch (config.routingMode) + { + case 0: + routingStatus = UIRes.I18N("RoutingModeGlobal"); + break; + case 1: + routingStatus = UIRes.I18N("RoutingModeBypassLAN"); + break; + case 2: + routingStatus = UIRes.I18N("RoutingModeBypassCN"); + break; + case 3: + routingStatus = UIRes.I18N("RoutingModeBypassLANCN"); + break; + } + toolSslRouting.Text = routingStatus; + ssMain.ResumeLayout(); + + RefreshTaryIcon(); } private void ssMain_ItemClicked(object sender, ToolStripItemClickedEventArgs e) { @@ -379,73 +404,83 @@ namespace v2rayN.Forms #endregion - #region v2ray 操作 + public static Task autoLatencyRefreshTask; + private void autoLatencyRefresh() + { + if (config.listenerType != ListenerType.noHttpProxy) + { + if (autoLatencyRefreshTask == null || autoLatencyRefreshTask.IsCompleted) + { + autoLatencyRefreshTask = Task.Run(async delegate + { + if (!this.IsHandleCreated) return; // the GUI app is exiting. + await Task.Delay(2000); + this.Invoke((MethodInvoker)(delegate + { + toolSslServerLatencyRefresh(); + })); + }); + } + } + } + #region v2ray 操作 /// /// 载入V2ray /// - private void LoadV2ray() + private async void LoadV2ray() { - tsbReload.Enabled = false; - - if (Global.reloadV2ray) + this.Invoke((MethodInvoker)(delegate { - ClearMsg(); - } - v2rayHandler.LoadV2ray(config); + tsbReload.Enabled = false; + + if (Global.reloadV2ray) + { + ClearMsg(); + } + })); + await v2rayHandler.LoadV2ray(config); Global.reloadV2ray = false; - ConfigHandler.SaveConfig(ref config, false); + ChangePACButtonStatus(config.listenerType); + //ConfigHandler.SaveConfigToFile(ref config, false); // ChangePACButtonStatus does it. statistics?.SaveToFile(); - ChangePACButtonStatus(config.listenerType); + this.Invoke((MethodInvoker)(delegate + { + tsbReload.Enabled = true; - tsbReload.Enabled = true; + autoLatencyRefresh(); + })); } /// - /// 关闭V2ray + /// 关闭相关组件 /// - private void CloseV2ray() + private void Closes() { - ConfigHandler.SaveConfig(ref config, false); - statistics?.SaveToFile(); - - ChangePACButtonStatus(0); - - v2rayHandler.V2rayStop(); + List tasks = new List + { + Task.Run(() => ConfigHandler.SaveConfigToFile(ref config)), + Task.Run(() => HttpProxyHandle.CloseHttpAgent(config)), + Task.Run(() => v2rayHandler.V2rayStop()), + Task.Run(() => PACServerHandle.Stop()), + Task.Run(() => + { + statistics?.SaveToFile(); + statistics?.Close(); + }) + }; + Task.WaitAll(tasks.ToArray()); } #endregion #region 功能按钮 - private void lvServers_Click(object sender, EventArgs e) - { - int index = -1; - try - { - if (lvServers.SelectedIndices.Count > 0) - { - index = lvServers.SelectedIndices[0]; - } - } - catch - { - } - if (index < 0) - { - return; - } - qrCodeControl.showQRCode(index, config); - } - private void lvServers_DoubleClick(object sender, EventArgs e) { - int index = GetLvSelectedIndex(); - if (index < 0) - { - return; - } + int index = GetConfigIndexFromServerListSelected(); + if (index < 0) return; if (config.vmess[index].configType == (int)EConfigType.Vmess) { @@ -573,12 +608,9 @@ namespace v2rayN.Forms private void menuRemoveServer_Click(object sender, EventArgs e) { + int index = GetConfigIndexFromServerListSelected(); + if (index < 0) return; - int index = GetLvSelectedIndex(); - if (index < 0) - { - return; - } if (UI.ShowYesNo(UIRes.I18N("RemoveServer")) == DialogResult.No) { return; @@ -595,12 +627,22 @@ namespace v2rayN.Forms private void menuRemoveDuplicateServer_Click(object sender, EventArgs e) { + VmessItem activeVm = null; + if (config.index >= 0) { + activeVm = config.vmess[config.index]; + } Utils.DedupServerList(config.vmess, out List servers, config.keepOlderDedupl); int oldCount = config.vmess.Count; int newCount = servers.Count; if (servers != null) { config.vmess = servers; + + if (activeVm != null) + { + int index = Utils.ServerVmIndexof(config.vmess, activeVm); + if (index >= 0) config.index = index; // restore to the correct value + } } //刷新 RefreshServers(); @@ -610,11 +652,9 @@ namespace v2rayN.Forms private void menuCopyServer_Click(object sender, EventArgs e) { - int index = GetLvSelectedIndex(); - if (index < 0) - { - return; - } + int index = GetConfigIndexFromServerListSelected(); + if (index < 0) return; + if (ConfigHandler.CopyServer(ref config, index) == 0) { //刷新 @@ -624,11 +664,9 @@ namespace v2rayN.Forms private void menuSetDefaultServer_Click(object sender, EventArgs e) { - int index = GetLvSelectedIndex(); - if (index < 0) - { - return; - } + int index = GetConfigIndexFromServerListSelected(); + if (index < 0) return; + SetDefaultServer(index); } @@ -669,37 +707,37 @@ namespace v2rayN.Forms } private void Speedtest(string actionType) { - if (GetLvSelectedIndex() < 0) return; + if (GetConfigIndexFromServerListSelected() < 0) return; ClearTestResult(); SpeedtestHandler statistics = new SpeedtestHandler(ref config, ref v2rayHandler, lvSelecteds, actionType, UpdateSpeedtestHandler); } - private void tsbTestMe_Click(object sender, EventArgs e) + private async void menuTestMe_Click(object sender, EventArgs e) { - string result = httpProxyTest() + "ms"; + string result = await httpProxyTest() + "ms"; AppendText(false, string.Format(UIRes.I18N("TestMeOutput"), result)); } - private int httpProxyTest() + private async Task httpProxyTest() { SpeedtestHandler statistics = new SpeedtestHandler(ref config, ref v2rayHandler, lvSelecteds, "", UpdateSpeedtestHandler); - return statistics.RunAvailabilityCheck(); + return await Task.Run(() => statistics.RunAvailabilityCheck()); } private void menuExport2ClientConfig_Click(object sender, EventArgs e) { - int index = GetLvSelectedIndex(); + int index = GetConfigIndexFromServerListSelected(); MainFormHandler.Instance.Export2ClientConfig(index, config); } private void menuExport2ServerConfig_Click(object sender, EventArgs e) { - int index = GetLvSelectedIndex(); + int index = GetConfigIndexFromServerListSelected(); MainFormHandler.Instance.Export2ServerConfig(index, config); } private void menuExport2ShareUrl_Click(object sender, EventArgs e) { - GetLvSelectedIndex(); + GetConfigIndexFromServerListSelected(); StringBuilder sb = new StringBuilder(); foreach (int v in lvSelecteds) @@ -722,7 +760,7 @@ namespace v2rayN.Forms private void menuExport2SubContent_Click(object sender, EventArgs e) { - GetLvSelectedIndex(); + GetConfigIndexFromServerListSelected(); StringBuilder sb = new StringBuilder(); foreach (int v in lvSelecteds) @@ -744,13 +782,20 @@ namespace v2rayN.Forms private void tsbOptionSetting_Click(object sender, EventArgs e) { - OptionSettingForm fm = new OptionSettingForm(); + string tab = ""; + if (sender == toolSslRouting) tab = "tabPreDefinedRules"; + + OptionSettingForm fm = new OptionSettingForm(tab); if (fm.ShowDialog() == DialogResult.OK) { //刷新 RefreshServers(); - LoadV2ray(); - HttpProxyHandle.RestartHttpAgent(config, true); + //Application.DoEvents(); + Task.Run(() => + { + LoadV2ray(); + HttpProxyHandle.RestartHttpAgent(config, true); + }); } } @@ -783,15 +828,19 @@ namespace v2rayN.Forms //刷新 RefreshServers(); LoadV2ray(); + toolSslServerLatencySet(); } return 0; } /// - /// 取得ListView选中的行 + /// 获取服务器列表选中行的配置项(config)索引(index) + /// + /// 返回值对应首个选中项,无选中或出错时返回-1 + /// 访问多选请在调用此函数后访问 lvSelecteds /// /// - private int GetLvSelectedIndex() + private int GetConfigIndexFromServerListSelected() { int index = -1; lvSelecteds.Clear(); @@ -803,9 +852,11 @@ namespace v2rayN.Forms return index; } - index = lvServers.SelectedIndices[0]; - foreach (int i in lvServers.SelectedIndices) + index = Convert.ToInt32(lvServers.SelectedItems[0].Tag); + + foreach (int item in lvServers.SelectedIndices) { + int i = Convert.ToInt32(lvServers.Items[item].Tag); lvSelecteds.Add(i); } return index; @@ -815,6 +866,27 @@ namespace v2rayN.Forms return index; } } + /// + /// 获取服务器列表表示指定配置项的所有行的索引 + /// 基于列表项的Tag属性 + /// + /// 出错时返回空。 + /// + /// + private List GetServerListItemsByConfigIndex(int configIndex) + { + var l = new List(); + foreach (ListViewItem item in lvServers.Items) + { + string tagStr = item.Tag?.ToString(); + if (int.TryParse(tagStr, out int tagInt) + && tagInt == configIndex) + { + l.Add(item.Index); + } + } + return l; + } private void menuAddCustomServer_Click(object sender, EventArgs e) { @@ -1047,12 +1119,13 @@ namespace v2rayN.Forms #region 后台测速 - private void SetTestResult(int k, string txt) + private void SetTestResult(int configIndex, string txt) { - if (k < lvServers.Items.Count) + var l = GetServerListItemsByConfigIndex(configIndex); + if (l.Count > 0) { - config.vmess[k].testResult = txt; - lvServers.Items[k].SubItems["testResult"].Text = txt; + config.vmess[configIndex].testResult = txt; + l.ForEach((listIndex) => lvServers.Items[listIndex].SubItems["testResult"].Text = txt); } } private void ClearTestResult() @@ -1076,22 +1149,28 @@ namespace v2rayN.Forms { up /= (ulong)(config.statisticsFreshRate / 1000f); down /= (ulong)(config.statisticsFreshRate / 1000f); - toolSslServerSpeed.Text = string.Format("{0}/s↑ | {1}/s↓", Utils.HumanFy(up), Utils.HumanFy(down)); - - List datas = new List(); + this.Invoke((MethodInvoker)(delegate + { + toolSslServerSpeed.Text = string.Format("{0}/s↑ | {1}/s↓", Utils.HumanFy(up), Utils.HumanFy(down)); + })); for (int i = 0; i < config.vmess.Count; i++) { - int index = statistics.FindIndex(item_ => item_.itemId == config.vmess[i].getItemId()); - if (index != -1) + int statsIndex = statistics.FindIndex(item_ => item_.itemId == config.vmess[i].getItemId()); + List l = GetServerListItemsByConfigIndex(i); + + if (statsIndex != -1 && l.Count > 0) { - lvServers.Invoke((MethodInvoker)delegate + this?.Invoke((MethodInvoker)delegate { lvServers.BeginUpdate(); - lvServers.Items[i].SubItems["todayDown"].Text = Utils.HumanFy(statistics[index].todayDown); - lvServers.Items[i].SubItems["todayUp"].Text = Utils.HumanFy(statistics[index].todayUp); - lvServers.Items[i].SubItems["totalDown"].Text = Utils.HumanFy(statistics[index].totalDown); - lvServers.Items[i].SubItems["totalUp"].Text = Utils.HumanFy(statistics[index].totalUp); + l.ForEach((listIndex) => + { + lvServers.Items[listIndex].SubItems["todayDown"].Text = Utils.HumanFy(statistics[statsIndex].todayDown); + lvServers.Items[listIndex].SubItems["todayUp"].Text = Utils.HumanFy(statistics[statsIndex].todayUp); + lvServers.Items[listIndex].SubItems["totalDown"].Text = Utils.HumanFy(statistics[statsIndex].totalDown); + lvServers.Items[listIndex].SubItems["totalUp"].Text = Utils.HumanFy(statistics[statsIndex].totalUp); + }); lvServers.EndUpdate(); }); @@ -1130,7 +1209,7 @@ namespace v2rayN.Forms private void MoveServer(EMove eMove) { - int index = GetLvSelectedIndex(); + int index = GetConfigIndexFromServerListSelected(); if (index < 0) { UI.Show(UIRes.I18N("PleaseSelectServer")); @@ -1211,8 +1290,13 @@ namespace v2rayN.Forms item.Checked = ((int)type == k); } - ConfigHandler.SaveConfig(ref config, false); - DisplayToolStatus(); + Global.reloadV2ray = false; + ConfigHandler.SaveConfigToFile(ref config); + + this.Invoke((MethodInvoker)(delegate + { + DisplayToolStatus(); + })); } #endregion @@ -1220,11 +1304,11 @@ namespace v2rayN.Forms #region CheckUpdate - private void askToDownload(DownloadHandle downloadHandle, string url) + private async void askToDownload(DownloadHandle downloadHandle, string url) { if (UI.ShowYesNo(string.Format(UIRes.I18N("DownloadYesNo"), url)) == DialogResult.Yes) { - if (httpProxyTest() > 0) + if (await httpProxyTest() > 0) { int httpPort = config.GetLocalPort(Global.InboundHttp); WebProxy webProxy = new WebProxy(Global.Loopback, httpPort); @@ -1327,7 +1411,7 @@ namespace v2rayN.Forms try { - CloseV2ray(); + Closes(); string fileName = downloadHandle.DownloadFileName; fileName = Utils.GetPath(fileName); @@ -1390,7 +1474,8 @@ namespace v2rayN.Forms }; } AppendText(false, UIRes.I18N("MsgStartUpdatingPAC")); - pacListHandle.WebDownloadString(config.urlGFWList); + string url = Utils.IsNullOrEmpty(config.urlGFWList) ? Global.GFWLIST_URL : config.urlGFWList; + pacListHandle.WebDownloadString(url); } private void tsbCheckClearPACList_Click(object sender, EventArgs e) @@ -1503,7 +1588,7 @@ namespace v2rayN.Forms { if (args.Success) { - AppendText(false, $"{hashCode}{UIRes.I18N("MsgGetSubscriptionSuccessfully")}"); + //AppendText(false, $"{hashCode}{UIRes.I18N("MsgGetSubscriptionSuccessfully")}"); string result = Utils.Base64Decode(args.Msg); if (Utils.IsNullOrEmpty(result)) { @@ -1542,6 +1627,7 @@ namespace v2rayN.Forms { bool bShow = tsbQRCodeSwitch.Checked; scMain.Panel2Collapsed = !bShow; + RefreshQRCodePanel(); } #endregion @@ -1563,8 +1649,100 @@ namespace v2rayN.Forms } + #endregion + private void SystemEvents_DisplaySettingsChanged(object sender, EventArgs e) + { + RefreshTaryIcon(); + } + private async void toolSslServerLatencyRefresh() + { + toolSslServerLatencySet(UIRes.I18N("ServerLatencyChecking")); + string result = await httpProxyTest() + "ms"; + toolSslServerLatencySet(result); + } + private void toolSslServerLatencySet(string text = "") + { + toolSslServerLatency.Text = string.Format(UIRes.I18N("toolSslServerLatency"), text); + } + private void toolSslServerLatency_Click(object sender, EventArgs e) + { + toolSslServerLatencyRefresh(); + } + private void toolSslServerSpeed_Click(object sender, EventArgs e) + { + //toolSslServerLatencyRefresh(); + } + + private void toolSslRouting_Click(object sender, EventArgs e) + { + tsbOptionSetting_Click(toolSslRouting, null); + } + + private int lastSortedColIndex = -1; + private bool lastSortedColDirection = false; + private void lvServers_ColumnClick(object sender, ColumnClickEventArgs e) + { + Sorter s = (Sorter)lvServers.ListViewItemSorter; + s.Column = e.Column; + + int doIntSort; + bool isNum = lvServers.Columns[e.Column].Tag?.ToString() == Global.sortMode.Numeric.ToString(); + if (lastSortedColIndex < 0 // 首次 + || (lastSortedColIndex >= 0 && lastSortedColIndex != e.Column) // 排序了其他列 + || (lastSortedColIndex == e.Column && !lastSortedColDirection) // 已排序 + ) + { + lastSortedColDirection = true; + doIntSort = isNum ? 1 : -1; // 正序 + } + else + { + lastSortedColDirection = false; + doIntSort = isNum ? 2 : -2; // 倒序 + } + lastSortedColIndex = e.Column; + + s.Sorting = doIntSort; + + lvServers.Sort(); + reInterlaceColoring(); + } + private void reInterlaceColoring() + { + if (!config.interlaceColoring) return; + for (int k = 0; k < lvServers.Items.Count; k++) + { + if (config.interlaceColoring && k % 2 == 1) + lvServers.Items[k].BackColor = SystemColors.Control; + else + lvServers.Items[k].BackColor = lvServers.BackColor; + } + } + + private void lvServers_ColumnWidthChanged(object sender, ColumnWidthChangedEventArgs e) + { + ColumnHeader c = lvServers.Columns[e.ColumnIndex]; + ConfigHandler.AddformMainLvColWidth(ref config, c.Name, c.Width); + Task.Run(() => ConfigHandler.SaveConfigToFile(ref config)); + } + + private void MainForm_ResizeEnd(object sender, EventArgs e) + { + config.uiItem.mainSize = new Size(this.Width, this.Height); + Task.Run(() => ConfigHandler.SaveConfigToFile(ref config)); + } + + private async void lvServers_ColumnReordered(object sender, ColumnReorderedEventArgs e) + { + await Task.Delay(500); + var names = (from col in lvServers.Columns.Cast() + orderby col.DisplayIndex + select col.Name).ToList(); + config.uiItem.mainLvColLayout = names; + _ = Task.Run(() => ConfigHandler.SaveConfigToFile(ref config)); + } } } diff --git a/v2rayN/v2rayN/Forms/MainForm.resx b/v2rayN/v2rayN/Forms/MainForm.resx index 82105967..2fa0a97a 100644 --- a/v2rayN/v2rayN/Forms/MainForm.resx +++ b/v2rayN/v2rayN/Forms/MainForm.resx @@ -118,193 +118,131 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Fill - - - 3, 17 - 327, 17 - - 355, 22 + + + 17, 17 + + + 137, 17 + + + 498, 17 + + + 228, 18 + + + 409, 17 + + + True + + + 108 + + + 6, 12 - - Add [VMess] server + + 952, 593 - - 355, 22 + + 4, 4, 4, 4 - - Add [Shadowsocks] server + + MainForm - - 355, 22 + + v2rayN - - Add [Socks] server + + v2rayN.Forms.BaseForm, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - - 355, 22 + + bgwScan - - Add a custom configuration server - - - 355, 22 - - - Import bulk URL from clipboard (Ctrl+V) - - - 355, 22 - - - Scan QR code on the screen (Ctrl+S) - - - 352, 6 - - - 355, 22 - - - Remove selected servers (Delete) - - - 355, 22 - - - Remove duplicate servers - - - 355, 22 - - - Clone selected server - - - 355, 22 - - - Set as active server (Enter) - - - 352, 6 - - - 355, 22 - - - Move to top (T) - - - 355, 22 - - - Up (U) - - - 355, 22 - - - Down (D) - - - 355, 22 - - - Move to bottom (B) - - - 355, 22 - - - Select All (Ctrl+A) - - - 352, 6 - - - 355, 22 - - - Test servers ping (Ctrl+P) - - - 355, 22 - - - Test servers with tcping (Ctrl+O) - - - 355, 22 - - - Test servers real delay (Ctrl+R) - - - 355, 22 - - - Test servers download speed (Ctrl+T) - - - 355, 22 - - - Test current service status - - - 352, 6 - - - 355, 22 - - - Export selected server for client configuration - - - 355, 22 - - - Export selected server for server configuration - - - 355, 22 - - - Export share URLs to clipboard (Ctrl+C) - - - 355, 22 - - - Export subscription (base64) share to clipboard - - - Magenta - - - 64, 53 - - - Servers - - - ImageAboveText - - - 356, 556 + + System.ComponentModel.BackgroundWorker, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 cmsLv + + 356, 556 + System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + NoControl + + + cmsMain + + + 265, 164 + + + System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Fill + + + 0, 66 + + + groupBox1 + + + $this + + + 952, 351 + + + 0 + + + Servers list + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 2 + + + Bottom + + + 0, 417 + + + groupBox2 + + + $this + + + 952, 176 + + + 3 + + + Informations + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 3 + Fill @@ -328,36 +266,515 @@ 0, 0 - - 686, 331 - - - - 0 - lvServers - - v2rayN.Base.ListViewFlickerFree, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - scMain.Panel1 + + 686, 331 + + + 0 + + + v2rayN.Base.ListViewFlickerFree, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + 0 - - scMain.Panel1 + + menuAddCustomServer - - System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 355, 22 - - scMain + + Add a custom configuration server - - 0 + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuAddServers + + + 355, 22 + + + Import bulk URL from clipboard (Ctrl+V) + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuAddServers2 + + + 264, 22 + + + Import bulk URL from clipboard + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuAddShadowsocksServer + + + 355, 22 + + + Add [Shadowsocks] server + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuAddSocksServer + + + 355, 22 + + + Add [Socks] server + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuAddVmessServer + + + 355, 22 + + + Add [VMess] server + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuCopyPACUrl + + + 264, 22 + + + Copy local PAC URL + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuCopyServer + + + 355, 22 + + + Clone selected server + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuExit + + + 264, 22 + + + Exit + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuExport2ClientConfig + + + 355, 22 + + + Export selected server for client configuration + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuExport2ServerConfig + + + 355, 22 + + + Export selected server for server configuration + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuExport2ShareUrl + + + 355, 22 + + + Export share URLs to clipboard (Ctrl+C) + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuExport2SubContent + + + 355, 22 + + + Export subscription (base64) share to clipboard + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuGlobal + + + 411, 22 + + + Open Http proxy and set the system proxy (global mode) + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuGlobalPAC + + + 411, 22 + + + Open PAC and set the system proxy (PAC mode) + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuKeep + + + 411, 22 + + + Only open Http proxy and clear the proxy settings + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuKeepNothing + + + 411, 22 + + + Only open Http proxy and do nothing + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuKeepPAC + + + 411, 22 + + + Only open PAC and clear the proxy settings + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuKeepPACNothing + + + 411, 22 + + + Only open PAC and do nothing + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuMoveBottom + + + 355, 22 + + + Move to bottom (B) + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuMoveDown + + + 355, 22 + + + Down (D) + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuMoveTop + + + 355, 22 + + + Move to top (T) + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuMoveUp + + + 355, 22 + + + Up (U) + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuNotEnabledHttp + + + 411, 22 + + + Not Enabled Http Proxy + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuPingServer + + + 355, 22 + + + Test servers ping (Ctrl+P) + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuRealPingServer + + + 355, 22 + + + Test servers real delay (Ctrl+R) + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuRemoveDuplicateServer + + + 355, 22 + + + Remove duplicate servers + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuRemoveServer + + + 355, 22 + + + Remove selected servers (Delete) + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuScanScreen + + + 355, 22 + + + Scan QR code on the screen (Ctrl+S) + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuScanScreen2 + + + 264, 22 + + + Scan QR code on the screen + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuSelectAll + + + 355, 22 + + + Select All (Ctrl+A) + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuServers + + + 264, 22 + + + Server + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuSetDefaultServer + + + 355, 22 + + + Set as active server (Enter) + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuSpeedServer + + + 355, 22 + + + Test servers download speed (Ctrl+T) + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuSysAgentMode + + + 264, 22 + + + Http proxy + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuTcpingServer + + + 355, 22 + + + Test servers with tcping (Ctrl+O) + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuTestMe + + + 355, 22 + + + Test current service status + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + menuUpdateSubscriptions + + + 264, 22 + + + Update subscriptions + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + notifyMain + + + v2rayN + + + System.Windows.Forms.NotifyIcon, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + Top + + + 0, 56 + + + panel1 + + + $this + + + 952, 10 + + + 2 + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 4 Fill @@ -365,39 +782,63 @@ 0, 0 + + qrCodeControl + + + scMain.Panel2 + 256, 331 2 - - qrCodeControl - v2rayN.Forms.QRCodeControl, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null - - scMain.Panel2 - 0 + + Fill + + + 3, 17 + + + scMain + + + scMain.Panel1 + + + scMain + + + System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 0 + scMain.Panel2 - - System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - scMain + + System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + 1 100 + + groupBox1 + 946, 331 @@ -407,260 +848,155 @@ 0 - - scMain - System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - groupBox1 - 0 - - 17, 17 - - - 137, 17 - - - NoControl + + 3, 147 - - 411, 22 + + ssMain - - Not Enabled Http Proxy - - - 411, 22 - - - Open Http proxy and set the system proxy (global mode) - - - 411, 22 - - - Open PAC and set the system proxy (PAC mode) - - - 411, 22 - - - Only open Http proxy and clear the proxy settings - - - 411, 22 - - - Only open PAC and clear the proxy settings - - - 411, 22 - - - Only open Http proxy and do nothing - - - 411, 22 - - - Only open PAC and do nothing - - - 264, 22 - - - Http proxy - - - 264, 22 - - - Server - - - 264, 22 - - - Import bulk URL from clipboard - - - 264, 22 - - - Scan QR code on the screen - - - 264, 22 - - - Copy local PAC URL - - - 264, 22 - - - Update subscriptions - - - 261, 6 - - - 264, 22 - - - Exit - - - 265, 164 - - - cmsMain - - - System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - v2rayN - - - True - - - 498, 17 - - - Fill - - - 0, 66 - - - 952, 351 - - - 0 - - - Servers list - - - groupBox1 - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 2 - - - Fill - - - 3, 17 - - - 0 - - - True - - - Vertical - - - 946, 134 - - - 3 - - - txtMsgBox - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - + groupBox2 - - 0 + + 946, 26 - - 228, 18 - - - 微软雅黑, 8pt + + 6 - - 52, 17 + + statusStrip1 - - SOCKS5: + + System.Windows.Forms.StatusStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 0, 17 + + 1 - - 微软雅黑, 8pt + + toolSslBlank1 - 195, 17 + 170, 21 - - 微软雅黑, 8pt + + System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + toolSslBlank2 + + + 170, 21 + + + System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + toolSslBlank3 + + + 170, 21 + + + System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + toolSslBlank4 + + + 0, 21 + + + System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + toolSslHttpPort + + + 0, 21 + + + System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + toolSslHttpPortLab - 39, 17 + 41, 21 HTTP: - - 0, 17 + + System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 微软雅黑, 8pt + + toolSslPacPort - - 195, 17 + + 0, 21 - - 微软雅黑, 8pt + + System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + toolSslPacPortLab - 33, 17 + 34, 21 PAC: - - 0, 17 + + System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 微软雅黑, 8pt + + toolSslRouting - - 195, 17 + + 96, 21 - + + Routing Mode + + + The Core's routing mode + + + System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + False - - 微软雅黑, 8pt + + toolSslServerLatency - - No + + 80, 21 + + + Latency: + + + MiddleLeft + + + The http proxy's latency time. + + + System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + toolSslServerSpeed - 220, 17 + 100, 21 SPEED Disabled @@ -668,117 +1004,334 @@ MiddleRight - - 0, 17 + + System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 3, 151 + + toolSslSocksPort - - 946, 22 + + 0, 21 - - 0 + + System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - statusStrip1 + + toolSslSocksPortLab - - ssMain + + 58, 21 - - System.Windows.Forms.StatusStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + SOCKS5: - - groupBox2 + + System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 1 + + toolStripSeparator1 - - Bottom + + 352, 6 - - 0, 417 + + System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 952, 176 + + toolStripSeparator10 - - 3 + + 6, 56 - - Informations + + System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - groupBox2 + + toolStripSeparator11 - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 6, 56 - - $this + + System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 3 + + toolStripSeparator12 - - Top + + 184, 6 - - 0, 56 + + System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 952, 10 + + toolStripSeparator13 - - 2 + + 390, 6 - - panel1 + + System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + toolStripSeparator2 - - $this + + 261, 6 - - 4 + + System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + toolStripSeparator3 + + + 352, 6 + + + System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + toolStripSeparator4 - - 409, 17 - 6, 56 - - 125, 22 + + System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Settings + + toolStripSeparator5 - - 125, 22 + + 6, 56 - - Updates + + System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + toolStripSeparator6 + + + 352, 6 + + + System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + toolStripSeparator7 + + + 6, 56 + + + System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + toolStripSeparator8 + + + 6, 56 + + + System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + toolStripSeparator9 + + + 352, 6 + + + System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tsbAbout + + + 187, 22 + + + v2rayN Project + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tsbCheckClearPACList + + + 393, 22 + + + Make PAC pass-through to Core route rules + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Magenta - - 99, 53 + + tsbCheckUpdate - - Subscriptions + + 128, 53 - + + Check for updates + + ImageAboveText + + System.Windows.Forms.ToolStripDropDownButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tsbCheckUpdateCore + + + 393, 22 + + + Update v2rayCore + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tsbCheckUpdateN + + + 393, 22 + + + v2rayN (this software) + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tsbCheckUpdatePACList + + + 393, 22 + + + Check for updated PAC (need the HTTP proxy are ON) + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAySURBVFhH7c6xDQAgCEVBRnVTHU2ZABuMxV3yOvJDAAA/ + GqfZVG6X8mg1dfUAAPBQxAZd0SJruVXHWwAAAABJRU5ErkJggg== + + + + Magenta + + + tsbClose + + + 52, 53 + + + Close + + + ImageAboveText + + + System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Magenta + + + tsbHelp + + + 48, 53 + + + Help + + + ImageAboveText + + + System.Windows.Forms.ToolStripDropDownButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tsbLanguageDef + + + 187, 22 + + + Language-[English] + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tsbLanguageZhHans + + + 187, 22 + + + 语言-[中文简体] + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Magenta + + + tsbOptionSetting + + + 58, 53 + + + Settings + + + ImageAboveText + + + System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Magenta + + + tsbPromotion + + + 89, 53 + + + Promotion + + + ImageAboveText + + + System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + Magenta + + tsbQRCodeSwitch + 45, 53 @@ -791,23 +1344,8 @@ ImageAboveText - - 6, 56 - - - Magenta - - - 58, 53 - - - Settings - - - ImageAboveText - - - 6, 56 + + System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -826,6 +1364,9 @@ Magenta + + tsbReload + 97, 53 @@ -835,665 +1376,133 @@ ImageAboveText - - 6, 56 + + System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 393, 22 - - - v2rayN (this software) - - - 393, 22 - - - Update v2rayCore - - - 393, 22 - - - Check for updated PAC (need the HTTP proxy are ON) - - - 390, 6 - - - 393, 22 - - - Simplify PAC (need to set Core route) - - + Magenta - - 128, 53 - - - Check for updates - - - ImageAboveText - - - 6, 56 - - - 187, 22 - - - v2rayN Project - - - 187, 22 - - - V2Ray Website - - - 184, 6 - - - 187, 22 - - - Language-[English] - - - 187, 22 - - - 语言-[中文简体] - - - Magenta - - - 48, 53 - - - Help - - - ImageAboveText - - - Magenta - - - 89, 53 - - - Promotion - - - ImageAboveText - - - 6, 56 - - - - iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAySURBVFhH7c6xDQAgCEVBRnVTHU2ZABuMxV3yOvJDAAA/ - GqfZVG6X8mg1dfUAAPBQxAZd0SJruVXHWwAAAABJRU5ErkJggg== - - - - Magenta - - - 52, 53 - - - Close - - - ImageAboveText - - - 0, 0 - - - 952, 56 - - - 1 - - - tsMain - - - System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 5 - - - True - - - 108 - - - 6, 12 - - - 952, 593 - - - 4, 4, 4, 4 - - - v2rayN - - - menuAddVmessServer - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - menuAddShadowsocksServer - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - menuAddSocksServer - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - menuAddCustomServer - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - menuAddServers - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - menuScanScreen - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - toolStripSeparator1 - - - System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - menuRemoveServer - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - menuRemoveDuplicateServer - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - menuCopyServer - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - menuSetDefaultServer - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - toolStripSeparator3 - - - System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - menuMoveTop - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - menuMoveUp - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - menuMoveDown - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - menuMoveBottom - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - menuSelectAll - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - toolStripSeparator9 - - - System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - menuPingServer - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - menuTcpingServer - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - menuRealPingServer - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - menuSpeedServer - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tsbTestMe - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - toolStripSeparator6 - - - System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - menuExport2ClientConfig - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - menuExport2ServerConfig - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - menuExport2ShareUrl - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - menuExport2SubContent - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - tsbServer + + 64, 53 + + + Servers + + + ImageAboveText + System.Windows.Forms.ToolStripDropDownButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - notifyMain - - - System.Windows.Forms.NotifyIcon, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - menuSysAgentMode - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - menuNotEnabledHttp - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - menuGlobal - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - menuGlobalPAC - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - menuKeep - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - menuKeepPAC - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - menuKeepNothing - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - menuKeepPACNothing - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - menuServers - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - menuAddServers2 - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - menuScanScreen2 - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - menuCopyPACUrl - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - menuUpdateSubscriptions - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - toolStripSeparator2 - - - System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - menuExit - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - bgwScan - - - System.ComponentModel.BackgroundWorker, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - toolSslSocksPortLab - - - System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - toolSslSocksPort - - - System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - toolSslBlank1 - - - 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 - - - System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - toolSslBlank2 - - - 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 - - - System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - toolSslBlank3 - - - System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - toolSslServerSpeed - - - System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - toolSslBlank4 - - - System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - toolStripSeparator4 - - - System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Magenta tsbSub + + 99, 53 + + + Subscriptions + + + ImageAboveText + System.Windows.Forms.ToolStripDropDownButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 tsbSubSetting + + 125, 22 + + + Settings + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 tsbSubUpdate + + 125, 22 + + + Updates + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tsbQRCodeSwitch - - - System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - toolStripSeparator8 - - - System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tsbOptionSetting - - - System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - toolStripSeparator5 - - - System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tsbReload - - - System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - toolStripSeparator7 - - - System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tsbCheckUpdate - - - System.Windows.Forms.ToolStripDropDownButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tsbCheckUpdateN - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tsbCheckUpdateCore - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tsbCheckUpdatePACList - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - toolStripSeparator13 - - - System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tsbCheckClearPACList - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - toolStripSeparator10 - - - System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tsbHelp - - - System.Windows.Forms.ToolStripDropDownButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tsbAbout - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - tsbV2rayWebsite + + 187, 22 + + + V2Ray Website + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - toolStripSeparator12 + + 0, 0 - - System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + tsMain - - tsbLanguageDef + + $this - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 952, 56 - - tsbLanguageZhHans + + 1 - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tsbPromotion + + 5 - - System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Fill - - toolStripSeparator11 + + 3, 17 - - System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 0 - - tsbClose + + True - - System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + txtMsgBox - - MainForm + + groupBox2 - - v2rayN.Forms.BaseForm, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + + Vertical + + + 946, 130 + + + 3 + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 0 \ No newline at end of file diff --git a/v2rayN/v2rayN/Forms/MainForm.zh-Hans.resx b/v2rayN/v2rayN/Forms/MainForm.zh-Hans.resx index 21164412..b8045d6f 100644 --- a/v2rayN/v2rayN/Forms/MainForm.zh-Hans.resx +++ b/v2rayN/v2rayN/Forms/MainForm.zh-Hans.resx @@ -118,23 +118,34 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 300, 22 + + 301, 534 - - 添加[VMess]服务器 + + 196, 164 - - 300, 22 + + 服务器列表 - - 添加[Shadowsocks]服务器 + + 信息 - - 300, 22 - - - 添加[Socks]服务器 + + + AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w + LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkMAwAAAFFTeXN0 + ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2Vu + PWIwM2Y1ZjdmMTFkNTBhM2EFAQAAACFTeXN0ZW0uV2luZG93cy5Gb3Jtcy5MaXN0Vmlld0l0ZW0HAAAA + BFRleHQKSW1hZ2VJbmRleAlCYWNrQ29sb3IHQ2hlY2tlZARGb250CUZvcmVDb2xvchdVc2VJdGVtU3R5 + bGVGb3JTdWJJdGVtcwEABAAEBAAIFFN5c3RlbS5EcmF3aW5nLkNvbG9yAwAAAAETU3lzdGVtLkRyYXdp + bmcuRm9udAMAAAAUU3lzdGVtLkRyYXdpbmcuQ29sb3IDAAAAAQIAAAAGBAAAAAD/////Bfv///8UU3lz + dGVtLkRyYXdpbmcuQ29sb3IEAAAABG5hbWUFdmFsdWUKa25vd25Db2xvcgVzdGF0ZQEAAAAJBwcDAAAA + CgAAAAAAAAAAGAABAAAJBgAAAAH5////+////woAAAAAAAAAABoAAQABBQYAAAATU3lzdGVtLkRyYXdp + bmcuRm9udAQAAAAETmFtZQRTaXplBVN0eWxlBFVuaXQBAAQECxhTeXN0ZW0uRHJhd2luZy5Gb250U3R5 + bGUDAAAAG1N5c3RlbS5EcmF3aW5nLkdyYXBoaWNzVW5pdAMAAAADAAAABggAAAAG5a6L5L2TAAAQQQX3 + ////GFN5c3RlbS5EcmF3aW5nLkZvbnRTdHlsZQEAAAAHdmFsdWVfXwAIAwAAAAAAAAAF9v///xtTeXN0 + ZW0uRHJhd2luZy5HcmFwaGljc1VuaXQBAAAAB3ZhbHVlX18ACAMAAAADAAAACw== + 300, 22 @@ -148,26 +159,35 @@ 从剪贴板导入批量URL (Ctrl+V) - + + 195, 22 + + + 从剪贴板导入批量URL + + 300, 22 - - 扫描屏幕上的二维码 (Ctrl+S) + + 添加[Shadowsocks]服务器 - - 297, 6 - - + 300, 22 - - 移除所选服务器(多选) (Delete) + + 添加[Socks]服务器 - + 300, 22 - - 移除重复的服务器 + + 添加[VMess]服务器 + + + 195, 22 + + + 复制本地PAC网址 300, 22 @@ -175,74 +195,11 @@ 克隆所选服务器 - - 300, 22 + + 195, 22 - - 设为活动服务器 (Enter) - - - 297, 6 - - - 300, 22 - - - 上移至顶 (T) - - - 300, 22 - - - 上移 (U) - - - 300, 22 - - - 下移 (D) - - - 300, 22 - - - 下移至底 (B) - - - 300, 22 - - - 全选 (Ctrl+A) - - - 297, 6 - - - 300, 22 - - - 测试服务器延迟Ping(多选) (Ctrl+P) - - - 300, 22 - - - 测试服务器延迟Tcping(多选) (Ctrl+O) - - - 300, 22 - - - 测试服务器真连接延迟(多选) (Ctrl+R) - - - 300, 22 - - - 测试服务器速度(多选) (Ctrl+T) - - - 297, 6 + + 退出 300, 22 @@ -268,38 +225,6 @@ 批量导出订阅内容至剪贴板(多选) - - 73, 53 - - - 服务器 - - - 301, 534 - - - - AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w - LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkMAwAAAFFTeXN0 - ZW0uRHJhd2luZywgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2Vu - PWIwM2Y1ZjdmMTFkNTBhM2EFAQAAACFTeXN0ZW0uV2luZG93cy5Gb3Jtcy5MaXN0Vmlld0l0ZW0HAAAA - BFRleHQKSW1hZ2VJbmRleAlCYWNrQ29sb3IHQ2hlY2tlZARGb250CUZvcmVDb2xvchdVc2VJdGVtU3R5 - bGVGb3JTdWJJdGVtcwEABAAEBAAIFFN5c3RlbS5EcmF3aW5nLkNvbG9yAwAAAAETU3lzdGVtLkRyYXdp - bmcuRm9udAMAAAAUU3lzdGVtLkRyYXdpbmcuQ29sb3IDAAAAAQIAAAAGBAAAAAD/////Bfv///8UU3lz - dGVtLkRyYXdpbmcuQ29sb3IEAAAABG5hbWUFdmFsdWUKa25vd25Db2xvcgVzdGF0ZQEAAAAJBwcDAAAA - CgAAAAAAAAAAGAABAAAJBgAAAAH5////+////woAAAAAAAAAABoAAQABBQYAAAATU3lzdGVtLkRyYXdp - bmcuRm9udAQAAAAETmFtZQRTaXplBVN0eWxlBFVuaXQBAAQECxhTeXN0ZW0uRHJhd2luZy5Gb250U3R5 - bGUDAAAAG1N5c3RlbS5EcmF3aW5nLkdyYXBoaWNzVW5pdAMAAAADAAAABggAAAAG5a6L5L2TAAAQQQX3 - ////GFN5c3RlbS5EcmF3aW5nLkZvbnRTdHlsZQEAAAAHdmFsdWVfXwAIAwAAAAAAAAAF9v///xtTeXN0 - ZW0uRHJhd2luZy5HcmFwaGljc1VuaXQBAAAAB3ZhbHVlX18ACAMAAAADAAAACw== - - - - 316, 22 - - - 关闭Http代理 - 316, 22 @@ -318,41 +243,83 @@ 仅开启Http代理,并清除系统代理 - - 316, 22 - - - 仅开启PAC,并清除系统代理 - 316, 22 仅开启Http代理,不改变系统代理 + + 316, 22 + + + 仅开启PAC,并清除系统代理 + 316, 22 仅开启PAC,不改变系统代理 - - 195, 22 + + 300, 22 - - Http代理 + + 下移至底 (B) - - 195, 22 + + 300, 22 - - 服务器 + + 下移 (D) - - 195, 22 + + 300, 22 - - 从剪贴板导入批量URL + + 上移至顶 (T) + + + 300, 22 + + + 上移 (U) + + + 316, 22 + + + 关闭Http代理 + + + 300, 22 + + + 测试服务器延迟Ping(多选) (Ctrl+P) + + + 300, 22 + + + 测试服务器真连接延迟(多选) (Ctrl+R) + + + 300, 22 + + + 移除重复的服务器 + + + 300, 22 + + + 移除所选服务器(多选) (Delete) + + + 300, 22 + + + 扫描屏幕上的二维码 (Ctrl+S) 195, 22 @@ -360,11 +327,44 @@ 扫描屏幕上的二维码 - + + 300, 22 + + + 全选 (Ctrl+A) + + 195, 22 - - 复制本地PAC网址 + + 服务器 + + + 300, 22 + + + 设为活动服务器 (Enter) + + + 300, 22 + + + 测试服务器速度(多选) (Ctrl+T) + + + 195, 22 + + + Http代理 + + + 300, 22 + + + 测试服务器延迟Tcping(多选) (Ctrl+O) + + + 测试当前服务节点状态 195, 22 @@ -372,44 +372,90 @@ 更新订阅 - - 192, 6 + + 路由模式 - - 195, 22 + + Core 路由模式(预定义规则) - - 退出 + + 延迟: - - 196, 164 - - - 服务器列表 + + 当前 HTTP 代理的访问延迟。 网速显示未启用 - - 信息 + + 297, 6 - - 124, 22 + + 220, 6 - - 订阅设置 + + 192, 6 - - 124, 22 + + 297, 6 - - 更新订阅 + + 297, 6 - - 61, 53 + + 297, 6 - - 订阅 + + v2rayN 项目 + + + 223, 22 + + + 将PAC改为直连Core,按路由规则处理 + + + 85, 53 + + + 检查更新 + + + 223, 22 + + + v2rayCore + + + 223, 22 + + + v2rayN + + + 223, 22 + + + PAC + + + + iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wwAADsMBx2+oZAAAADJJREFUWEftzrENACAIRUFGdVMdTZkAG4zFXfI68kMAAD8ap9lUbpfyaDV19QAA + 8FDEBl3RImu5VcdbAAAAAElFTkSuQmCC + + + + 76, 53 + + + 关闭窗口 + + + 69, 53 + + + 帮助 76, 53 @@ -417,17 +463,26 @@ 参数设置 + + 68, 53 + + + 推广 + + + 分享 + 148, 22 重启服务 - - 148, 22 + + 73, 53 - - 测试当前服务状态 + + 服务器 @@ -446,71 +501,31 @@ 当前服务 - - 223, 22 + + 61, 53 - - v2rayN + + 订阅 - - 223, 22 + + 124, 22 - - v2rayCore + + 订阅设置 - - 223, 22 + + 124, 22 - - PAC + + 更新订阅 - - 220, 6 + + 148, 22 - - 223, 22 - - - 简化PAC (请设置Core路由) - - - 85, 53 - - - 检查更新 - - - v2rayN 项目 + + 测试当前服务状态 V2Ray 官网 - - 69, 53 - - - 帮助 - - - 68, 53 - - - 推广 - - - - iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wwAADsMBx2+oZAAAADJJREFUWEftzrENACAIRUFGdVMdTZkAG4zFXfI68kMAAD8ap9lUbpfyaDV19QAA - 8FDEBl3RImu5VcdbAAAAAElFTkSuQmCC - - - - 76, 53 - - - 关闭窗口 - - - 分享 - \ No newline at end of file diff --git a/v2rayN/v2rayN/Forms/OptionSettingForm.Designer.cs b/v2rayN/v2rayN/Forms/OptionSettingForm.Designer.cs index 7c009fc6..eca9c7d4 100644 --- a/v2rayN/v2rayN/Forms/OptionSettingForm.Designer.cs +++ b/v2rayN/v2rayN/Forms/OptionSettingForm.Designer.cs @@ -31,7 +31,7 @@ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(OptionSettingForm)); this.btnClose = new System.Windows.Forms.Button(); this.tabControl1 = new System.Windows.Forms.TabControl(); - this.tabPage1 = new System.Windows.Forms.TabPage(); + this.tabBasic = new System.Windows.Forms.TabPage(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.label16 = new System.Windows.Forms.Label(); this.cmblistenerType = new System.Windows.Forms.ComboBox(); @@ -53,7 +53,7 @@ this.label5 = new System.Windows.Forms.Label(); this.txtlocalPort = new System.Windows.Forms.TextBox(); this.label2 = new System.Windows.Forms.Label(); - this.tabPage2 = new System.Windows.Forms.TabPage(); + this.tabRouting = new System.Windows.Forms.TabPage(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.tabControl2 = new System.Windows.Forms.TabControl(); this.tabPage3 = new System.Windows.Forms.TabPage(); @@ -62,14 +62,14 @@ this.txtUserdirect = new System.Windows.Forms.TextBox(); this.tabPage5 = new System.Windows.Forms.TabPage(); this.txtUserblock = new System.Windows.Forms.TextBox(); - this.tabPage8 = new System.Windows.Forms.TabPage(); + this.tabPreDefinedRules = new System.Windows.Forms.TabPage(); this.cmbroutingMode = new System.Windows.Forms.ComboBox(); this.panel3 = new System.Windows.Forms.Panel(); this.linkLabelRoutingDoc = new System.Windows.Forms.LinkLabel(); this.btnSetDefRountingRule = new System.Windows.Forms.Button(); this.labRoutingTips = new System.Windows.Forms.Label(); this.cmbdomainStrategy = new System.Windows.Forms.ComboBox(); - this.tabPage6 = new System.Windows.Forms.TabPage(); + this.tabKCP = new System.Windows.Forms.TabPage(); this.chkKcpcongestion = new System.Windows.Forms.CheckBox(); this.txtKcpwriteBufferSize = new System.Windows.Forms.TextBox(); this.label10 = new System.Windows.Forms.Label(); @@ -83,7 +83,7 @@ this.label7 = new System.Windows.Forms.Label(); this.txtKcpmtu = new System.Windows.Forms.TextBox(); this.label6 = new System.Windows.Forms.Label(); - this.tabPage7 = new System.Windows.Forms.TabPage(); + this.tabGUI = new System.Windows.Forms.TabPage(); this.chkKeepOlderDedupl = new System.Windows.Forms.CheckBox(); this.cbFreshrate = new System.Windows.Forms.ComboBox(); this.lbFreshrate = new System.Windows.Forms.Label(); @@ -92,27 +92,28 @@ this.txturlGFWList = new System.Windows.Forms.TextBox(); this.label13 = new System.Windows.Forms.Label(); this.chkAutoRun = new System.Windows.Forms.CheckBox(); - this.tabPage9 = new System.Windows.Forms.TabPage(); + this.tabUserPAC = new System.Windows.Forms.TabPage(); this.txtuserPacRule = new System.Windows.Forms.TextBox(); this.panel4 = new System.Windows.Forms.Panel(); this.label4 = new System.Windows.Forms.Label(); this.panel2 = new System.Windows.Forms.Panel(); this.btnOK = new System.Windows.Forms.Button(); this.panel1 = new System.Windows.Forms.Panel(); + this.chkInterlaceColoring = new System.Windows.Forms.CheckBox(); this.tabControl1.SuspendLayout(); - this.tabPage1.SuspendLayout(); + this.tabBasic.SuspendLayout(); this.groupBox1.SuspendLayout(); - this.tabPage2.SuspendLayout(); + this.tabRouting.SuspendLayout(); this.groupBox2.SuspendLayout(); this.tabControl2.SuspendLayout(); this.tabPage3.SuspendLayout(); this.tabPage4.SuspendLayout(); this.tabPage5.SuspendLayout(); - this.tabPage8.SuspendLayout(); + this.tabPreDefinedRules.SuspendLayout(); this.panel3.SuspendLayout(); - this.tabPage6.SuspendLayout(); - this.tabPage7.SuspendLayout(); - this.tabPage9.SuspendLayout(); + this.tabKCP.SuspendLayout(); + this.tabGUI.SuspendLayout(); + this.tabUserPAC.SuspendLayout(); this.panel4.SuspendLayout(); this.panel2.SuspendLayout(); this.SuspendLayout(); @@ -127,21 +128,21 @@ // // tabControl1 // - this.tabControl1.Controls.Add(this.tabPage1); - this.tabControl1.Controls.Add(this.tabPage2); - this.tabControl1.Controls.Add(this.tabPage6); - this.tabControl1.Controls.Add(this.tabPage7); - this.tabControl1.Controls.Add(this.tabPage9); + this.tabControl1.Controls.Add(this.tabBasic); + this.tabControl1.Controls.Add(this.tabRouting); + this.tabControl1.Controls.Add(this.tabKCP); + this.tabControl1.Controls.Add(this.tabGUI); + this.tabControl1.Controls.Add(this.tabUserPAC); resources.ApplyResources(this.tabControl1, "tabControl1"); this.tabControl1.Name = "tabControl1"; this.tabControl1.SelectedIndex = 0; // - // tabPage1 + // tabBasic // - this.tabPage1.Controls.Add(this.groupBox1); - resources.ApplyResources(this.tabPage1, "tabPage1"); - this.tabPage1.Name = "tabPage1"; - this.tabPage1.UseVisualStyleBackColor = true; + this.tabBasic.Controls.Add(this.groupBox1); + resources.ApplyResources(this.tabBasic, "tabBasic"); + this.tabBasic.Name = "tabBasic"; + this.tabBasic.UseVisualStyleBackColor = true; // // groupBox1 // @@ -305,12 +306,12 @@ resources.ApplyResources(this.label2, "label2"); this.label2.Name = "label2"; // - // tabPage2 + // tabRouting // - this.tabPage2.Controls.Add(this.groupBox2); - resources.ApplyResources(this.tabPage2, "tabPage2"); - this.tabPage2.Name = "tabPage2"; - this.tabPage2.UseVisualStyleBackColor = true; + this.tabRouting.Controls.Add(this.groupBox2); + resources.ApplyResources(this.tabRouting, "tabRouting"); + this.tabRouting.Name = "tabRouting"; + this.tabRouting.UseVisualStyleBackColor = true; // // groupBox2 // @@ -325,7 +326,7 @@ this.tabControl2.Controls.Add(this.tabPage3); this.tabControl2.Controls.Add(this.tabPage4); this.tabControl2.Controls.Add(this.tabPage5); - this.tabControl2.Controls.Add(this.tabPage8); + this.tabControl2.Controls.Add(this.tabPreDefinedRules); resources.ApplyResources(this.tabControl2, "tabControl2"); this.tabControl2.Name = "tabControl2"; this.tabControl2.SelectedIndex = 0; @@ -366,12 +367,12 @@ resources.ApplyResources(this.txtUserblock, "txtUserblock"); this.txtUserblock.Name = "txtUserblock"; // - // tabPage8 + // tabPreDefinedRules // - this.tabPage8.Controls.Add(this.cmbroutingMode); - resources.ApplyResources(this.tabPage8, "tabPage8"); - this.tabPage8.Name = "tabPage8"; - this.tabPage8.UseVisualStyleBackColor = true; + this.tabPreDefinedRules.Controls.Add(this.cmbroutingMode); + resources.ApplyResources(this.tabPreDefinedRules, "tabPreDefinedRules"); + this.tabPreDefinedRules.Name = "tabPreDefinedRules"; + this.tabPreDefinedRules.UseVisualStyleBackColor = true; // // cmbroutingMode // @@ -425,24 +426,24 @@ resources.ApplyResources(this.cmbdomainStrategy, "cmbdomainStrategy"); this.cmbdomainStrategy.Name = "cmbdomainStrategy"; // - // tabPage6 + // tabKCP // - this.tabPage6.Controls.Add(this.chkKcpcongestion); - this.tabPage6.Controls.Add(this.txtKcpwriteBufferSize); - this.tabPage6.Controls.Add(this.label10); - this.tabPage6.Controls.Add(this.txtKcpreadBufferSize); - this.tabPage6.Controls.Add(this.label11); - this.tabPage6.Controls.Add(this.txtKcpdownlinkCapacity); - this.tabPage6.Controls.Add(this.label8); - this.tabPage6.Controls.Add(this.txtKcpuplinkCapacity); - this.tabPage6.Controls.Add(this.label9); - this.tabPage6.Controls.Add(this.txtKcptti); - this.tabPage6.Controls.Add(this.label7); - this.tabPage6.Controls.Add(this.txtKcpmtu); - this.tabPage6.Controls.Add(this.label6); - resources.ApplyResources(this.tabPage6, "tabPage6"); - this.tabPage6.Name = "tabPage6"; - this.tabPage6.UseVisualStyleBackColor = true; + this.tabKCP.Controls.Add(this.chkKcpcongestion); + this.tabKCP.Controls.Add(this.txtKcpwriteBufferSize); + this.tabKCP.Controls.Add(this.label10); + this.tabKCP.Controls.Add(this.txtKcpreadBufferSize); + this.tabKCP.Controls.Add(this.label11); + this.tabKCP.Controls.Add(this.txtKcpdownlinkCapacity); + this.tabKCP.Controls.Add(this.label8); + this.tabKCP.Controls.Add(this.txtKcpuplinkCapacity); + this.tabKCP.Controls.Add(this.label9); + this.tabKCP.Controls.Add(this.txtKcptti); + this.tabKCP.Controls.Add(this.label7); + this.tabKCP.Controls.Add(this.txtKcpmtu); + this.tabKCP.Controls.Add(this.label6); + resources.ApplyResources(this.tabKCP, "tabKCP"); + this.tabKCP.Name = "tabKCP"; + this.tabKCP.UseVisualStyleBackColor = true; // // chkKcpcongestion // @@ -510,19 +511,20 @@ resources.ApplyResources(this.label6, "label6"); this.label6.Name = "label6"; // - // tabPage7 + // tabGUI // - this.tabPage7.Controls.Add(this.chkKeepOlderDedupl); - this.tabPage7.Controls.Add(this.cbFreshrate); - this.tabPage7.Controls.Add(this.lbFreshrate); - this.tabPage7.Controls.Add(this.chkEnableStatistics); - this.tabPage7.Controls.Add(this.chkAllowLANConn); - this.tabPage7.Controls.Add(this.txturlGFWList); - this.tabPage7.Controls.Add(this.label13); - this.tabPage7.Controls.Add(this.chkAutoRun); - resources.ApplyResources(this.tabPage7, "tabPage7"); - this.tabPage7.Name = "tabPage7"; - this.tabPage7.UseVisualStyleBackColor = true; + this.tabGUI.Controls.Add(this.chkInterlaceColoring); + this.tabGUI.Controls.Add(this.chkKeepOlderDedupl); + this.tabGUI.Controls.Add(this.cbFreshrate); + this.tabGUI.Controls.Add(this.lbFreshrate); + this.tabGUI.Controls.Add(this.chkEnableStatistics); + this.tabGUI.Controls.Add(this.chkAllowLANConn); + this.tabGUI.Controls.Add(this.txturlGFWList); + this.tabGUI.Controls.Add(this.label13); + this.tabGUI.Controls.Add(this.chkAutoRun); + resources.ApplyResources(this.tabGUI, "tabGUI"); + this.tabGUI.Name = "tabGUI"; + this.tabGUI.UseVisualStyleBackColor = true; // // chkKeepOlderDedupl // @@ -570,13 +572,13 @@ this.chkAutoRun.Name = "chkAutoRun"; this.chkAutoRun.UseVisualStyleBackColor = true; // - // tabPage9 + // tabUserPAC // - this.tabPage9.Controls.Add(this.txtuserPacRule); - this.tabPage9.Controls.Add(this.panel4); - resources.ApplyResources(this.tabPage9, "tabPage9"); - this.tabPage9.Name = "tabPage9"; - this.tabPage9.UseVisualStyleBackColor = true; + this.tabUserPAC.Controls.Add(this.txtuserPacRule); + this.tabUserPAC.Controls.Add(this.panel4); + resources.ApplyResources(this.tabUserPAC, "tabUserPAC"); + this.tabUserPAC.Name = "tabUserPAC"; + this.tabUserPAC.UseVisualStyleBackColor = true; // // txtuserPacRule // @@ -614,6 +616,12 @@ resources.ApplyResources(this.panel1, "panel1"); this.panel1.Name = "panel1"; // + // chkInterlaceColoring + // + resources.ApplyResources(this.chkInterlaceColoring, "chkInterlaceColoring"); + this.chkInterlaceColoring.Name = "chkInterlaceColoring"; + this.chkInterlaceColoring.UseVisualStyleBackColor = true; + // // OptionSettingForm // resources.ApplyResources(this, "$this"); @@ -626,10 +634,10 @@ this.Name = "OptionSettingForm"; this.Load += new System.EventHandler(this.OptionSettingForm_Load); this.tabControl1.ResumeLayout(false); - this.tabPage1.ResumeLayout(false); + this.tabBasic.ResumeLayout(false); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); - this.tabPage2.ResumeLayout(false); + this.tabRouting.ResumeLayout(false); this.groupBox2.ResumeLayout(false); this.tabControl2.ResumeLayout(false); this.tabPage3.ResumeLayout(false); @@ -638,15 +646,15 @@ this.tabPage4.PerformLayout(); this.tabPage5.ResumeLayout(false); this.tabPage5.PerformLayout(); - this.tabPage8.ResumeLayout(false); + this.tabPreDefinedRules.ResumeLayout(false); this.panel3.ResumeLayout(false); this.panel3.PerformLayout(); - this.tabPage6.ResumeLayout(false); - this.tabPage6.PerformLayout(); - this.tabPage7.ResumeLayout(false); - this.tabPage7.PerformLayout(); - this.tabPage9.ResumeLayout(false); - this.tabPage9.PerformLayout(); + this.tabKCP.ResumeLayout(false); + this.tabKCP.PerformLayout(); + this.tabGUI.ResumeLayout(false); + this.tabGUI.PerformLayout(); + this.tabUserPAC.ResumeLayout(false); + this.tabUserPAC.PerformLayout(); this.panel4.ResumeLayout(false); this.panel2.ResumeLayout(false); this.ResumeLayout(false); @@ -666,8 +674,8 @@ private System.Windows.Forms.CheckBox chkudpEnabled; private System.Windows.Forms.Panel panel1; private System.Windows.Forms.TabControl tabControl1; - private System.Windows.Forms.TabPage tabPage1; - private System.Windows.Forms.TabPage tabPage2; + private System.Windows.Forms.TabPage tabBasic; + private System.Windows.Forms.TabPage tabRouting; private System.Windows.Forms.Panel panel2; private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.ComboBox cmbprotocol; @@ -686,7 +694,7 @@ private System.Windows.Forms.TabPage tabPage5; private System.Windows.Forms.TextBox txtUserdirect; private System.Windows.Forms.TextBox txtUserblock; - private System.Windows.Forms.TabPage tabPage6; + private System.Windows.Forms.TabPage tabKCP; private System.Windows.Forms.TextBox txtKcpmtu; private System.Windows.Forms.Label label6; private System.Windows.Forms.TextBox txtKcptti; @@ -700,7 +708,7 @@ private System.Windows.Forms.TextBox txtKcpuplinkCapacity; private System.Windows.Forms.Label label9; private System.Windows.Forms.CheckBox chkKcpcongestion; - private System.Windows.Forms.TabPage tabPage7; + private System.Windows.Forms.TabPage tabGUI; private System.Windows.Forms.CheckBox chkAutoRun; private System.Windows.Forms.Label label13; private System.Windows.Forms.TextBox txturlGFWList; @@ -718,12 +726,13 @@ private System.Windows.Forms.Label lbFreshrate; private System.Windows.Forms.Label label16; private System.Windows.Forms.ComboBox cmblistenerType; - private System.Windows.Forms.TabPage tabPage8; - private System.Windows.Forms.TabPage tabPage9; + private System.Windows.Forms.TabPage tabPreDefinedRules; + private System.Windows.Forms.TabPage tabUserPAC; private System.Windows.Forms.TextBox txtuserPacRule; private System.Windows.Forms.Panel panel4; private System.Windows.Forms.Label label4; private System.Windows.Forms.CheckBox chkKeepOlderDedupl; private System.Windows.Forms.LinkLabel linkLabelRoutingDoc; + private System.Windows.Forms.CheckBox chkInterlaceColoring; } } \ No newline at end of file diff --git a/v2rayN/v2rayN/Forms/OptionSettingForm.cs b/v2rayN/v2rayN/Forms/OptionSettingForm.cs index 6fa88f50..6ef6a395 100644 --- a/v2rayN/v2rayN/Forms/OptionSettingForm.cs +++ b/v2rayN/v2rayN/Forms/OptionSettingForm.cs @@ -9,8 +9,10 @@ namespace v2rayN.Forms { public partial class OptionSettingForm : BaseForm { - public OptionSettingForm() + private string _tabOpened; + public OptionSettingForm(string tabOpened = "") { + _tabOpened = tabOpened; InitializeComponent(); } @@ -25,6 +27,18 @@ namespace v2rayN.Forms InitGUI(); InitUserPAC(); + + var tab = tabControl1.TabPages[_tabOpened]; + var tab2 = tabControl2.TabPages[_tabOpened]; + if (tab != null) + { + tabControl1.SelectedTab = tab; + } + if (tab2 != null) + { + tabControl1.SelectedTab = tabRouting; + tabControl2.SelectedTab = tab2; + } } /// @@ -78,8 +92,7 @@ namespace v2rayN.Forms { //路由 cmbdomainStrategy.Text = config.domainStrategy; - int.TryParse(config.routingMode, out int routingMode); - cmbroutingMode.SelectedIndex = routingMode; + cmbroutingMode.SelectedIndex = config.routingMode; txtUseragent.Text = Utils.List2String(config.useragent, true); txtUserdirect.Text = Utils.List2String(config.userdirect, true); @@ -114,9 +127,7 @@ namespace v2rayN.Forms chkAllowLANConn.Checked = config.allowLANConn; chkEnableStatistics.Checked = config.enableStatistics; chkKeepOlderDedupl.Checked = config.keepOlderDedupl; - - - + chkInterlaceColoring.Checked = config.interlaceColoring; ComboItem[] cbSource = new ComboItem[] { @@ -176,7 +187,7 @@ namespace v2rayN.Forms return; } - if (ConfigHandler.SaveConfig(ref config) == 0) + if (ConfigHandler.SaveConfigToFile(ref config) == 0) { this.DialogResult = DialogResult.OK; } @@ -276,7 +287,7 @@ namespace v2rayN.Forms { //路由 string domainStrategy = cmbdomainStrategy.Text; - string routingMode = cmbroutingMode.SelectedIndex.ToString(); + int routingMode = cmbroutingMode.SelectedIndex; string useragent = txtUseragent.Text.TrimEx(); string userdirect = txtUserdirect.Text.TrimEx(); @@ -345,6 +356,7 @@ namespace v2rayN.Forms config.enableStatistics = chkEnableStatistics.Checked; config.statisticsFreshRate = (int)cbFreshrate.SelectedValue; config.keepOlderDedupl = chkKeepOlderDedupl.Checked; + config.interlaceColoring = chkInterlaceColoring.Checked; //if(lastEnableStatistics != config.enableStatistics) //{ @@ -361,7 +373,7 @@ namespace v2rayN.Forms private int SaveUserPAC() { string userPacRule = txtuserPacRule.Text.TrimEx(); - userPacRule = userPacRule.Replace("\"", ""); + userPacRule = userPacRule.Replace("\"", "").Replace("'", ""); config.userPacRule = Utils.String2List(userPacRule); @@ -446,13 +458,7 @@ namespace v2rayN.Forms class ComboItem { - public int ID - { - get; set; - } - public string Text - { - get; set; - } + public int ID { get; set; } + public string Text { get; set; } } } diff --git a/v2rayN/v2rayN/Forms/OptionSettingForm.resx b/v2rayN/v2rayN/Forms/OptionSettingForm.resx index 7f8ef414..7e082631 100644 --- a/v2rayN/v2rayN/Forms/OptionSettingForm.resx +++ b/v2rayN/v2rayN/Forms/OptionSettingForm.resx @@ -120,24 +120,36 @@ + + True + 6, 12 662, 675 - - True - 4, 4, 4, 4 + + OptionSettingForm + Settings + + v2rayN.Forms.BaseForm, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + 355, 16 + + btnClose + + + panel2 + 75, 23 @@ -147,9 +159,21 @@ &Cancel + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 0 + 267, 16 + + btnOK + + + panel2 + 75, 23 @@ -159,6 +183,12 @@ &OK + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 1 + Top, Right @@ -168,6 +198,12 @@ 322, 10 + + btnSetDefRountingRule + + + panel3 + 229, 23 @@ -177,21 +213,45 @@ Set default custom routing rules + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 1 + 161, 84 + + cbFreshrate + + + tabGUI + 58, 20 32 + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 2 + True 15, 63 + + chkAllowIn2 + + + groupBox1 + 120, 16 @@ -201,15 +261,27 @@ listening port 2 + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + False + + 7 + True 15, 38 + + chkAllowLANConn + + + tabGUI + 204, 16 @@ -219,12 +291,24 @@ Allow connections from the LAN + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 5 + True 15, 16 + + chkAutoRun + + + tabGUI + 246, 16 @@ -234,6 +318,12 @@ Automatically start at system startup + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 8 + True @@ -243,6 +333,12 @@ 15, 62 + + chkEnableStatistics + + + tabGUI + 576, 16 @@ -252,12 +348,54 @@ Enable Statistics (Realtime netspeed and traffic records. Require restart the v2rayN client) + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 4 + + + True + + + NoControl + + + 15, 132 + + + chkInterlaceColoring + + + tabGUI + + + 132, 16 + + + 34 + + + Interlace coloring + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 0 + True 20, 143 + + chkKcpcongestion + + + tabKCP + 84, 16 @@ -267,6 +405,12 @@ congestion + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 0 + True @@ -276,6 +420,12 @@ 15, 110 + + chkKeepOlderDedupl + + + tabGUI + 198, 16 @@ -285,12 +435,24 @@ Keep older when deduplication + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 1 + True 15, 160 + + chklogEnabled + + + groupBox1 + 126, 16 @@ -300,12 +462,24 @@ Record local logs + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 15 + True 15, 129 + + chkmuxEnabled + + + groupBox1 + 174, 16 @@ -315,6 +489,12 @@ Turn on Mux Multiplexing + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 6 + True @@ -324,6 +504,12 @@ 468, 27 + + chksniffingEnabled + + + groupBox1 + 120, 16 @@ -333,6 +519,12 @@ Turn on Sniffing + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 3 + True @@ -342,6 +534,12 @@ 468, 60 + + chksniffingEnabled2 + + + groupBox1 + 120, 16 @@ -351,15 +549,27 @@ Turn on Sniffing + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + False + + 2 + True 369, 27 + + chkudpEnabled + + + groupBox1 + 84, 16 @@ -369,12 +579,24 @@ Enable UDP + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 14 + True 369, 62 + + chkudpEnabled2 + + + groupBox1 + 84, 16 @@ -384,9 +606,15 @@ Enable UDP + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + False + + 8 + AsIs @@ -399,12 +627,24 @@ 115, 10 + + cmbdomainStrategy + + + panel3 + 165, 20 16 + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 3 + Not Enabled Http Proxy @@ -429,12 +669,24 @@ 124, 94 + + cmblistenerType + + + groupBox1 + 464, 20 33 + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 1 + debug @@ -453,12 +705,24 @@ 257, 158 + + cmbloglevel + + + groupBox1 + 97, 20 6 + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 16 + False @@ -471,12 +735,24 @@ 257, 25 + + cmbprotocol + + + groupBox1 + 97, 20 12 + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 12 + socks @@ -486,15 +762,27 @@ 257, 60 + + cmbprotocol2 + + + groupBox1 + 97, 20 17 + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + False + + 9 + Global @@ -510,42 +798,84 @@ 21, 17 + + cmbroutingMode + + + tabPreDefinedRules + 255, 20 14 + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 0 + Fill 3, 3 + + groupBox1 + + + tabBasic + 648, 573 6 + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 0 + Fill 3, 3 + + groupBox2 + + + tabRouting + 648, 573 12 + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 0 + True 206, 29 + + label1 + + + groupBox1 + 53, 12 @@ -555,12 +885,24 @@ protocol + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 13 + True 236, 104 + + label10 + + + tabKCP + 95, 12 @@ -570,12 +912,24 @@ writeBufferSize + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 2 + True 18, 104 + + label11 + + + tabKCP + 89, 12 @@ -585,12 +939,24 @@ readBufferSize + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 4 + True 30, 176 + + label13 + + + tabGUI + 431, 12 @@ -598,7 +964,13 @@ 27 - Custom GFWList address (please fill in the blank without customization) + Custom GFWList address (use default value if leave blank) + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 7 True @@ -606,6 +978,12 @@ 33, 204 + + label14 + + + groupBox1 + 281, 12 @@ -615,6 +993,12 @@ Custom DNS (multiple, separated by commas (,)) + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 5 + True @@ -624,6 +1008,12 @@ 42, 98 + + label16 + + + groupBox1 + 65, 12 @@ -633,12 +1023,24 @@ Http proxy + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 0 + True 33, 29 + + label2 + + + groupBox1 + 89, 12 @@ -648,12 +1050,24 @@ Listening port + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 19 + True 206, 64 + + label3 + + + groupBox1 + 53, 12 @@ -663,15 +1077,27 @@ protocol + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + False + + 10 + NoControl 5, 11 + + label4 + + + panel4 + 598, 16 @@ -681,12 +1107,24 @@ *Set user pac rules, separated by commas (,) + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 0 + True 193, 162 + + label5 + + + groupBox1 + 59, 12 @@ -696,12 +1134,24 @@ Log level + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17 + True 18, 28 + + label6 + + + tabKCP + 23, 12 @@ -711,12 +1161,24 @@ mtu + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 12 + True 236, 28 + + label7 + + + tabKCP + 23, 12 @@ -726,12 +1188,24 @@ tti + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 10 + True 236, 66 + + label8 + + + tabKCP + 101, 12 @@ -741,12 +1215,24 @@ downlinkCapacity + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 6 + True 18, 66 + + label9 + + + tabKCP + 89, 12 @@ -756,9 +1242,21 @@ uplinkCapacity + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 8 + 5, 45 + + labRoutingTips + + + panel3 + 598, 16 @@ -768,6 +1266,12 @@ *Set the rules, separated by commas (,); support Domain (pure string / regular / subdomain) and IP + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 2 + True @@ -777,6 +1281,12 @@ 30, 87 + + lbFreshrate + + + tabGUI + 125, 12 @@ -786,6 +1296,12 @@ Statistics freshrate + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 3 + True @@ -795,6 +1311,12 @@ 0, 0, 0, 0 + + linkLabelRoutingDoc + + + panel3 + 95, 12 @@ -804,114 +1326,249 @@ Domain strategy + + System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 0 + Top 0, 0 + + panel1 + + + $this + 662, 10 9 + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 2 + Bottom 0, 615 + + panel2 + + + $this + 662, 60 11 + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 1 + Top 3, 17 + + panel3 + + + groupBox2 + 642, 67 19 + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 1 + Top 3, 3 + + panel4 + + + tabUserPAC + 648, 37 20 + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 1 + + + 4, 22 + + + tabBasic + + + 3, 3, 3, 3 + + + tabControl1 + + + 654, 579 + + + 0 + + + Core: basic settings + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 0 + Fill 0, 10 + + tabControl1 + + + $this + 662, 605 10 + + System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 0 + Fill 3, 84 + + tabControl2 + + + groupBox2 + 642, 486 12 - - 4, 22 + + System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 3, 3, 3, 3 - - - 654, 579 - - + 0 - - Core: basic settings - - + 4, 22 - + + tabGUI + + 3, 3, 3, 3 - + + tabControl1 + + 654, 579 - - 1 + + 3 - - Core: Routing settings + + v2rayN settings + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 3 + + + 4, 22 + + + tabKCP + + + 3, 3, 3, 3 + + + tabControl1 + + + 654, 579 + + + 2 + + + Core: KCP settings + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 2 4, 22 + + tabPage3 + 3, 3, 3, 3 + + tabControl2 + 634, 460 @@ -921,12 +1578,24 @@ 1.Proxy Domain or IP + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 0 + 4, 22 + + tabPage4 + 3, 3, 3, 3 + + tabControl2 + 634, 460 @@ -936,12 +1605,24 @@ 2.Direct Domain or IP + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 1 + 4, 22 + + tabPage5 + 3, 3, 3, 3 + + tabControl2 + 634, 460 @@ -951,165 +1632,309 @@ 3.Block Domain or IP - - 4, 22 + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 3, 3, 3, 3 - - - 654, 579 - - + 2 - - Core: KCP settings - - + 4, 22 - + + tabPreDefinedRules + + 3, 3, 3, 3 - - 654, 579 + + tabControl2 - - 3 - - - v2rayN settings - - - 4, 22 - - - 3, 3, 3, 3 - - + 634, 460 - + 3 - + 4.Pre-defined rules - + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 3 + + 4, 22 - + + tabRouting + + 3, 3, 3, 3 - + + tabControl1 + + 654, 579 - + + 1 + + + Core: Routing settings + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 1 + + + 4, 22 + + + tabUserPAC + + + 3, 3, 3, 3 + + + tabControl1 + + + 654, 579 + + 4 - + User PAC settings + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 4 + 345, 62 + + txtKcpdownlinkCapacity + + + tabKCP + 94, 21 11 + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 5 + 111, 24 + + txtKcpmtu + + + tabKCP + 94, 21 5 + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 11 + 111, 100 + + txtKcpreadBufferSize + + + tabKCP + 94, 21 13 + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 3 + 345, 24 + + txtKcptti + + + tabKCP + 94, 21 7 + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 9 + 111, 62 + + txtKcpuplinkCapacity + + + tabKCP + 94, 21 9 + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 7 + 345, 100 + + txtKcpwriteBufferSize + + + tabKCP + 94, 21 15 + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 1 + 124, 25 + + txtlocalPort + + + groupBox1 + 78, 21 3 + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 18 + 124, 60 + + txtlocalPort2 + + + groupBox1 + 78, 21 14 + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + False + + 11 + 33, 228 True + + txtremoteDNS + + + groupBox1 + 555, 100 30 - - 32, 205 + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True + + 4 + + + 32, 200 + + + txturlGFWList + + + tabGUI - 541, 100 + 541, 21 28 + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 6 + Fill @@ -1122,6 +1947,12 @@ True + + txtUseragent + + + tabPage3 + Vertical @@ -1131,6 +1962,12 @@ 0 + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 0 + Fill @@ -1143,6 +1980,12 @@ True + + txtUserblock + + + tabPage5 + Vertical @@ -1152,6 +1995,12 @@ 1 + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 0 + Fill @@ -1164,6 +2013,12 @@ True + + txtUserdirect + + + tabPage4 + Vertical @@ -1173,6 +2028,12 @@ 1 + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 0 + Fill @@ -1185,6 +2046,12 @@ True + + txtuserPacRule + + + tabUserPAC + Vertical @@ -1194,4 +2061,10 @@ 21 + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 0 + \ No newline at end of file diff --git a/v2rayN/v2rayN/Forms/OptionSettingForm.zh-Hans.resx b/v2rayN/v2rayN/Forms/OptionSettingForm.zh-Hans.resx index 1509bce5..b7968de4 100644 --- a/v2rayN/v2rayN/Forms/OptionSettingForm.zh-Hans.resx +++ b/v2rayN/v2rayN/Forms/OptionSettingForm.zh-Hans.resx @@ -164,6 +164,9 @@ 启用统计(实时网速显示和使用流量显示,需要重启v2rayN客户端) + + 隔行着色 + 去重时保留序号较小的项 @@ -249,7 +252,7 @@ 227, 12 - 自定义GFWList地址(不需自定义请填空白) + 自定义GFWList地址(留空则使用默认值) 191, 12 @@ -279,7 +282,7 @@ 协议 - *设置用户PAC规则,用逗号(,)隔开 + *用户PAC内的自定条目。用逗号(,)或换行隔开的匹配模式(pattern)。英文单引号、双引号将被忽略。 53, 12 @@ -312,17 +315,20 @@ 642, 72 + + Core:基础设置 + 3, 89 642, 481 - - Core:基础设置 + + v2rayN设置 - - Core:路由设置 + + Core:KCP设置 634, 455 @@ -342,19 +348,16 @@ 3.阻止的Domain或IP - - Core:KCP设置 - - - v2rayN设置 - 634, 455 - + 4.预定义规则 - + + Core:路由设置 + + 用户PAC设置 diff --git a/v2rayN/v2rayN/Forms/QRCodeControl.resx b/v2rayN/v2rayN/Forms/QRCodeControl.resx index a6ceff05..2f13a849 100644 --- a/v2rayN/v2rayN/Forms/QRCodeControl.resx +++ b/v2rayN/v2rayN/Forms/QRCodeControl.resx @@ -118,34 +118,22 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Bottom - - - 0, 371 - - + True + + + 6, 12 - - 356, 70 + + QRCodeControl - - 0 + + 356, 441 - - txtUrl - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 1 + + System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Fill @@ -153,6 +141,12 @@ 0, 0 + + picQRCode + + + $this + 356, 371 @@ -162,31 +156,37 @@ 24 - - picQRCode - System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - $this - 0 - + + Bottom + + + 0, 371 + + True - - - 6, 12 - - 356, 441 + + txtUrl - - QRCodeControl + + $this - - System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 356, 70 + + + 0 + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 1 \ No newline at end of file diff --git a/v2rayN/v2rayN/Forms/SubSettingForm.cs b/v2rayN/v2rayN/Forms/SubSettingForm.cs index c8e7725b..f56b279e 100644 --- a/v2rayN/v2rayN/Forms/SubSettingForm.cs +++ b/v2rayN/v2rayN/Forms/SubSettingForm.cs @@ -8,8 +8,6 @@ namespace v2rayN.Forms { public partial class SubSettingForm : BaseForm { - List lstControls = new List(); - public SubSettingForm() { InitializeComponent(); @@ -30,8 +28,8 @@ namespace v2rayN.Forms /// private void RefreshSubsView() { + panCon.SuspendLayout(); panCon.Controls.Clear(); - lstControls.Clear(); for (int k = config.subItem.Count - 1; k >= 0; k--) { @@ -56,9 +54,8 @@ namespace v2rayN.Forms panCon.Controls.Add(control); panCon.Controls.SetChildIndex(control, 0); - - lstControls.Add(control); } + panCon.ResumeLayout(); } private void Control_OnButtonClicked(object sender, EventArgs e) diff --git a/v2rayN/v2rayN/Global.cs b/v2rayN/v2rayN/Global.cs index 58ed9d5a..4fbd61e4 100644 --- a/v2rayN/v2rayN/Global.cs +++ b/v2rayN/v2rayN/Global.cs @@ -156,6 +156,15 @@ namespace v2rayN /// public const string CustomIconName = "v2rayN.ico"; + /// + /// 表格列的排序方式 + /// + public enum sortMode + { + Numeric, + // More, like natural numbers, string length, visual length, etc. + } + public enum StatisticsFreshRate { quick = 1000, @@ -171,61 +180,37 @@ namespace v2rayN #region 全局变量 /// - /// 是否需要重启服务V2ray + /// 是否需要重启服务V2ray。如果为假,LoadV2ray()不做任何事。 /// - public static bool reloadV2ray - { - get; set; - } + public static bool reloadV2ray { get; set; } /// /// 是否开启全局代理(http) /// - public static bool sysAgent - { - get; set; - } + public static bool sysAgent { get; set; } /// /// socks端口 /// - public static int socksPort - { - get; set; - } + public static int socksPort { get; set; } /// /// http端口 /// - public static int httpPort - { - get; set; - } + public static int httpPort { get; set; } /// /// PAC端口 /// - public static int pacPort - { - get; set; - } + public static int pacPort { get; set; } /// /// /// - public static int statePort - { - get; set; - } + public static int statePort { get; set; } - public static Job processJob - { - get; set; - } - public static System.Threading.Mutex mutexObj - { - get; set; - } + public static Job processJob { get; set; } + public static System.Threading.Mutex mutexObj { get; set; } #endregion diff --git a/v2rayN/v2rayN/Handler/ConfigHandler.cs b/v2rayN/v2rayN/Handler/ConfigHandler.cs index c6748e56..51301432 100644 --- a/v2rayN/v2rayN/Handler/ConfigHandler.cs +++ b/v2rayN/v2rayN/Handler/ConfigHandler.cs @@ -85,10 +85,6 @@ namespace v2rayN.Handler { config.domainStrategy = "IPIfNonMatch"; } - if (Utils.IsNullOrEmpty(config.routingMode)) - { - config.routingMode = "0"; - } if (config.useragent == null) { config.useragent = new List(); @@ -137,10 +133,6 @@ namespace v2rayN.Handler { config.speedPingTestUrl = Global.SpeedPingTestUrl; } - if (Utils.IsNullOrEmpty(config.urlGFWList)) - { - config.urlGFWList = Global.GFWLIST_URL; - } //if (Utils.IsNullOrEmpty(config.remoteDNS)) //{ // config.remoteDNS = "1.1.1.1"; @@ -227,7 +219,7 @@ namespace v2rayN.Handler } } - ToJsonFile(config); + SaveConfigToFile(config); return 0; } @@ -268,7 +260,7 @@ namespace v2rayN.Handler Global.reloadV2ray = true; } - ToJsonFile(config); + SaveConfigToFile(config); return 0; } @@ -306,7 +298,7 @@ namespace v2rayN.Handler config.vmess.Insert(index + 1, vmessItem); // 插入到下一项 - ToJsonFile(config); + SaveConfigToFile(config); return 0; } @@ -332,32 +324,22 @@ namespace v2rayN.Handler config.index = index; Global.reloadV2ray = true; - ToJsonFile(config); + SaveConfigToFile(config); return 0; } /// - /// 保参数 + /// 保存设置文件 /// /// - /// - public static int SaveConfig(ref Config config, bool reload = true) + public static int SaveConfigToFile(ref Config config) { - Global.reloadV2ray = reload; - - ToJsonFile(config); - - return 0; + return Utils.ToJsonFile(config, Utils.GetPath(configRes)); } - - /// - /// 存储文件 - /// - /// - private static void ToJsonFile(Config config) + public static int SaveConfigToFile(Config config) { - Utils.ToJsonFile(config, Utils.GetPath(configRes)); + return Utils.ToJsonFile(config, Utils.GetPath(configRes)); } /// @@ -541,7 +523,7 @@ namespace v2rayN.Handler } Global.reloadV2ray = true; - ToJsonFile(config); + SaveConfigToFile(config); return 0; } @@ -580,7 +562,7 @@ namespace v2rayN.Handler Global.reloadV2ray = true; } - ToJsonFile(config); + SaveConfigToFile(config); return 0; } @@ -601,7 +583,7 @@ namespace v2rayN.Handler Global.reloadV2ray = true; } - ToJsonFile(config); + SaveConfigToFile(config); return 0; } @@ -642,7 +624,7 @@ namespace v2rayN.Handler } } - ToJsonFile(config); + SaveConfigToFile(config); return 0; } @@ -681,7 +663,7 @@ namespace v2rayN.Handler } } - ToJsonFile(config); + SaveConfigToFile(config); return 0; } @@ -862,7 +844,7 @@ namespace v2rayN.Handler } } - ToJsonFile(config); + SaveConfigToFile(config); return 0; } @@ -886,7 +868,7 @@ namespace v2rayN.Handler } } - ToJsonFile(config); + SaveConfigToFile(config); return 0; } diff --git a/v2rayN/v2rayN/Handler/MainFormHandler.cs b/v2rayN/v2rayN/Handler/MainFormHandler.cs index 83865d92..d99fd3de 100644 --- a/v2rayN/v2rayN/Handler/MainFormHandler.cs +++ b/v2rayN/v2rayN/Handler/MainFormHandler.cs @@ -97,11 +97,11 @@ namespace v2rayN.Handler configCopy.index = index; if (V2rayConfigHandler.Export2ClientConfig(configCopy, fileName, out string msg) != 0) { - UI.Show(msg); + UI.ShowWarning(msg); } else { - UI.ShowWarning(string.Format(UIRes.I18N("SaveClientConfigurationIn"), fileName)); + UI.Show(string.Format(UIRes.I18N("SaveClientConfigurationIn"), fileName)); } } @@ -137,11 +137,11 @@ namespace v2rayN.Handler configCopy.index = index; if (V2rayConfigHandler.Export2ServerConfig(configCopy, fileName, out string msg) != 0) { - UI.Show(msg); + UI.ShowWarning(msg); } else { - UI.ShowWarning(string.Format(UIRes.I18N("SaveServerConfigurationIn"), fileName)); + UI.Show(string.Format(UIRes.I18N("SaveServerConfigurationIn"), fileName)); } } diff --git a/v2rayN/v2rayN/Handler/SpeedtestHandler.cs b/v2rayN/v2rayN/Handler/SpeedtestHandler.cs index 303034b9..f14296dc 100644 --- a/v2rayN/v2rayN/Handler/SpeedtestHandler.cs +++ b/v2rayN/v2rayN/Handler/SpeedtestHandler.cs @@ -150,24 +150,19 @@ namespace v2rayN.Handler try { int httpPort = _config.GetLocalPort(Global.InboundHttp); - - Task t = Task.Run(() => + try { - try - { - WebProxy webProxy = new WebProxy(Global.Loopback, httpPort); - int responseTime = -1; - string status = GetRealPingTime(Global.AvailabilityTestUrl, webProxy, out responseTime); - bool noError = Utils.IsNullOrEmpty(status); - return noError ? responseTime : -1; - } - catch (Exception ex) - { - Utils.SaveLog(ex.Message, ex); - return -1; - } - }); - return t.Result; + WebProxy webProxy = new WebProxy(Global.Loopback, httpPort); + int responseTime = -1; + string status = GetRealPingTime(Global.AvailabilityTestUrl, webProxy, out responseTime); + bool noError = Utils.IsNullOrEmpty(status); + return noError ? responseTime : -1; + } + catch (Exception ex) + { + Utils.SaveLog(ex.Message, ex); + return -1; + } } catch (Exception ex) { diff --git a/v2rayN/v2rayN/Handler/StatisticsHandler.cs b/v2rayN/v2rayN/Handler/StatisticsHandler.cs index ab4d4a6a..bed9298b 100644 --- a/v2rayN/v2rayN/Handler/StatisticsHandler.cs +++ b/v2rayN/v2rayN/Handler/StatisticsHandler.cs @@ -20,15 +20,9 @@ namespace v2rayN.Handler Action> updateFunc_; - public bool Enable - { - get; set; - } + public bool Enable { get; set; } - public bool UpdateUI - { - get; set; - } + public bool UpdateUI { get; set; } public List Statistic { diff --git a/v2rayN/v2rayN/Handler/V2rayConfigHandler.cs b/v2rayN/v2rayN/Handler/V2rayConfigHandler.cs index 9ea93933..1296112a 100644 --- a/v2rayN/v2rayN/Handler/V2rayConfigHandler.cs +++ b/v2rayN/v2rayN/Handler/V2rayConfigHandler.cs @@ -195,15 +195,15 @@ namespace v2rayN.Handler switch (config.routingMode) { - case "0": + case 0: break; - case "1": + case 1: routingGeo("ip", "private", Global.directTag, ref v2rayConfig); break; - case "2": + case 2: routingGeo("", "cn", Global.directTag, ref v2rayConfig); break; - case "3": + case 3: routingGeo("ip", "private", Global.directTag, ref v2rayConfig); routingGeo("", "cn", Global.directTag, ref v2rayConfig); break; diff --git a/v2rayN/v2rayN/Handler/V2rayHandler.cs b/v2rayN/v2rayN/Handler/V2rayHandler.cs index e367bef2..6967eec5 100644 --- a/v2rayN/v2rayN/Handler/V2rayHandler.cs +++ b/v2rayN/v2rayN/Handler/V2rayHandler.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Text; +using System.Threading.Tasks; using v2rayN.Mode; namespace v2rayN.Handler @@ -38,21 +39,18 @@ namespace v2rayN.Handler /// /// 载入V2ray /// - public void LoadV2ray(Config config) + public Task LoadV2ray(Config config) { - if (Global.reloadV2ray) + return Task.Run(() => { + if (!Global.reloadV2ray) return; + string fileName = Utils.GetPath(v2rayConfigRes); - if (V2rayConfigHandler.GenerateClientConfig(config, fileName, false, out string msg) != 0) - { - ShowMsg(false, msg); - } - else - { - ShowMsg(true, msg); + bool bOk = V2rayConfigHandler.GenerateClientConfig(config, fileName, false, out string msg) == 0; + ShowMsg(bOk, msg); + if (bOk) V2rayRestart(); - } - } + }); } /// @@ -305,6 +303,7 @@ namespace v2rayN.Handler { try { + if (p.HasExited) return; p.CloseMainWindow(); p.WaitForExit(100); if (!p.HasExited) diff --git a/v2rayN/v2rayN/HttpProxyHandler/HttpProxyHandle.cs b/v2rayN/v2rayN/HttpProxyHandler/HttpProxyHandle.cs index 0236c5a8..142eca51 100644 --- a/v2rayN/v2rayN/HttpProxyHandler/HttpProxyHandle.cs +++ b/v2rayN/v2rayN/HttpProxyHandler/HttpProxyHandle.cs @@ -1,4 +1,5 @@ using System; +using System.Threading.Tasks; using v2rayN.Mode; namespace v2rayN.HttpProxyHandler @@ -148,33 +149,36 @@ namespace v2rayN.HttpProxyHandler /// /// /// - public static void RestartHttpAgent(Config config, bool forced) + public static Task RestartHttpAgent(Config config, bool forced) { - bool isRestart = false; - if (config.listenerType == ListenerType.noHttpProxy) - { - // 关闭http proxy时,直接返回 - return; - } - //强制重启或者socks端口变化 - if (forced) - { - isRestart = true; - } - else - { - int localPort = config.GetLocalPort(Global.InboundSocks); - if (localPort != Global.socksPort) + return Task.Run(() => + { + bool isRestart = false; + if (config.listenerType == ListenerType.noHttpProxy) + { + // 关闭http proxy时,直接返回 + return; + } + //强制重启或者socks端口变化 + if (forced) { isRestart = true; } - } - if (isRestart) - { - CloseHttpAgent(config); - StartHttpAgent(config); - } - Update(config, false); + else + { + int localPort = config.GetLocalPort(Global.InboundSocks); + if (localPort != Global.socksPort) + { + isRestart = true; + } + } + if (isRestart) + { + CloseHttpAgent(config); + StartHttpAgent(config); + } + Update(config, false); + }); } public static string GetPacUrl() diff --git a/v2rayN/v2rayN/HttpProxyHandler/PrivoxyHandler.cs b/v2rayN/v2rayN/HttpProxyHandler/PrivoxyHandler.cs index f738a318..771eb8a0 100644 --- a/v2rayN/v2rayN/HttpProxyHandler/PrivoxyHandler.cs +++ b/v2rayN/v2rayN/HttpProxyHandler/PrivoxyHandler.cs @@ -55,10 +55,7 @@ namespace v2rayN.HttpProxyHandler } } - public int RunningPort - { - get; set; - } + public int RunningPort { get; set; } public void Restart(int localPort, Config config) { @@ -141,6 +138,7 @@ namespace v2rayN.HttpProxyHandler { try { + if (p.HasExited) return; // someting, while the GUI app is exiting. p.CloseMainWindow(); p.WaitForExit(100); if (!p.HasExited) diff --git a/v2rayN/v2rayN/Mode/Config.cs b/v2rayN/v2rayN/Mode/Config.cs index 515114df..0003fe03 100644 --- a/v2rayN/v2rayN/Mode/Config.cs +++ b/v2rayN/v2rayN/Mode/Config.cs @@ -15,197 +15,127 @@ namespace v2rayN.Mode /// /// 本地监听 /// - public List inbound - { - get; set; - } + public List inbound { get; set; } /// /// 允许日志 /// - public bool logEnabled - { - get; set; - } + public bool logEnabled { get; set; } /// /// 日志等级 /// - public string loglevel - { - get; set; - } + public string loglevel { get; set; } /// /// 活动配置序号 /// - public int index - { - get; set; - } + public int index { get; set; } /// /// vmess服务器信息 /// - public List vmess - { - get; set; - } + public List vmess { get; set; } /// /// 允许Mux多路复用 /// - public bool muxEnabled - { - get; set; - } + public bool muxEnabled { get; set; } /// /// 域名解析策略 /// - public string domainStrategy - { - get; set; - } + public string domainStrategy { get; set; } /// /// 路由模式 /// - public string routingMode - { - get; set; - } + public int routingMode { get; set; } /// /// 用户自定义需代理的网址或ip /// - public List useragent - { - get; set; - } + public List useragent { get; set; } /// /// 用户自定义直连的网址或ip /// - public List userdirect - { - get; set; - } + public List userdirect { get; set; } /// /// 用户自定义阻止的网址或ip /// - public List userblock - { - get; set; - } + public List userblock { get; set; } /// /// KcpItem /// - public KcpItem kcpItem - { - get; set; - } + public KcpItem kcpItem { get; set; } /// /// 监听状态 /// - public ListenerType listenerType - { - get; set; - } + public ListenerType listenerType { get; set; } /// /// 自定义服务器下载测速url /// - public string speedTestUrl - { - get; set; - } + public string speedTestUrl { get; set; } /// /// 自定义“服务器真连接延迟”测试url /// - public string speedPingTestUrl - { - get; set; - } + public string speedPingTestUrl { get; set; } /// - /// 自定义GFWList url + /// 自定义GFWList url。空白则使用 Global.GFWLIST_URL /// - public string urlGFWList - { - get; set; - } + public string urlGFWList { get; set; } /// /// 允许来自局域网的连接 /// - public bool allowLANConn - { - get; set; - } + public bool allowLANConn { get; set; } /// /// 启用实时网速和流量统计 /// - public bool enableStatistics - { - get; set; - } + public bool enableStatistics { get; set; } /// /// 去重时优先保留较旧(顶部)节点 /// - public bool keepOlderDedupl - { - get; set; - } + public bool keepOlderDedupl { get; set; } + + /// + /// 服务器列表隔行着色 + /// + public bool interlaceColoring { get; set; } /// /// 视图刷新率 /// - public int statisticsFreshRate - { - get; set; - } + public int statisticsFreshRate { get; set; } /// /// 自定义远程DNS /// - public string remoteDNS - { - get; set; - } + public string remoteDNS { get; set; } /// /// 是否允许不安全连接 /// - public string defaultAllowInsecure - { - get; set; - } + public string defaultAllowInsecure { get; set; } /// /// 订阅 /// - public List subItem - { - get; set; - } + public List subItem { get; set; } /// /// UI /// - public UIItem uiItem - { - get; set; - } + public UIItem uiItem { get; set; } - public List userPacRule - { - get; set; - } + public List userPacRule { get; set; } #region 函数 @@ -459,125 +389,77 @@ namespace v2rayN.Mode /// /// 版本(现在=2) /// - public int configVersion - { - get; set; - } + public int configVersion { get; set; } /// /// 远程服务器地址 /// - public string address - { - get; set; - } + public string address { get; set; } /// /// 远程服务器端口 /// - public int port - { - get; set; - } + public int port { get; set; } /// /// 远程服务器ID /// - public string id - { - get; set; - } + public string id { get; set; } /// /// 远程服务器额外ID /// - public int alterId - { - get; set; - } + public int alterId { get; set; } /// /// 本地安全策略 /// - public string security - { - get; set; - } + public string security { get; set; } /// /// tcp,kcp,ws,h2,quic /// - public string network - { - get; set; - } + public string network { get; set; } /// /// 备注或别名 /// - public string remarks - { - get; set; - } + public string remarks { get; set; } /// /// 伪装类型 /// - public string headerType - { - get; set; - } + public string headerType { get; set; } /// /// 伪装的域名 /// - public string requestHost - { - get; set; - } + public string requestHost { get; set; } /// /// ws h2 path /// - public string path - { - get; set; - } + public string path { get; set; } /// /// 底层传输安全 /// - public string streamSecurity - { - get; set; - } + public string streamSecurity { get; set; } /// /// 是否允许不安全连接(用于客户端) /// - public string allowInsecure - { - get; set; - } + public string allowInsecure { get; set; } /// /// config type(1=normal,2=custom) /// - public int configType - { - get; set; - } + public int configType { get; set; } /// /// /// - public string testResult - { - get; set; - } + public string testResult { get; set; } /// /// SubItem id /// - public string subid - { - get; set; - } + public string subid { get; set; } } [Serializable] @@ -586,26 +468,17 @@ namespace v2rayN.Mode /// /// 本地监听端口 /// - public int localPort - { - get; set; - } + public int localPort { get; set; } /// /// 协议,默认为socks /// - public string protocol - { - get; set; - } + public string protocol { get; set; } /// /// 允许udp /// - public bool udpEnabled - { - get; set; - } + public bool udpEnabled { get; set; } /// /// 开启流量探测 @@ -619,52 +492,31 @@ namespace v2rayN.Mode /// /// /// - public int mtu - { - get; set; - } + public int mtu { get; set; } /// /// /// - public int tti - { - get; set; - } + public int tti { get; set; } /// /// /// - public int uplinkCapacity - { - get; set; - } + public int uplinkCapacity { get; set; } /// /// /// - public int downlinkCapacity - { - get; set; - } + public int downlinkCapacity { get; set; } /// /// /// - public bool congestion - { - get; set; - } + public bool congestion { get; set; } /// /// /// - public int readBufferSize - { - get; set; - } + public int readBufferSize { get; set; } /// /// /// - public int writeBufferSize - { - get; set; - } + public int writeBufferSize { get; set; } } @@ -674,27 +526,15 @@ namespace v2rayN.Mode /// /// /// - public string id - { - get; set; - } - + public string id { get; set; } /// /// 备注 /// - public string remarks - { - get; set; - } - + public string remarks { get; set; } /// /// url /// - public string url - { - get; set; - } - + public string url { get; set; } /// /// enable /// @@ -704,16 +544,8 @@ namespace v2rayN.Mode [Serializable] public class UIItem { - - - public System.Drawing.Size mainSize - { - get; set; - } - - public Dictionary mainLvColWidth - { - get; set; - } + public System.Drawing.Size mainSize { get; set; } + public Dictionary mainLvColWidth { get; set; } + public List mainLvColLayout { get; set; } } } diff --git a/v2rayN/v2rayN/Mode/ServerStatistics.cs b/v2rayN/v2rayN/Mode/ServerStatistics.cs index e4a42a5a..f6c655d2 100644 --- a/v2rayN/v2rayN/Mode/ServerStatistics.cs +++ b/v2rayN/v2rayN/Mode/ServerStatistics.cs @@ -6,38 +6,17 @@ namespace v2rayN.Mode [Serializable] public class ServerStatistics { - public List server - { - get; set; - } + public List server { get; set; } } [Serializable] public class ServerStatItem { - public string itemId - { - get; set; - } - public ulong totalUp - { - get; set; - } - public ulong totalDown - { - get; set; - } - public ulong todayUp - { - get; set; - } - public ulong todayDown - { - get; set; - } - public long dateNow - { - get; set; - } + public string itemId { get; set; } + public ulong totalUp { get; set; } + public ulong totalDown { get; set; } + public ulong todayUp { get; set; } + public ulong todayDown { get; set; } + public long dateNow { get; set; } } } diff --git a/v2rayN/v2rayN/Mode/VmessQRCode.cs b/v2rayN/v2rayN/Mode/VmessQRCode.cs index 0a9cc8ab..4c5cb520 100644 --- a/v2rayN/v2rayN/Mode/VmessQRCode.cs +++ b/v2rayN/v2rayN/Mode/VmessQRCode.cs @@ -8,46 +8,46 @@ namespace v2rayN.Mode /// /// 版本 /// - public string v { get; set; } = string.Empty; + public string v { get; set; } /// /// 备注 /// - public string ps { get; set; } = string.Empty; + public string ps { get; set; } /// /// 远程服务器地址 /// - public string add { get; set; } = string.Empty; + public string add { get; set; } /// /// 远程服务器端口 /// - public string port { get; set; } = string.Empty; + public string port { get; set; } /// /// 远程服务器ID /// - public string id { get; set; } = string.Empty; + public string id { get; set; } /// /// 远程服务器额外ID /// - public string aid { get; set; } = string.Empty; + public string aid { get; set; } /// /// 传输协议tcp,kcp,ws /// - public string net { get; set; } = string.Empty; + public string net { get; set; } /// /// 伪装类型 /// - public string type { get; set; } = string.Empty; + public string type { get; set; } /// /// 伪装的域名 /// - public string host { get; set; } = string.Empty; + public string host { get; set; } /// /// path /// - public string path { get; set; } = string.Empty; + public string path { get; set; } /// /// 底层传输安全 /// - public string tls { get; set; } = string.Empty; + public string tls { get; set; } } } diff --git a/v2rayN/v2rayN/Properties/Resources.Designer.cs b/v2rayN/v2rayN/Properties/Resources.Designer.cs index f21638d7..1bffa5a1 100644 --- a/v2rayN/v2rayN/Properties/Resources.Designer.cs +++ b/v2rayN/v2rayN/Properties/Resources.Designer.cs @@ -19,7 +19,7 @@ namespace v2rayN.Properties { // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen // (以 /str 作为命令选项),或重新生成 VS 项目。 - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { diff --git a/v2rayN/v2rayN/Properties/Resources.resx b/v2rayN/v2rayN/Properties/Resources.resx index 706454a0..7cd3b257 100644 --- a/v2rayN/v2rayN/Properties/Resources.resx +++ b/v2rayN/v2rayN/Properties/Resources.resx @@ -118,55 +118,55 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - ..\resources\privoxy.exe.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - ..\Resources\about.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\option.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\restart.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\resources\sysproxy.exe.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - ..\resources\sub.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\server.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\notify.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\resources\checkupdate.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\resources\promotion.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\resources\sysproxy64.exe.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - ..\resources\privoxy_conf.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;gb2312 - - - ..\Resources\minimize.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\pac.txt.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - ..\resources\help.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\abp.js.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ..\resources\checkupdate.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\resources\help.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\minimize.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\notify.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\option.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\pac.txt.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\resources\privoxy_conf.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;gb2312 + + + ..\resources\privoxy.exe.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\resources\promotion.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\restart.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\server.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\resources\share.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\resources\sub.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\resources\sysproxy.exe.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\resources\sysproxy64.exe.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + \ No newline at end of file diff --git a/v2rayN/v2rayN/Resx/ResUI.Designer.cs b/v2rayN/v2rayN/Resx/ResUI.Designer.cs index b5b956d6..04d27e9e 100644 --- a/v2rayN/v2rayN/Resx/ResUI.Designer.cs +++ b/v2rayN/v2rayN/Resx/ResUI.Designer.cs @@ -484,7 +484,7 @@ namespace v2rayN.Resx { } /// - /// 查找类似 Simplify PAC Success 的本地化字符串。 + /// 查找类似 Write PAC success 的本地化字符串。 /// internal static string MsgSimplifyPAC { get { @@ -690,6 +690,42 @@ namespace v2rayN.Resx { } } + /// + /// 查找类似 Bypass CN 的本地化字符串。 + /// + internal static string RoutingModeBypassCN { + get { + return ResourceManager.GetString("RoutingModeBypassCN", resourceCulture); + } + } + + /// + /// 查找类似 Bypass LAN 的本地化字符串。 + /// + internal static string RoutingModeBypassLAN { + get { + return ResourceManager.GetString("RoutingModeBypassLAN", resourceCulture); + } + } + + /// + /// 查找类似 Bypass LAN+CN 的本地化字符串。 + /// + internal static string RoutingModeBypassLANCN { + get { + return ResourceManager.GetString("RoutingModeBypassLANCN", resourceCulture); + } + } + + /// + /// 查找类似 Global 的本地化字符串。 + /// + internal static string RoutingModeGlobal { + get { + return ResourceManager.GetString("RoutingModeGlobal", resourceCulture); + } + } + /// /// 查找类似 The client configuration file is saved at: {0} 的本地化字符串。 /// @@ -708,6 +744,15 @@ namespace v2rayN.Resx { } } + /// + /// 查找类似 ... 的本地化字符串。 + /// + internal static string ServerLatencyChecking { + get { + return ResourceManager.GetString("ServerLatencyChecking", resourceCulture); + } + } + /// /// 查找类似 SlowFresh 的本地化字符串。 /// @@ -789,5 +834,14 @@ namespace v2rayN.Resx { return ResourceManager.GetString("TestMeOutput", resourceCulture); } } + + /// + /// 查找类似 Latency: {0} 的本地化字符串。 + /// + internal static string toolSslServerLatency { + get { + return ResourceManager.GetString("toolSslServerLatency", resourceCulture); + } + } } } diff --git a/v2rayN/v2rayN/Resx/ResUI.resx b/v2rayN/v2rayN/Resx/ResUI.resx index 50d37abe..fc9d5ab3 100644 --- a/v2rayN/v2rayN/Resx/ResUI.resx +++ b/v2rayN/v2rayN/Resx/ResUI.resx @@ -259,7 +259,7 @@ Resolve {0} successfully - Simplify PAC Success + Write PAC success Start getting subscriptions @@ -327,12 +327,27 @@ Are you sure to remove the server? + + Bypass CN + + + Bypass LAN + + + Bypass LAN+CN + + + Global + The client configuration file is saved at: {0} The server configuration file is saved at: {0} + + ... + SlowFresh @@ -361,4 +376,7 @@ The ping of current service: {0} + + Latency: {0} + \ No newline at end of file diff --git a/v2rayN/v2rayN/Resx/ResUI.zh-Hans.resx b/v2rayN/v2rayN/Resx/ResUI.zh-Hans.resx index 4b312497..97d4f0df 100644 --- a/v2rayN/v2rayN/Resx/ResUI.zh-Hans.resx +++ b/v2rayN/v2rayN/Resx/ResUI.zh-Hans.resx @@ -259,7 +259,7 @@ 解析{0}成功 - 简化PAC成功 + 成功写入PAC 开始获取订阅内容 @@ -274,13 +274,13 @@ 订阅内容解码失败(非BASE64码) - 正在解压...... + 正在解压... - 更新订阅结束 + 订阅内容已更新 - 更新订阅开始 + 开始更新订阅 更新V2rayCore成功 @@ -327,12 +327,27 @@ 是否确定移除服务器? + + 绕过大陆 + + + 绕过局域网 + + + 绕过局域网和大陆 + + + 路由: 全局 + 客户端配置文件保存在:{0} 服务端配置文件保存在:{0} + + ... + @@ -361,4 +376,7 @@ 当前服务的真连接延迟: {0} + + 延迟: {0} + \ No newline at end of file diff --git a/v2rayN/v2rayN/Tool/Utils.cs b/v2rayN/v2rayN/Tool/Utils.cs index 09c023de..7ca0dd12 100644 --- a/v2rayN/v2rayN/Tool/Utils.cs +++ b/v2rayN/v2rayN/Tool/Utils.cs @@ -168,7 +168,7 @@ namespace v2rayN } } /// - /// 逗号分隔的字符串,转List + /// 换行或逗号分隔的字符串,转List /// /// /// @@ -176,7 +176,7 @@ namespace v2rayN { try { - str = str.Replace(Environment.NewLine, ""); + str = str.Replace("\r", ",").Replace("\n", ","); // 用户复制的可能是\r、\n或\r\n return new List(str.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries)); } catch @@ -318,6 +318,10 @@ namespace v2rayN return $"{string.Format("{0:f1}", result)} {unit}"; } + public static int ServerVmIndexof(List source, Mode.VmessItem findIt) + { + return source.IndexOf(findIt); + } public static void DedupServerList(List source, out List result, bool keepOlder) { List list = new List(); diff --git a/v2rayN/v2rayN/v2rayN.csproj b/v2rayN/v2rayN/v2rayN.csproj index 65075779..c0ebf9e1 100644 --- a/v2rayN/v2rayN/v2rayN.csproj +++ b/v2rayN/v2rayN/v2rayN.csproj @@ -97,6 +97,7 @@ + Form diff --git a/v2rayN/v2rayN/v2rayN.ico b/v2rayN/v2rayN/v2rayN.ico index 2a2f85a9..4b988da4 100644 Binary files a/v2rayN/v2rayN/v2rayN.ico and b/v2rayN/v2rayN/v2rayN.ico differ diff --git a/v2rayN/v2rayUpgrade/MainForm.Designer.cs b/v2rayN/v2rayUpgrade/MainForm.Designer.cs index b9f9ad18..9bba08f1 100644 --- a/v2rayN/v2rayUpgrade/MainForm.Designer.cs +++ b/v2rayN/v2rayUpgrade/MainForm.Designer.cs @@ -60,7 +60,6 @@ // label1 // this.label1.AutoSize = true; - this.label1.Font = new System.Drawing.Font("宋体", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label1.Location = new System.Drawing.Point(79, 64); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(205, 15); @@ -70,7 +69,6 @@ // label2 // this.label2.AutoSize = true; - this.label2.Font = new System.Drawing.Font("宋体", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label2.Location = new System.Drawing.Point(79, 37); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(471, 15);