Revert "merge 12 commits behind 2dust:master"

This reverts commit 4548443761.
This commit is contained in:
JaredDC 2021-10-12 15:52:07 +08:00
parent 4548443761
commit 125331181f
34 changed files with 2501 additions and 2697 deletions

View file

@ -29,5 +29,5 @@ Click the **BUTTON** below to **download** the latest binary file
- 不要担心,你的配置会保存,比如订阅,选择,路由规则. - 不要担心,你的配置会保存,比如订阅,选择,路由规则.
### Requirements ### Requirements
- Microsoft [.NET Framework 4.8](https://docs.microsoft.com/zh-cn/dotnet/framework/install/guide-for-developers) - Microsoft [.NET Framework 4.6](https://docs.microsoft.com/zh-cn/dotnet/framework/install/guide-for-developers) or higher
- Project V core [https://github.com/v2fly/v2ray-core/releases](https://github.com/v2fly/v2ray-core/releases) - Project V core [https://github.com/v2fly/v2ray-core/releases](https://github.com/v2fly/v2ray-core/releases)

View file

@ -83,6 +83,7 @@
this.toolSslHttpPortLab = new System.Windows.Forms.ToolStripStatusLabel(); this.toolSslHttpPortLab = new System.Windows.Forms.ToolStripStatusLabel();
this.toolSslHttpPort = new System.Windows.Forms.ToolStripStatusLabel(); this.toolSslHttpPort = new System.Windows.Forms.ToolStripStatusLabel();
this.toolSslBlank2 = new System.Windows.Forms.ToolStripStatusLabel(); this.toolSslBlank2 = new System.Windows.Forms.ToolStripStatusLabel();
this.toolSslBlank3 = new System.Windows.Forms.ToolStripStatusLabel();
this.toolSslServerSpeed = new System.Windows.Forms.ToolStripStatusLabel(); this.toolSslServerSpeed = new System.Windows.Forms.ToolStripStatusLabel();
this.toolSslBlank4 = new System.Windows.Forms.ToolStripStatusLabel(); this.toolSslBlank4 = new System.Windows.Forms.ToolStripStatusLabel();
this.notifyMain = new System.Windows.Forms.NotifyIcon(this.components); this.notifyMain = new System.Windows.Forms.NotifyIcon(this.components);
@ -158,17 +159,19 @@
// //
// scMain.Panel1 // scMain.Panel1
// //
resources.ApplyResources(this.scMain.Panel1, "scMain.Panel1");
this.scMain.Panel1.Controls.Add(this.lvServers); this.scMain.Panel1.Controls.Add(this.lvServers);
// //
// scMain.Panel2 // scMain.Panel2
// //
resources.ApplyResources(this.scMain.Panel2, "scMain.Panel2");
this.scMain.Panel2.Controls.Add(this.qrCodeControl); this.scMain.Panel2.Controls.Add(this.qrCodeControl);
this.scMain.TabStop = false; this.scMain.TabStop = false;
// //
// lvServers // lvServers
// //
this.lvServers.ContextMenuStrip = this.cmsLv;
resources.ApplyResources(this.lvServers, "lvServers"); resources.ApplyResources(this.lvServers, "lvServers");
this.lvServers.ContextMenuStrip = this.cmsLv;
this.lvServers.FullRowSelect = true; this.lvServers.FullRowSelect = true;
this.lvServers.GridLines = true; this.lvServers.GridLines = true;
this.lvServers.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; this.lvServers.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
@ -187,6 +190,7 @@
// //
// cmsLv // cmsLv
// //
resources.ApplyResources(this.cmsLv, "cmsLv");
this.cmsLv.ImageScalingSize = new System.Drawing.Size(20, 20); this.cmsLv.ImageScalingSize = new System.Drawing.Size(20, 20);
this.cmsLv.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.cmsLv.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuAddVmessServer, this.menuAddVmessServer,
@ -221,195 +225,195 @@
this.menuExport2ShareUrl, this.menuExport2ShareUrl,
this.menuExport2SubContent}); this.menuExport2SubContent});
this.cmsLv.Name = "cmsLv"; this.cmsLv.Name = "cmsLv";
resources.ApplyResources(this.cmsLv, "cmsLv"); this.cmsLv.OwnerItem = this.tsbServer;
// //
// menuAddVmessServer // menuAddVmessServer
// //
this.menuAddVmessServer.Name = "menuAddVmessServer";
resources.ApplyResources(this.menuAddVmessServer, "menuAddVmessServer"); resources.ApplyResources(this.menuAddVmessServer, "menuAddVmessServer");
this.menuAddVmessServer.Name = "menuAddVmessServer";
this.menuAddVmessServer.Click += new System.EventHandler(this.menuAddVmessServer_Click); this.menuAddVmessServer.Click += new System.EventHandler(this.menuAddVmessServer_Click);
// //
// menuAddVlessServer // menuAddVlessServer
// //
this.menuAddVlessServer.Name = "menuAddVlessServer";
resources.ApplyResources(this.menuAddVlessServer, "menuAddVlessServer"); resources.ApplyResources(this.menuAddVlessServer, "menuAddVlessServer");
this.menuAddVlessServer.Name = "menuAddVlessServer";
this.menuAddVlessServer.Click += new System.EventHandler(this.menuAddVlessServer_Click); this.menuAddVlessServer.Click += new System.EventHandler(this.menuAddVlessServer_Click);
// //
// menuAddShadowsocksServer // menuAddShadowsocksServer
// //
this.menuAddShadowsocksServer.Name = "menuAddShadowsocksServer";
resources.ApplyResources(this.menuAddShadowsocksServer, "menuAddShadowsocksServer"); resources.ApplyResources(this.menuAddShadowsocksServer, "menuAddShadowsocksServer");
this.menuAddShadowsocksServer.Name = "menuAddShadowsocksServer";
this.menuAddShadowsocksServer.Click += new System.EventHandler(this.menuAddShadowsocksServer_Click); this.menuAddShadowsocksServer.Click += new System.EventHandler(this.menuAddShadowsocksServer_Click);
// //
// menuAddSocksServer // menuAddSocksServer
// //
this.menuAddSocksServer.Name = "menuAddSocksServer";
resources.ApplyResources(this.menuAddSocksServer, "menuAddSocksServer"); resources.ApplyResources(this.menuAddSocksServer, "menuAddSocksServer");
this.menuAddSocksServer.Name = "menuAddSocksServer";
this.menuAddSocksServer.Click += new System.EventHandler(this.menuAddSocksServer_Click); this.menuAddSocksServer.Click += new System.EventHandler(this.menuAddSocksServer_Click);
// //
// menuAddTrojanServer // menuAddTrojanServer
// //
this.menuAddTrojanServer.Name = "menuAddTrojanServer";
resources.ApplyResources(this.menuAddTrojanServer, "menuAddTrojanServer"); resources.ApplyResources(this.menuAddTrojanServer, "menuAddTrojanServer");
this.menuAddTrojanServer.Name = "menuAddTrojanServer";
this.menuAddTrojanServer.Click += new System.EventHandler(this.menuAddTrojanServer_Click); this.menuAddTrojanServer.Click += new System.EventHandler(this.menuAddTrojanServer_Click);
// //
// menuAddCustomServer // menuAddCustomServer
// //
this.menuAddCustomServer.Name = "menuAddCustomServer";
resources.ApplyResources(this.menuAddCustomServer, "menuAddCustomServer"); resources.ApplyResources(this.menuAddCustomServer, "menuAddCustomServer");
this.menuAddCustomServer.Name = "menuAddCustomServer";
this.menuAddCustomServer.Click += new System.EventHandler(this.menuAddCustomServer_Click); this.menuAddCustomServer.Click += new System.EventHandler(this.menuAddCustomServer_Click);
// //
// menuAddServers // menuAddServers
// //
this.menuAddServers.Name = "menuAddServers";
resources.ApplyResources(this.menuAddServers, "menuAddServers"); resources.ApplyResources(this.menuAddServers, "menuAddServers");
this.menuAddServers.Name = "menuAddServers";
this.menuAddServers.Click += new System.EventHandler(this.menuAddServers_Click); this.menuAddServers.Click += new System.EventHandler(this.menuAddServers_Click);
// //
// menuScanScreen // menuScanScreen
// //
this.menuScanScreen.Name = "menuScanScreen";
resources.ApplyResources(this.menuScanScreen, "menuScanScreen"); resources.ApplyResources(this.menuScanScreen, "menuScanScreen");
this.menuScanScreen.Name = "menuScanScreen";
this.menuScanScreen.Click += new System.EventHandler(this.menuScanScreen_Click); this.menuScanScreen.Click += new System.EventHandler(this.menuScanScreen_Click);
// //
// toolStripSeparator1 // toolStripSeparator1
// //
this.toolStripSeparator1.Name = "toolStripSeparator1";
resources.ApplyResources(this.toolStripSeparator1, "toolStripSeparator1"); resources.ApplyResources(this.toolStripSeparator1, "toolStripSeparator1");
this.toolStripSeparator1.Name = "toolStripSeparator1";
// //
// menuRemoveServer // menuRemoveServer
// //
this.menuRemoveServer.Name = "menuRemoveServer";
resources.ApplyResources(this.menuRemoveServer, "menuRemoveServer"); resources.ApplyResources(this.menuRemoveServer, "menuRemoveServer");
this.menuRemoveServer.Name = "menuRemoveServer";
this.menuRemoveServer.Click += new System.EventHandler(this.menuRemoveServer_Click); this.menuRemoveServer.Click += new System.EventHandler(this.menuRemoveServer_Click);
// //
// menuRemoveDuplicateServer // menuRemoveDuplicateServer
// //
this.menuRemoveDuplicateServer.Name = "menuRemoveDuplicateServer";
resources.ApplyResources(this.menuRemoveDuplicateServer, "menuRemoveDuplicateServer"); resources.ApplyResources(this.menuRemoveDuplicateServer, "menuRemoveDuplicateServer");
this.menuRemoveDuplicateServer.Name = "menuRemoveDuplicateServer";
this.menuRemoveDuplicateServer.Click += new System.EventHandler(this.menuRemoveDuplicateServer_Click); this.menuRemoveDuplicateServer.Click += new System.EventHandler(this.menuRemoveDuplicateServer_Click);
// //
// menuCopyServer // menuCopyServer
// //
this.menuCopyServer.Name = "menuCopyServer";
resources.ApplyResources(this.menuCopyServer, "menuCopyServer"); resources.ApplyResources(this.menuCopyServer, "menuCopyServer");
this.menuCopyServer.Name = "menuCopyServer";
this.menuCopyServer.Click += new System.EventHandler(this.menuCopyServer_Click); this.menuCopyServer.Click += new System.EventHandler(this.menuCopyServer_Click);
// //
// menuSetDefaultServer // menuSetDefaultServer
// //
this.menuSetDefaultServer.Name = "menuSetDefaultServer";
resources.ApplyResources(this.menuSetDefaultServer, "menuSetDefaultServer"); resources.ApplyResources(this.menuSetDefaultServer, "menuSetDefaultServer");
this.menuSetDefaultServer.Name = "menuSetDefaultServer";
this.menuSetDefaultServer.Click += new System.EventHandler(this.menuSetDefaultServer_Click); this.menuSetDefaultServer.Click += new System.EventHandler(this.menuSetDefaultServer_Click);
// //
// toolStripSeparator3 // toolStripSeparator3
// //
this.toolStripSeparator3.Name = "toolStripSeparator3";
resources.ApplyResources(this.toolStripSeparator3, "toolStripSeparator3"); resources.ApplyResources(this.toolStripSeparator3, "toolStripSeparator3");
this.toolStripSeparator3.Name = "toolStripSeparator3";
// //
// menuMoveTop // menuMoveTop
// //
this.menuMoveTop.Name = "menuMoveTop";
resources.ApplyResources(this.menuMoveTop, "menuMoveTop"); resources.ApplyResources(this.menuMoveTop, "menuMoveTop");
this.menuMoveTop.Name = "menuMoveTop";
this.menuMoveTop.Click += new System.EventHandler(this.menuMoveTop_Click); this.menuMoveTop.Click += new System.EventHandler(this.menuMoveTop_Click);
// //
// menuMoveUp // menuMoveUp
// //
this.menuMoveUp.Name = "menuMoveUp";
resources.ApplyResources(this.menuMoveUp, "menuMoveUp"); resources.ApplyResources(this.menuMoveUp, "menuMoveUp");
this.menuMoveUp.Name = "menuMoveUp";
this.menuMoveUp.Click += new System.EventHandler(this.menuMoveUp_Click); this.menuMoveUp.Click += new System.EventHandler(this.menuMoveUp_Click);
// //
// menuMoveDown // menuMoveDown
// //
this.menuMoveDown.Name = "menuMoveDown";
resources.ApplyResources(this.menuMoveDown, "menuMoveDown"); resources.ApplyResources(this.menuMoveDown, "menuMoveDown");
this.menuMoveDown.Name = "menuMoveDown";
this.menuMoveDown.Click += new System.EventHandler(this.menuMoveDown_Click); this.menuMoveDown.Click += new System.EventHandler(this.menuMoveDown_Click);
// //
// menuMoveBottom // menuMoveBottom
// //
this.menuMoveBottom.Name = "menuMoveBottom";
resources.ApplyResources(this.menuMoveBottom, "menuMoveBottom"); resources.ApplyResources(this.menuMoveBottom, "menuMoveBottom");
this.menuMoveBottom.Name = "menuMoveBottom";
this.menuMoveBottom.Click += new System.EventHandler(this.menuMoveBottom_Click); this.menuMoveBottom.Click += new System.EventHandler(this.menuMoveBottom_Click);
// //
// menuSelectAll // menuSelectAll
// //
this.menuSelectAll.Name = "menuSelectAll";
resources.ApplyResources(this.menuSelectAll, "menuSelectAll"); resources.ApplyResources(this.menuSelectAll, "menuSelectAll");
this.menuSelectAll.Name = "menuSelectAll";
this.menuSelectAll.Click += new System.EventHandler(this.menuSelectAll_Click); this.menuSelectAll.Click += new System.EventHandler(this.menuSelectAll_Click);
// //
// toolStripSeparator9 // toolStripSeparator9
// //
this.toolStripSeparator9.Name = "toolStripSeparator9";
resources.ApplyResources(this.toolStripSeparator9, "toolStripSeparator9"); resources.ApplyResources(this.toolStripSeparator9, "toolStripSeparator9");
this.toolStripSeparator9.Name = "toolStripSeparator9";
// //
// menuPingServer // menuPingServer
// //
this.menuPingServer.Name = "menuPingServer";
resources.ApplyResources(this.menuPingServer, "menuPingServer"); resources.ApplyResources(this.menuPingServer, "menuPingServer");
this.menuPingServer.Name = "menuPingServer";
this.menuPingServer.Click += new System.EventHandler(this.menuPingServer_Click); this.menuPingServer.Click += new System.EventHandler(this.menuPingServer_Click);
// //
// menuTcpingServer // menuTcpingServer
// //
this.menuTcpingServer.Name = "menuTcpingServer";
resources.ApplyResources(this.menuTcpingServer, "menuTcpingServer"); resources.ApplyResources(this.menuTcpingServer, "menuTcpingServer");
this.menuTcpingServer.Name = "menuTcpingServer";
this.menuTcpingServer.Click += new System.EventHandler(this.menuTcpingServer_Click); this.menuTcpingServer.Click += new System.EventHandler(this.menuTcpingServer_Click);
// //
// menuRealPingServer // menuRealPingServer
// //
this.menuRealPingServer.Name = "menuRealPingServer";
resources.ApplyResources(this.menuRealPingServer, "menuRealPingServer"); resources.ApplyResources(this.menuRealPingServer, "menuRealPingServer");
this.menuRealPingServer.Name = "menuRealPingServer";
this.menuRealPingServer.Click += new System.EventHandler(this.menuRealPingServer_Click); this.menuRealPingServer.Click += new System.EventHandler(this.menuRealPingServer_Click);
// //
// menuSpeedServer // menuSpeedServer
// //
this.menuSpeedServer.Name = "menuSpeedServer";
resources.ApplyResources(this.menuSpeedServer, "menuSpeedServer"); resources.ApplyResources(this.menuSpeedServer, "menuSpeedServer");
this.menuSpeedServer.Name = "menuSpeedServer";
this.menuSpeedServer.Click += new System.EventHandler(this.menuSpeedServer_Click); this.menuSpeedServer.Click += new System.EventHandler(this.menuSpeedServer_Click);
// //
// tsbTestMe // tsbTestMe
// //
this.tsbTestMe.Name = "tsbTestMe";
resources.ApplyResources(this.tsbTestMe, "tsbTestMe"); resources.ApplyResources(this.tsbTestMe, "tsbTestMe");
this.tsbTestMe.Name = "tsbTestMe";
this.tsbTestMe.Click += new System.EventHandler(this.tsbTestMe_Click); this.tsbTestMe.Click += new System.EventHandler(this.tsbTestMe_Click);
// //
// menuClearServerStatistics // menuClearServerStatistics
// //
this.menuClearServerStatistics.Name = "menuClearServerStatistics";
resources.ApplyResources(this.menuClearServerStatistics, "menuClearServerStatistics"); resources.ApplyResources(this.menuClearServerStatistics, "menuClearServerStatistics");
this.menuClearServerStatistics.Name = "menuClearServerStatistics";
this.menuClearServerStatistics.Click += new System.EventHandler(this.menuClearStatistic_Click); this.menuClearServerStatistics.Click += new System.EventHandler(this.menuClearStatistic_Click);
// //
// toolStripSeparator6 // toolStripSeparator6
// //
this.toolStripSeparator6.Name = "toolStripSeparator6";
resources.ApplyResources(this.toolStripSeparator6, "toolStripSeparator6"); resources.ApplyResources(this.toolStripSeparator6, "toolStripSeparator6");
this.toolStripSeparator6.Name = "toolStripSeparator6";
// //
// menuExport2ClientConfig // menuExport2ClientConfig
// //
this.menuExport2ClientConfig.Name = "menuExport2ClientConfig";
resources.ApplyResources(this.menuExport2ClientConfig, "menuExport2ClientConfig"); resources.ApplyResources(this.menuExport2ClientConfig, "menuExport2ClientConfig");
this.menuExport2ClientConfig.Name = "menuExport2ClientConfig";
this.menuExport2ClientConfig.Click += new System.EventHandler(this.menuExport2ClientConfig_Click); this.menuExport2ClientConfig.Click += new System.EventHandler(this.menuExport2ClientConfig_Click);
// //
// menuExport2ServerConfig // menuExport2ServerConfig
// //
this.menuExport2ServerConfig.Name = "menuExport2ServerConfig";
resources.ApplyResources(this.menuExport2ServerConfig, "menuExport2ServerConfig"); resources.ApplyResources(this.menuExport2ServerConfig, "menuExport2ServerConfig");
this.menuExport2ServerConfig.Name = "menuExport2ServerConfig";
this.menuExport2ServerConfig.Click += new System.EventHandler(this.menuExport2ServerConfig_Click); this.menuExport2ServerConfig.Click += new System.EventHandler(this.menuExport2ServerConfig_Click);
// //
// menuExport2ShareUrl // menuExport2ShareUrl
// //
this.menuExport2ShareUrl.Name = "menuExport2ShareUrl";
resources.ApplyResources(this.menuExport2ShareUrl, "menuExport2ShareUrl"); resources.ApplyResources(this.menuExport2ShareUrl, "menuExport2ShareUrl");
this.menuExport2ShareUrl.Name = "menuExport2ShareUrl";
this.menuExport2ShareUrl.Click += new System.EventHandler(this.menuExport2ShareUrl_Click); this.menuExport2ShareUrl.Click += new System.EventHandler(this.menuExport2ShareUrl_Click);
// //
// menuExport2SubContent // menuExport2SubContent
// //
this.menuExport2SubContent.Name = "menuExport2SubContent";
resources.ApplyResources(this.menuExport2SubContent, "menuExport2SubContent"); resources.ApplyResources(this.menuExport2SubContent, "menuExport2SubContent");
this.menuExport2SubContent.Name = "menuExport2SubContent";
this.menuExport2SubContent.Click += new System.EventHandler(this.menuExport2SubContent_Click); this.menuExport2SubContent.Click += new System.EventHandler(this.menuExport2SubContent_Click);
// //
// tsbServer // tsbServer
// //
resources.ApplyResources(this.tsbServer, "tsbServer");
this.tsbServer.DropDown = this.cmsLv; this.tsbServer.DropDown = this.cmsLv;
this.tsbServer.Image = global::v2rayN.Properties.Resources.server; this.tsbServer.Image = global::v2rayN.Properties.Resources.server;
resources.ApplyResources(this.tsbServer, "tsbServer");
this.tsbServer.Name = "tsbServer"; this.tsbServer.Name = "tsbServer";
// //
// qrCodeControl // qrCodeControl
@ -424,33 +428,35 @@
// //
// splitContainer1.Panel1 // splitContainer1.Panel1
// //
resources.ApplyResources(this.splitContainer1.Panel1, "splitContainer1.Panel1");
this.splitContainer1.Panel1.Controls.Add(this.groupBox1); this.splitContainer1.Panel1.Controls.Add(this.groupBox1);
// //
// splitContainer1.Panel2 // splitContainer1.Panel2
// //
resources.ApplyResources(this.splitContainer1.Panel2, "splitContainer1.Panel2");
this.splitContainer1.Panel2.Controls.Add(this.gbMsgTitle); this.splitContainer1.Panel2.Controls.Add(this.gbMsgTitle);
// //
// groupBox1 // groupBox1
// //
this.groupBox1.Controls.Add(this.scMain);
resources.ApplyResources(this.groupBox1, "groupBox1"); resources.ApplyResources(this.groupBox1, "groupBox1");
this.groupBox1.Controls.Add(this.scMain);
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
// //
// gbMsgTitle // gbMsgTitle
// //
resources.ApplyResources(this.gbMsgTitle, "gbMsgTitle");
this.gbMsgTitle.Controls.Add(this.txtMsgBox); this.gbMsgTitle.Controls.Add(this.txtMsgBox);
this.gbMsgTitle.Controls.Add(this.ssMain); this.gbMsgTitle.Controls.Add(this.ssMain);
resources.ApplyResources(this.gbMsgTitle, "gbMsgTitle");
this.gbMsgTitle.Name = "gbMsgTitle"; this.gbMsgTitle.Name = "gbMsgTitle";
this.gbMsgTitle.TabStop = false; this.gbMsgTitle.TabStop = false;
// //
// txtMsgBox // txtMsgBox
// //
resources.ApplyResources(this.txtMsgBox, "txtMsgBox");
this.txtMsgBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(49)))), ((int)(((byte)(52))))); this.txtMsgBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(49)))), ((int)(((byte)(52)))));
this.txtMsgBox.BorderStyle = System.Windows.Forms.BorderStyle.None; this.txtMsgBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.txtMsgBox.ContextMenuStrip = this.cmsMsgBox; this.txtMsgBox.ContextMenuStrip = this.cmsMsgBox;
resources.ApplyResources(this.txtMsgBox, "txtMsgBox");
this.txtMsgBox.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(226)))), ((int)(((byte)(228))))); this.txtMsgBox.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(226)))), ((int)(((byte)(228)))));
this.txtMsgBox.Name = "txtMsgBox"; this.txtMsgBox.Name = "txtMsgBox";
this.txtMsgBox.ReadOnly = true; this.txtMsgBox.ReadOnly = true;
@ -458,6 +464,7 @@
// //
// cmsMsgBox // cmsMsgBox
// //
resources.ApplyResources(this.cmsMsgBox, "cmsMsgBox");
this.cmsMsgBox.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.cmsMsgBox.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuMsgBoxSelectAll, this.menuMsgBoxSelectAll,
this.menuMsgBoxCopy, this.menuMsgBoxCopy,
@ -465,40 +472,40 @@
this.menuMsgBoxAddRoutingRule, this.menuMsgBoxAddRoutingRule,
this.menuMsgBoxFilter}); this.menuMsgBoxFilter});
this.cmsMsgBox.Name = "cmsMsgBox"; this.cmsMsgBox.Name = "cmsMsgBox";
resources.ApplyResources(this.cmsMsgBox, "cmsMsgBox");
// //
// menuMsgBoxSelectAll // menuMsgBoxSelectAll
// //
this.menuMsgBoxSelectAll.Name = "menuMsgBoxSelectAll";
resources.ApplyResources(this.menuMsgBoxSelectAll, "menuMsgBoxSelectAll"); resources.ApplyResources(this.menuMsgBoxSelectAll, "menuMsgBoxSelectAll");
this.menuMsgBoxSelectAll.Name = "menuMsgBoxSelectAll";
this.menuMsgBoxSelectAll.Click += new System.EventHandler(this.menuMsgBoxSelectAll_Click); this.menuMsgBoxSelectAll.Click += new System.EventHandler(this.menuMsgBoxSelectAll_Click);
// //
// menuMsgBoxCopy // menuMsgBoxCopy
// //
this.menuMsgBoxCopy.Name = "menuMsgBoxCopy";
resources.ApplyResources(this.menuMsgBoxCopy, "menuMsgBoxCopy"); resources.ApplyResources(this.menuMsgBoxCopy, "menuMsgBoxCopy");
this.menuMsgBoxCopy.Name = "menuMsgBoxCopy";
this.menuMsgBoxCopy.Click += new System.EventHandler(this.menuMsgBoxCopy_Click); this.menuMsgBoxCopy.Click += new System.EventHandler(this.menuMsgBoxCopy_Click);
// //
// menuMsgBoxCopyAll // menuMsgBoxCopyAll
// //
this.menuMsgBoxCopyAll.Name = "menuMsgBoxCopyAll";
resources.ApplyResources(this.menuMsgBoxCopyAll, "menuMsgBoxCopyAll"); resources.ApplyResources(this.menuMsgBoxCopyAll, "menuMsgBoxCopyAll");
this.menuMsgBoxCopyAll.Name = "menuMsgBoxCopyAll";
this.menuMsgBoxCopyAll.Click += new System.EventHandler(this.menuMsgBoxCopyAll_Click); this.menuMsgBoxCopyAll.Click += new System.EventHandler(this.menuMsgBoxCopyAll_Click);
// //
// menuMsgBoxAddRoutingRule // menuMsgBoxAddRoutingRule
// //
this.menuMsgBoxAddRoutingRule.Name = "menuMsgBoxAddRoutingRule";
resources.ApplyResources(this.menuMsgBoxAddRoutingRule, "menuMsgBoxAddRoutingRule"); resources.ApplyResources(this.menuMsgBoxAddRoutingRule, "menuMsgBoxAddRoutingRule");
this.menuMsgBoxAddRoutingRule.Name = "menuMsgBoxAddRoutingRule";
this.menuMsgBoxAddRoutingRule.Click += new System.EventHandler(this.menuMsgBoxAddRoutingRule_Click); this.menuMsgBoxAddRoutingRule.Click += new System.EventHandler(this.menuMsgBoxAddRoutingRule_Click);
// //
// menuMsgBoxFilter // menuMsgBoxFilter
// //
this.menuMsgBoxFilter.Name = "menuMsgBoxFilter";
resources.ApplyResources(this.menuMsgBoxFilter, "menuMsgBoxFilter"); resources.ApplyResources(this.menuMsgBoxFilter, "menuMsgBoxFilter");
this.menuMsgBoxFilter.Name = "menuMsgBoxFilter";
this.menuMsgBoxFilter.Click += new System.EventHandler(this.menuMsgBoxFilter_Click); this.menuMsgBoxFilter.Click += new System.EventHandler(this.menuMsgBoxFilter_Click);
// //
// ssMain // ssMain
// //
resources.ApplyResources(this.ssMain, "ssMain");
this.ssMain.ImageScalingSize = new System.Drawing.Size(20, 20); this.ssMain.ImageScalingSize = new System.Drawing.Size(20, 20);
this.ssMain.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.ssMain.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolSslSocksPortLab, this.toolSslSocksPortLab,
@ -507,9 +514,9 @@
this.toolSslHttpPortLab, this.toolSslHttpPortLab,
this.toolSslHttpPort, this.toolSslHttpPort,
this.toolSslBlank2, this.toolSslBlank2,
this.toolSslBlank3,
this.toolSslServerSpeed, this.toolSslServerSpeed,
this.toolSslBlank4}); this.toolSslBlank4});
resources.ApplyResources(this.ssMain, "ssMain");
this.ssMain.Name = "ssMain"; this.ssMain.Name = "ssMain";
this.ssMain.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.ssMain_ItemClicked); this.ssMain.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.ssMain_ItemClicked);
// //
@ -520,8 +527,8 @@
// //
// toolSslSocksPort // toolSslSocksPort
// //
this.toolSslSocksPort.Name = "toolSslSocksPort";
resources.ApplyResources(this.toolSslSocksPort, "toolSslSocksPort"); resources.ApplyResources(this.toolSslSocksPort, "toolSslSocksPort");
this.toolSslSocksPort.Name = "toolSslSocksPort";
// //
// toolSslBlank1 // toolSslBlank1
// //
@ -536,8 +543,8 @@
// //
// toolSslHttpPort // toolSslHttpPort
// //
this.toolSslHttpPort.Name = "toolSslHttpPort";
resources.ApplyResources(this.toolSslHttpPort, "toolSslHttpPort"); resources.ApplyResources(this.toolSslHttpPort, "toolSslHttpPort");
this.toolSslHttpPort.Name = "toolSslHttpPort";
// //
// toolSslBlank2 // toolSslBlank2
// //
@ -545,6 +552,12 @@
this.toolSslBlank2.Name = "toolSslBlank2"; this.toolSslBlank2.Name = "toolSslBlank2";
this.toolSslBlank2.Spring = true; this.toolSslBlank2.Spring = true;
// //
// toolSslBlank3
//
resources.ApplyResources(this.toolSslBlank3, "toolSslBlank3");
this.toolSslBlank3.Name = "toolSslBlank3";
this.toolSslBlank3.Spring = true;
//
// toolSslServerSpeed // toolSslServerSpeed
// //
resources.ApplyResources(this.toolSslServerSpeed, "toolSslServerSpeed"); resources.ApplyResources(this.toolSslServerSpeed, "toolSslServerSpeed");
@ -553,19 +566,19 @@
// //
// toolSslBlank4 // toolSslBlank4
// //
this.toolSslBlank4.Name = "toolSslBlank4";
resources.ApplyResources(this.toolSslBlank4, "toolSslBlank4"); resources.ApplyResources(this.toolSslBlank4, "toolSslBlank4");
this.toolSslBlank4.Name = "toolSslBlank4";
// //
// notifyMain // notifyMain
// //
this.notifyMain.ContextMenuStrip = this.cmsMain;
resources.ApplyResources(this.notifyMain, "notifyMain"); resources.ApplyResources(this.notifyMain, "notifyMain");
this.notifyMain.ContextMenuStrip = this.cmsMain;
this.notifyMain.DoubleClick += notifyIcon_DoubleClick; this.notifyMain.DoubleClick += notifyIcon_DoubleClick;
// //
// cmsMain // cmsMain
// //
this.cmsMain.ImageScalingSize = new System.Drawing.Size(20, 20);
resources.ApplyResources(this.cmsMain, "cmsMain"); resources.ApplyResources(this.cmsMain, "cmsMain");
this.cmsMain.ImageScalingSize = new System.Drawing.Size(20, 20);
this.cmsMain.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.cmsMain.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuSysAgentMode, this.menuSysAgentMode,
this.menuRoutings, this.menuRoutings,
@ -583,74 +596,74 @@
// //
// menuSysAgentMode // menuSysAgentMode
// //
resources.ApplyResources(this.menuSysAgentMode, "menuSysAgentMode");
this.menuSysAgentMode.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.menuSysAgentMode.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuKeepClear, this.menuKeepClear,
this.menuGlobal, this.menuGlobal,
this.menuKeepNothing}); this.menuKeepNothing});
this.menuSysAgentMode.Name = "menuSysAgentMode"; this.menuSysAgentMode.Name = "menuSysAgentMode";
resources.ApplyResources(this.menuSysAgentMode, "menuSysAgentMode");
// //
// menuKeepClear // menuKeepClear
// //
this.menuKeepClear.Name = "menuKeepClear";
resources.ApplyResources(this.menuKeepClear, "menuKeepClear"); resources.ApplyResources(this.menuKeepClear, "menuKeepClear");
this.menuKeepClear.Name = "menuKeepClear";
this.menuKeepClear.Click += new System.EventHandler(this.menuKeepClear_Click); this.menuKeepClear.Click += new System.EventHandler(this.menuKeepClear_Click);
// //
// menuGlobal // menuGlobal
// //
this.menuGlobal.Name = "menuGlobal";
resources.ApplyResources(this.menuGlobal, "menuGlobal"); resources.ApplyResources(this.menuGlobal, "menuGlobal");
this.menuGlobal.Name = "menuGlobal";
this.menuGlobal.Click += new System.EventHandler(this.menuGlobal_Click); this.menuGlobal.Click += new System.EventHandler(this.menuGlobal_Click);
// //
// menuKeepNothing // menuKeepNothing
// //
this.menuKeepNothing.Name = "menuKeepNothing";
resources.ApplyResources(this.menuKeepNothing, "menuKeepNothing"); resources.ApplyResources(this.menuKeepNothing, "menuKeepNothing");
this.menuKeepNothing.Name = "menuKeepNothing";
this.menuKeepNothing.Click += new System.EventHandler(this.menuKeepNothing_Click); this.menuKeepNothing.Click += new System.EventHandler(this.menuKeepNothing_Click);
// //
// menuRoutings // menuRoutings
// //
this.menuRoutings.Name = "menuRoutings";
resources.ApplyResources(this.menuRoutings, "menuRoutings"); resources.ApplyResources(this.menuRoutings, "menuRoutings");
this.menuRoutings.Name = "menuRoutings";
// //
// menuServers // menuServers
// //
this.menuServers.Name = "menuServers";
resources.ApplyResources(this.menuServers, "menuServers"); resources.ApplyResources(this.menuServers, "menuServers");
this.menuServers.Name = "menuServers";
menuServers.Visible = false; menuServers.Visible = false;
// //
// toolStripSeparator13 // toolStripSeparator13
// //
this.toolStripSeparator13.Name = "toolStripSeparator13";
resources.ApplyResources(this.toolStripSeparator13, "toolStripSeparator13"); resources.ApplyResources(this.toolStripSeparator13, "toolStripSeparator13");
this.toolStripSeparator13.Name = "toolStripSeparator13";
// //
// menuAddServers2 // menuAddServers2
// //
this.menuAddServers2.Name = "menuAddServers2";
resources.ApplyResources(this.menuAddServers2, "menuAddServers2"); resources.ApplyResources(this.menuAddServers2, "menuAddServers2");
this.menuAddServers2.Name = "menuAddServers2";
this.menuAddServers2.Click += new System.EventHandler(this.menuAddServers_Click); this.menuAddServers2.Click += new System.EventHandler(this.menuAddServers_Click);
// //
// menuScanScreen2 // menuScanScreen2
// //
this.menuScanScreen2.Name = "menuScanScreen2";
resources.ApplyResources(this.menuScanScreen2, "menuScanScreen2"); resources.ApplyResources(this.menuScanScreen2, "menuScanScreen2");
this.menuScanScreen2.Name = "menuScanScreen2";
this.menuScanScreen2.Click += new System.EventHandler(this.menuScanScreen_Click); this.menuScanScreen2.Click += new System.EventHandler(this.menuScanScreen_Click);
// //
// menuUpdateSubscriptions // menuUpdateSubscriptions
// //
this.menuUpdateSubscriptions.Name = "menuUpdateSubscriptions";
resources.ApplyResources(this.menuUpdateSubscriptions, "menuUpdateSubscriptions"); resources.ApplyResources(this.menuUpdateSubscriptions, "menuUpdateSubscriptions");
this.menuUpdateSubscriptions.Name = "menuUpdateSubscriptions";
this.menuUpdateSubscriptions.Click += new System.EventHandler(this.menuUpdateSubscriptions_Click); this.menuUpdateSubscriptions.Click += new System.EventHandler(this.menuUpdateSubscriptions_Click);
// //
// toolStripSeparator2 // toolStripSeparator2
// //
this.toolStripSeparator2.Name = "toolStripSeparator2";
resources.ApplyResources(this.toolStripSeparator2, "toolStripSeparator2"); resources.ApplyResources(this.toolStripSeparator2, "toolStripSeparator2");
this.toolStripSeparator2.Name = "toolStripSeparator2";
// //
// menuExit // menuExit
// //
this.menuExit.Name = "menuExit";
resources.ApplyResources(this.menuExit, "menuExit"); resources.ApplyResources(this.menuExit, "menuExit");
this.menuExit.Name = "menuExit";
this.menuExit.Click += new System.EventHandler(this.menuExit_Click); this.menuExit.Click += new System.EventHandler(this.menuExit_Click);
// //
// bgwScan // bgwScan
@ -666,6 +679,7 @@
// //
// tsMain // tsMain
// //
resources.ApplyResources(this.tsMain, "tsMain");
this.tsMain.ImageScalingSize = new System.Drawing.Size(32, 32); this.tsMain.ImageScalingSize = new System.Drawing.Size(32, 32);
this.tsMain.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.tsMain.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsbServer, this.tsbServer,
@ -683,88 +697,87 @@
this.tsbPromotion, this.tsbPromotion,
this.toolStripSeparator11, this.toolStripSeparator11,
this.tsbClose}); this.tsbClose});
resources.ApplyResources(this.tsMain, "tsMain");
this.tsMain.Name = "tsMain"; this.tsMain.Name = "tsMain";
this.tsMain.TabStop = true; this.tsMain.TabStop = true;
// //
// toolStripSeparator4 // toolStripSeparator4
// //
this.toolStripSeparator4.Name = "toolStripSeparator4";
resources.ApplyResources(this.toolStripSeparator4, "toolStripSeparator4"); resources.ApplyResources(this.toolStripSeparator4, "toolStripSeparator4");
this.toolStripSeparator4.Name = "toolStripSeparator4";
// //
// tsbSub // tsbSub
// //
resources.ApplyResources(this.tsbSub, "tsbSub");
this.tsbSub.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.tsbSub.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsbSubSetting, this.tsbSubSetting,
this.tsbSubUpdate}); this.tsbSubUpdate});
this.tsbSub.Image = global::v2rayN.Properties.Resources.sub; this.tsbSub.Image = global::v2rayN.Properties.Resources.sub;
resources.ApplyResources(this.tsbSub, "tsbSub");
this.tsbSub.Name = "tsbSub"; this.tsbSub.Name = "tsbSub";
// //
// tsbSubSetting // tsbSubSetting
// //
this.tsbSubSetting.Name = "tsbSubSetting";
resources.ApplyResources(this.tsbSubSetting, "tsbSubSetting"); resources.ApplyResources(this.tsbSubSetting, "tsbSubSetting");
this.tsbSubSetting.Name = "tsbSubSetting";
this.tsbSubSetting.Click += new System.EventHandler(this.tsbSubSetting_Click); this.tsbSubSetting.Click += new System.EventHandler(this.tsbSubSetting_Click);
// //
// tsbSubUpdate // tsbSubUpdate
// //
this.tsbSubUpdate.Name = "tsbSubUpdate";
resources.ApplyResources(this.tsbSubUpdate, "tsbSubUpdate"); resources.ApplyResources(this.tsbSubUpdate, "tsbSubUpdate");
this.tsbSubUpdate.Name = "tsbSubUpdate";
this.tsbSubUpdate.Click += new System.EventHandler(this.tsbSubUpdate_Click); this.tsbSubUpdate.Click += new System.EventHandler(this.tsbSubUpdate_Click);
// //
// tsbQRCodeSwitch // tsbQRCodeSwitch
// //
resources.ApplyResources(this.tsbQRCodeSwitch, "tsbQRCodeSwitch");
this.tsbQRCodeSwitch.CheckOnClick = true; this.tsbQRCodeSwitch.CheckOnClick = true;
this.tsbQRCodeSwitch.ForeColor = System.Drawing.Color.Black; this.tsbQRCodeSwitch.ForeColor = System.Drawing.Color.Black;
this.tsbQRCodeSwitch.Image = global::v2rayN.Properties.Resources.share; this.tsbQRCodeSwitch.Image = global::v2rayN.Properties.Resources.share;
resources.ApplyResources(this.tsbQRCodeSwitch, "tsbQRCodeSwitch");
this.tsbQRCodeSwitch.Name = "tsbQRCodeSwitch"; this.tsbQRCodeSwitch.Name = "tsbQRCodeSwitch";
this.tsbQRCodeSwitch.CheckedChanged += new System.EventHandler(this.tsbQRCodeSwitch_CheckedChanged); this.tsbQRCodeSwitch.CheckedChanged += new System.EventHandler(this.tsbQRCodeSwitch_CheckedChanged);
// //
// toolStripSeparator8 // toolStripSeparator8
// //
this.toolStripSeparator8.Name = "toolStripSeparator8";
resources.ApplyResources(this.toolStripSeparator8, "toolStripSeparator8"); resources.ApplyResources(this.toolStripSeparator8, "toolStripSeparator8");
this.toolStripSeparator8.Name = "toolStripSeparator8";
// //
// tsbSetting // tsbSetting
// //
resources.ApplyResources(this.tsbSetting, "tsbSetting");
this.tsbSetting.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.tsbSetting.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsbOptionSetting, this.tsbOptionSetting,
this.tsbRoutingSetting, this.tsbRoutingSetting,
this.toolStripSeparator14, this.toolStripSeparator14,
this.tsbBackupGuiNConfig}); this.tsbBackupGuiNConfig});
this.tsbSetting.Image = global::v2rayN.Properties.Resources.option; this.tsbSetting.Image = global::v2rayN.Properties.Resources.option;
resources.ApplyResources(this.tsbSetting, "tsbSetting");
this.tsbSetting.Name = "tsbSetting"; this.tsbSetting.Name = "tsbSetting";
// //
// tsbOptionSetting // tsbOptionSetting
// //
this.tsbOptionSetting.Name = "tsbOptionSetting";
resources.ApplyResources(this.tsbOptionSetting, "tsbOptionSetting"); resources.ApplyResources(this.tsbOptionSetting, "tsbOptionSetting");
this.tsbOptionSetting.Name = "tsbOptionSetting";
this.tsbOptionSetting.Click += new System.EventHandler(this.tsbOptionSetting_Click); this.tsbOptionSetting.Click += new System.EventHandler(this.tsbOptionSetting_Click);
// //
// tsbRoutingSetting // tsbRoutingSetting
// //
this.tsbRoutingSetting.Name = "tsbRoutingSetting";
resources.ApplyResources(this.tsbRoutingSetting, "tsbRoutingSetting"); resources.ApplyResources(this.tsbRoutingSetting, "tsbRoutingSetting");
this.tsbRoutingSetting.Name = "tsbRoutingSetting";
this.tsbRoutingSetting.Click += new System.EventHandler(this.tsbRoutingSetting_Click); this.tsbRoutingSetting.Click += new System.EventHandler(this.tsbRoutingSetting_Click);
// //
// toolStripSeparator14 // toolStripSeparator14
// //
this.toolStripSeparator14.Name = "toolStripSeparator14";
resources.ApplyResources(this.toolStripSeparator14, "toolStripSeparator14"); resources.ApplyResources(this.toolStripSeparator14, "toolStripSeparator14");
this.toolStripSeparator14.Name = "toolStripSeparator14";
// //
// tsbBackupGuiNConfig // tsbBackupGuiNConfig
// //
this.tsbBackupGuiNConfig.Name = "tsbBackupGuiNConfig";
resources.ApplyResources(this.tsbBackupGuiNConfig, "tsbBackupGuiNConfig"); resources.ApplyResources(this.tsbBackupGuiNConfig, "tsbBackupGuiNConfig");
this.tsbBackupGuiNConfig.Name = "tsbBackupGuiNConfig";
this.tsbBackupGuiNConfig.Click += new System.EventHandler(this.tsbBackupGuiNConfig_Click); this.tsbBackupGuiNConfig.Click += new System.EventHandler(this.tsbBackupGuiNConfig_Click);
// //
// toolStripSeparator5 // toolStripSeparator5
// //
this.toolStripSeparator5.Name = "toolStripSeparator5";
resources.ApplyResources(this.toolStripSeparator5, "toolStripSeparator5"); resources.ApplyResources(this.toolStripSeparator5, "toolStripSeparator5");
this.toolStripSeparator5.Name = "toolStripSeparator5";
// //
// tsbReload // tsbReload
// //
@ -774,11 +787,12 @@
// //
// toolStripSeparator7 // toolStripSeparator7
// //
this.toolStripSeparator7.Name = "toolStripSeparator7";
resources.ApplyResources(this.toolStripSeparator7, "toolStripSeparator7"); resources.ApplyResources(this.toolStripSeparator7, "toolStripSeparator7");
this.toolStripSeparator7.Name = "toolStripSeparator7";
// //
// tsbCheckUpdate // tsbCheckUpdate
// //
resources.ApplyResources(this.tsbCheckUpdate, "tsbCheckUpdate");
this.tsbCheckUpdate.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.tsbCheckUpdate.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsbCheckUpdateN, this.tsbCheckUpdateN,
this.tsbCheckUpdateCore, this.tsbCheckUpdateCore,
@ -787,51 +801,51 @@
this.tsbCheckUpdateGeoSite, this.tsbCheckUpdateGeoSite,
this.tsbCheckUpdateGeoIP}); this.tsbCheckUpdateGeoIP});
this.tsbCheckUpdate.Image = global::v2rayN.Properties.Resources.checkupdate; this.tsbCheckUpdate.Image = global::v2rayN.Properties.Resources.checkupdate;
resources.ApplyResources(this.tsbCheckUpdate, "tsbCheckUpdate");
this.tsbCheckUpdate.Name = "tsbCheckUpdate"; this.tsbCheckUpdate.Name = "tsbCheckUpdate";
// //
// tsbCheckUpdateN // tsbCheckUpdateN
// //
this.tsbCheckUpdateN.Name = "tsbCheckUpdateN";
resources.ApplyResources(this.tsbCheckUpdateN, "tsbCheckUpdateN"); resources.ApplyResources(this.tsbCheckUpdateN, "tsbCheckUpdateN");
this.tsbCheckUpdateN.Name = "tsbCheckUpdateN";
this.tsbCheckUpdateN.Click += new System.EventHandler(this.tsbCheckUpdateN_Click); this.tsbCheckUpdateN.Click += new System.EventHandler(this.tsbCheckUpdateN_Click);
// //
// tsbCheckUpdateCore // tsbCheckUpdateCore
// //
this.tsbCheckUpdateCore.Name = "tsbCheckUpdateCore";
resources.ApplyResources(this.tsbCheckUpdateCore, "tsbCheckUpdateCore"); resources.ApplyResources(this.tsbCheckUpdateCore, "tsbCheckUpdateCore");
this.tsbCheckUpdateCore.Name = "tsbCheckUpdateCore";
this.tsbCheckUpdateCore.Click += new System.EventHandler(this.tsbCheckUpdateCore_Click); this.tsbCheckUpdateCore.Click += new System.EventHandler(this.tsbCheckUpdateCore_Click);
// //
// tsbCheckUpdateXrayCore // tsbCheckUpdateXrayCore
// //
this.tsbCheckUpdateXrayCore.Name = "tsbCheckUpdateXrayCore";
resources.ApplyResources(this.tsbCheckUpdateXrayCore, "tsbCheckUpdateXrayCore"); resources.ApplyResources(this.tsbCheckUpdateXrayCore, "tsbCheckUpdateXrayCore");
this.tsbCheckUpdateXrayCore.Name = "tsbCheckUpdateXrayCore";
this.tsbCheckUpdateXrayCore.Click += new System.EventHandler(this.tsbCheckUpdateXrayCore_Click); this.tsbCheckUpdateXrayCore.Click += new System.EventHandler(this.tsbCheckUpdateXrayCore_Click);
// //
// toolStripSeparator15 // toolStripSeparator15
// //
this.toolStripSeparator15.Name = "toolStripSeparator15";
resources.ApplyResources(this.toolStripSeparator15, "toolStripSeparator15"); resources.ApplyResources(this.toolStripSeparator15, "toolStripSeparator15");
this.toolStripSeparator15.Name = "toolStripSeparator15";
// //
// tsbCheckUpdateGeoSite // tsbCheckUpdateGeoSite
// //
this.tsbCheckUpdateGeoSite.Name = "tsbCheckUpdateGeoSite";
resources.ApplyResources(this.tsbCheckUpdateGeoSite, "tsbCheckUpdateGeoSite"); resources.ApplyResources(this.tsbCheckUpdateGeoSite, "tsbCheckUpdateGeoSite");
this.tsbCheckUpdateGeoSite.Name = "tsbCheckUpdateGeoSite";
this.tsbCheckUpdateGeoSite.Click += new System.EventHandler(this.tsbCheckUpdateGeoSite_Click); this.tsbCheckUpdateGeoSite.Click += new System.EventHandler(this.tsbCheckUpdateGeoSite_Click);
// //
// tsbCheckUpdateGeoIP // tsbCheckUpdateGeoIP
// //
this.tsbCheckUpdateGeoIP.Name = "tsbCheckUpdateGeoIP";
resources.ApplyResources(this.tsbCheckUpdateGeoIP, "tsbCheckUpdateGeoIP"); resources.ApplyResources(this.tsbCheckUpdateGeoIP, "tsbCheckUpdateGeoIP");
this.tsbCheckUpdateGeoIP.Name = "tsbCheckUpdateGeoIP";
this.tsbCheckUpdateGeoIP.Click += new System.EventHandler(this.tsbCheckUpdateGeoIP_Click); this.tsbCheckUpdateGeoIP.Click += new System.EventHandler(this.tsbCheckUpdateGeoIP_Click);
// //
// toolStripSeparator10 // toolStripSeparator10
// //
this.toolStripSeparator10.Name = "toolStripSeparator10";
resources.ApplyResources(this.toolStripSeparator10, "toolStripSeparator10"); resources.ApplyResources(this.toolStripSeparator10, "toolStripSeparator10");
this.toolStripSeparator10.Name = "toolStripSeparator10";
// //
// tsbHelp // tsbHelp
// //
resources.ApplyResources(this.tsbHelp, "tsbHelp");
this.tsbHelp.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.tsbHelp.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tsbAbout, this.tsbAbout,
this.tsbV2rayWebsite, this.tsbV2rayWebsite,
@ -839,50 +853,49 @@
this.tsbLanguageDef, this.tsbLanguageDef,
this.tsbLanguageZhHans}); this.tsbLanguageZhHans});
this.tsbHelp.Image = global::v2rayN.Properties.Resources.help; this.tsbHelp.Image = global::v2rayN.Properties.Resources.help;
resources.ApplyResources(this.tsbHelp, "tsbHelp");
this.tsbHelp.Name = "tsbHelp"; this.tsbHelp.Name = "tsbHelp";
// //
// tsbAbout // tsbAbout
// //
this.tsbAbout.Name = "tsbAbout";
resources.ApplyResources(this.tsbAbout, "tsbAbout"); resources.ApplyResources(this.tsbAbout, "tsbAbout");
this.tsbAbout.Name = "tsbAbout";
this.tsbAbout.Click += new System.EventHandler(this.tsbAbout_Click); this.tsbAbout.Click += new System.EventHandler(this.tsbAbout_Click);
// //
// tsbV2rayWebsite // tsbV2rayWebsite
// //
this.tsbV2rayWebsite.Name = "tsbV2rayWebsite";
resources.ApplyResources(this.tsbV2rayWebsite, "tsbV2rayWebsite"); resources.ApplyResources(this.tsbV2rayWebsite, "tsbV2rayWebsite");
this.tsbV2rayWebsite.Name = "tsbV2rayWebsite";
this.tsbV2rayWebsite.Click += new System.EventHandler(this.tsbV2rayWebsite_Click); this.tsbV2rayWebsite.Click += new System.EventHandler(this.tsbV2rayWebsite_Click);
// //
// toolStripSeparator12 // toolStripSeparator12
// //
this.toolStripSeparator12.Name = "toolStripSeparator12";
resources.ApplyResources(this.toolStripSeparator12, "toolStripSeparator12"); resources.ApplyResources(this.toolStripSeparator12, "toolStripSeparator12");
this.toolStripSeparator12.Name = "toolStripSeparator12";
// //
// tsbLanguageDef // tsbLanguageDef
// //
this.tsbLanguageDef.Name = "tsbLanguageDef";
resources.ApplyResources(this.tsbLanguageDef, "tsbLanguageDef"); resources.ApplyResources(this.tsbLanguageDef, "tsbLanguageDef");
this.tsbLanguageDef.Name = "tsbLanguageDef";
this.tsbLanguageDef.Click += new System.EventHandler(this.tsbLanguageDef_Click); this.tsbLanguageDef.Click += new System.EventHandler(this.tsbLanguageDef_Click);
// //
// tsbLanguageZhHans // tsbLanguageZhHans
// //
this.tsbLanguageZhHans.Name = "tsbLanguageZhHans";
resources.ApplyResources(this.tsbLanguageZhHans, "tsbLanguageZhHans"); resources.ApplyResources(this.tsbLanguageZhHans, "tsbLanguageZhHans");
this.tsbLanguageZhHans.Name = "tsbLanguageZhHans";
this.tsbLanguageZhHans.Click += new System.EventHandler(this.tsbLanguageZhHans_Click); this.tsbLanguageZhHans.Click += new System.EventHandler(this.tsbLanguageZhHans_Click);
// //
// tsbPromotion // tsbPromotion
// //
resources.ApplyResources(this.tsbPromotion, "tsbPromotion");
this.tsbPromotion.ForeColor = System.Drawing.Color.Black; this.tsbPromotion.ForeColor = System.Drawing.Color.Black;
this.tsbPromotion.Image = global::v2rayN.Properties.Resources.promotion; this.tsbPromotion.Image = global::v2rayN.Properties.Resources.promotion;
resources.ApplyResources(this.tsbPromotion, "tsbPromotion");
this.tsbPromotion.Name = "tsbPromotion"; this.tsbPromotion.Name = "tsbPromotion";
this.tsbPromotion.Click += new System.EventHandler(this.tsbPromotion_Click); this.tsbPromotion.Click += new System.EventHandler(this.tsbPromotion_Click);
// //
// toolStripSeparator11 // toolStripSeparator11
// //
this.toolStripSeparator11.Name = "toolStripSeparator11";
resources.ApplyResources(this.toolStripSeparator11, "toolStripSeparator11"); resources.ApplyResources(this.toolStripSeparator11, "toolStripSeparator11");
this.toolStripSeparator11.Name = "toolStripSeparator11";
// //
// tsbClose // tsbClose
// //
@ -1000,6 +1013,7 @@
private System.Windows.Forms.ToolStripStatusLabel toolSslHttpPort; private System.Windows.Forms.ToolStripStatusLabel toolSslHttpPort;
private System.Windows.Forms.ToolStripStatusLabel toolSslBlank2; private System.Windows.Forms.ToolStripStatusLabel toolSslBlank2;
private System.Windows.Forms.ToolStripStatusLabel toolSslBlank1; private System.Windows.Forms.ToolStripStatusLabel toolSslBlank1;
private System.Windows.Forms.ToolStripStatusLabel toolSslBlank3;
private System.Windows.Forms.ToolStripStatusLabel toolSslSocksPortLab; private System.Windows.Forms.ToolStripStatusLabel toolSslSocksPortLab;
private System.Windows.Forms.ToolStripStatusLabel toolSslHttpPortLab; private System.Windows.Forms.ToolStripStatusLabel toolSslHttpPortLab;
private System.Windows.Forms.ToolStripStatusLabel toolSslServerSpeed; private System.Windows.Forms.ToolStripStatusLabel toolSslServerSpeed;

View file

@ -50,7 +50,6 @@ namespace v2rayN.Forms
{ {
ConfigHandler.LoadConfig(ref config); ConfigHandler.LoadConfig(ref config);
ConfigHandler.InitBuiltinRouting(ref config); ConfigHandler.InitBuiltinRouting(ref config);
MainFormHandler.Instance.BackupGuiNConfig(config, true);
v2rayHandler = new V2rayHandler(); v2rayHandler = new V2rayHandler();
v2rayHandler.ProcessEvent += v2rayHandler_ProcessEvent; v2rayHandler.ProcessEvent += v2rayHandler_ProcessEvent;
@ -58,7 +57,6 @@ namespace v2rayN.Forms
{ {
statistics = new StatisticsHandler(config, UpdateStatisticsHandler); statistics = new StatisticsHandler(config, UpdateStatisticsHandler);
} }
MainFormHandler.Instance.UpdateTask(config, UpdateTaskHandler);
} }
private void MainForm_VisibleChanged(object sender, EventArgs e) private void MainForm_VisibleChanged(object sender, EventArgs e)
@ -938,7 +936,7 @@ namespace v2rayN.Forms
{ {
if (!Utils.IsNullOrEmpty(MsgFilter)) if (!Utils.IsNullOrEmpty(MsgFilter))
{ {
if (!Regex.IsMatch(text, MsgFilter)) if (!Regex.IsMatch(text,MsgFilter))
{ {
return; return;
} }
@ -970,10 +968,7 @@ namespace v2rayN.Forms
/// </summary> /// </summary>
private void ClearMsg() private void ClearMsg()
{ {
txtMsgBox.Invoke((Action)delegate this.txtMsgBox.Clear();
{
txtMsgBox.Clear();
});
} }
/// <summary> /// <summary>
@ -1095,15 +1090,6 @@ namespace v2rayN.Forms
} }
} }
private void UpdateTaskHandler(bool success, string msg)
{
AppendText(false, msg);
if (success)
{
Global.reloadV2ray = true;
LoadV2ray();
}
}
#endregion #endregion
#region #region
@ -1233,7 +1219,8 @@ namespace v2rayN.Forms
{ {
CloseV2ray(); CloseV2ray();
string fileName = Utils.GetPath(Utils.GetDownloadFileName(msg)); string fileName = Global.DownloadFileName;
fileName = Utils.GetPath(fileName);
FileManager.ZipExtractToFile(fileName, config.ignoreGeoUpdateCore ? "geo" : ""); FileManager.ZipExtractToFile(fileName, config.ignoreGeoUpdateCore ? "geo" : "");
AppendText(false, UIRes.I18N("MsgUpdateV2rayCoreSuccessfullyMore")); AppendText(false, UIRes.I18N("MsgUpdateV2rayCoreSuccessfullyMore"));

File diff suppressed because it is too large Load diff

View file

@ -69,8 +69,6 @@
this.txtKcpmtu = new System.Windows.Forms.TextBox(); this.txtKcpmtu = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label();
this.tabPage7 = new System.Windows.Forms.TabPage(); this.tabPage7 = new System.Windows.Forms.TabPage();
this.txtautoUpdateInterval = new System.Windows.Forms.TextBox();
this.label15 = new System.Windows.Forms.Label();
this.chkIgnoreGeoUpdateCore = new System.Windows.Forms.CheckBox(); this.chkIgnoreGeoUpdateCore = new System.Windows.Forms.CheckBox();
this.cmbCoreType = new System.Windows.Forms.ComboBox(); this.cmbCoreType = new System.Windows.Forms.ComboBox();
this.label4 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label();
@ -374,8 +372,6 @@
// tabPage7 // tabPage7
// //
resources.ApplyResources(this.tabPage7, "tabPage7"); resources.ApplyResources(this.tabPage7, "tabPage7");
this.tabPage7.Controls.Add(this.txtautoUpdateInterval);
this.tabPage7.Controls.Add(this.label15);
this.tabPage7.Controls.Add(this.chkIgnoreGeoUpdateCore); this.tabPage7.Controls.Add(this.chkIgnoreGeoUpdateCore);
this.tabPage7.Controls.Add(this.cmbCoreType); this.tabPage7.Controls.Add(this.cmbCoreType);
this.tabPage7.Controls.Add(this.label4); this.tabPage7.Controls.Add(this.label4);
@ -388,16 +384,6 @@
this.tabPage7.Name = "tabPage7"; this.tabPage7.Name = "tabPage7";
this.tabPage7.UseVisualStyleBackColor = true; this.tabPage7.UseVisualStyleBackColor = true;
// //
// txtautoUpdateInterval
//
resources.ApplyResources(this.txtautoUpdateInterval, "txtautoUpdateInterval");
this.txtautoUpdateInterval.Name = "txtautoUpdateInterval";
//
// label15
//
resources.ApplyResources(this.label15, "label15");
this.label15.Name = "label15";
//
// chkIgnoreGeoUpdateCore // chkIgnoreGeoUpdateCore
// //
resources.ApplyResources(this.chkIgnoreGeoUpdateCore, "chkIgnoreGeoUpdateCore"); resources.ApplyResources(this.chkIgnoreGeoUpdateCore, "chkIgnoreGeoUpdateCore");
@ -593,7 +579,5 @@
private System.Windows.Forms.Label label12; private System.Windows.Forms.Label label12;
private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.Label label13; private System.Windows.Forms.Label label13;
private System.Windows.Forms.TextBox txtautoUpdateInterval;
private System.Windows.Forms.Label label15;
} }
} }

View file

@ -123,7 +123,6 @@ namespace v2rayN.Forms
chkIgnoreGeoUpdateCore.Checked = config.ignoreGeoUpdateCore; chkIgnoreGeoUpdateCore.Checked = config.ignoreGeoUpdateCore;
cmbCoreType.SelectedIndex = (int)config.coreType; cmbCoreType.SelectedIndex = (int)config.coreType;
txtautoUpdateInterval.Text = config.autoUpdateInterval.ToString();
} }
private void btnOK_Click(object sender, EventArgs e) private void btnOK_Click(object sender, EventArgs e)
{ {
@ -291,7 +290,6 @@ namespace v2rayN.Forms
config.ignoreGeoUpdateCore = chkIgnoreGeoUpdateCore.Checked; config.ignoreGeoUpdateCore = chkIgnoreGeoUpdateCore.Checked;
config.coreType = (ECoreType)cmbCoreType.SelectedIndex; config.coreType = (ECoreType)cmbCoreType.SelectedIndex;
config.autoUpdateInterval = Utils.ToInt(txtautoUpdateInterval.Text);
return 0; return 0;
} }

File diff suppressed because it is too large Load diff

View file

@ -139,63 +139,30 @@
<data name="tabPage6.Text" xml:space="preserve"> <data name="tabPage6.Text" xml:space="preserve">
<value> Core:KCP设置 </value> <value> Core:KCP设置 </value>
</data> </data>
<data name="txtautoUpdateInterval.Location" type="System.Drawing.Point, System.Drawing">
<value>255, 156</value>
</data>
<data name="label15.Size" type="System.Drawing.Size, System.Drawing">
<value>191, 12</value>
</data>
<data name="label15.Text" xml:space="preserve">
<value>自动更新Geo文件的间隔(单位分钟)</value>
</data>
<data name="chkIgnoreGeoUpdateCore.Size" type="System.Drawing.Size, System.Drawing">
<value>150, 16</value>
</data>
<data name="chkIgnoreGeoUpdateCore.Text" xml:space="preserve">
<value>更新Core时忽略Geo文件</value>
</data>
<data name="label4.Size" type="System.Drawing.Size, System.Drawing">
<value>53, 12</value>
</data>
<data name="label4.Text" xml:space="preserve">
<value>Core类型</value>
</data>
<data name="chkKeepOlderDedupl.Size" type="System.Drawing.Size, System.Drawing">
<value>156, 16</value>
</data>
<data name="chkKeepOlderDedupl.Text" xml:space="preserve">
<value>去重时保留序号较小的项</value>
</data>
<data name="lbFreshrate.Size" type="System.Drawing.Size, System.Drawing">
<value>77, 12</value>
</data>
<data name="lbFreshrate.Text" xml:space="preserve">
<value>统计刷新频率</value>
</data>
<data name="chkEnableStatistics.Size" type="System.Drawing.Size, System.Drawing">
<value>372, 16</value>
</data>
<data name="chkEnableStatistics.Text" xml:space="preserve">
<value>启用统计(实时网速显示和使用流量显示需要重启v2rayN客户端)</value>
</data>
<data name="chkAllowLANConn.Size" type="System.Drawing.Size, System.Drawing">
<value>144, 16</value>
</data>
<data name="chkAllowLANConn.Text" xml:space="preserve">
<value>允许来自局域网的连接</value>
</data>
<data name="chkAutoRun.Size" type="System.Drawing.Size, System.Drawing">
<value>180, 16</value>
</data>
<data name="chkAutoRun.Text" xml:space="preserve">
<value>开机自动启动(可能会不成功)</value>
</data>
<data name="tabPage7.Size" type="System.Drawing.Size, System.Drawing"> <data name="tabPage7.Size" type="System.Drawing.Size, System.Drawing">
<value>654, 443</value> <value>654, 443</value>
</data> </data>
<data name="tabPage7.Text" xml:space="preserve"> <data name="tabPage7.Text" xml:space="preserve">
<value> v2rayN设置 </value> <value> v2rayN设置 </value>
</data> </data>
<data name="label13.Size" type="System.Drawing.Size, System.Drawing">
<value>95, 12</value>
</data>
<data name="label13.Text" xml:space="preserve">
<value>使用分号(;)分隔</value>
</data>
<data name="label12.Size" type="System.Drawing.Size, System.Drawing">
<value>239, 12</value>
</data>
<data name="label12.Text" xml:space="preserve">
<value>对于下列字符开头的地址不使用代理服务器:</value>
</data>
<data name="groupBox2.Size" type="System.Drawing.Size, System.Drawing">
<value>654, 443</value>
</data>
<data name="groupBox2.Text" xml:space="preserve">
<value>例外</value>
</data>
<data name="tabPage3.Size" type="System.Drawing.Size, System.Drawing"> <data name="tabPage3.Size" type="System.Drawing.Size, System.Drawing">
<value>654, 443</value> <value>654, 443</value>
</data> </data>
@ -292,23 +259,47 @@
<data name="label14.Text" xml:space="preserve"> <data name="label14.Text" xml:space="preserve">
<value>自定义DNS(可多个,用逗号(,)隔开)</value> <value>自定义DNS(可多个,用逗号(,)隔开)</value>
</data> </data>
<data name="groupBox2.Size" type="System.Drawing.Size, System.Drawing"> <data name="chkIgnoreGeoUpdateCore.Size" type="System.Drawing.Size, System.Drawing">
<value>654, 443</value> <value>150, 16</value>
</data> </data>
<data name="groupBox2.Text" xml:space="preserve"> <data name="chkIgnoreGeoUpdateCore.Text" xml:space="preserve">
<value>例外</value> <value>更新Core时忽略Geo文件</value>
</data> </data>
<data name="label13.Size" type="System.Drawing.Size, System.Drawing"> <data name="label4.Size" type="System.Drawing.Size, System.Drawing">
<value>95, 12</value> <value>53, 12</value>
</data> </data>
<data name="label13.Text" xml:space="preserve"> <data name="label4.Text" xml:space="preserve">
<value>使用分号(;)分隔</value> <value>Core类型</value>
</data> </data>
<data name="label12.Size" type="System.Drawing.Size, System.Drawing"> <data name="chkKeepOlderDedupl.Size" type="System.Drawing.Size, System.Drawing">
<value>239, 12</value> <value>156, 16</value>
</data> </data>
<data name="label12.Text" xml:space="preserve"> <data name="chkKeepOlderDedupl.Text" xml:space="preserve">
<value>对于下列字符开头的地址不使用代理服务器:</value> <value>去重时保留序号较小的项</value>
</data>
<data name="lbFreshrate.Size" type="System.Drawing.Size, System.Drawing">
<value>77, 12</value>
</data>
<data name="lbFreshrate.Text" xml:space="preserve">
<value>统计刷新频率</value>
</data>
<data name="chkEnableStatistics.Size" type="System.Drawing.Size, System.Drawing">
<value>372, 16</value>
</data>
<data name="chkEnableStatistics.Text" xml:space="preserve">
<value>启用统计(实时网速显示和使用流量显示需要重启v2rayN客户端)</value>
</data>
<data name="chkAllowLANConn.Size" type="System.Drawing.Size, System.Drawing">
<value>144, 16</value>
</data>
<data name="chkAllowLANConn.Text" xml:space="preserve">
<value>允许来自局域网的连接</value>
</data>
<data name="chkAutoRun.Size" type="System.Drawing.Size, System.Drawing">
<value>180, 16</value>
</data>
<data name="chkAutoRun.Text" xml:space="preserve">
<value>开机自动启动(可能会不成功)</value>
</data> </data>
<data name="panel2.Location" type="System.Drawing.Point, System.Drawing"> <data name="panel2.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 479</value> <value>0, 479</value>

View file

@ -31,7 +31,6 @@
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RoutingRuleSettingDetailsForm)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RoutingRuleSettingDetailsForm));
this.panel1 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel();
this.panel3 = new System.Windows.Forms.Panel(); this.panel3 = new System.Windows.Forms.Panel();
this.chkEnabled = new System.Windows.Forms.CheckBox();
this.clbInboundTag = new System.Windows.Forms.CheckedListBox(); this.clbInboundTag = new System.Windows.Forms.CheckedListBox();
this.label2 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label();
this.clbProtocol = new System.Windows.Forms.CheckedListBox(); this.clbProtocol = new System.Windows.Forms.CheckedListBox();
@ -63,8 +62,6 @@
// //
// panel3 // panel3
// //
resources.ApplyResources(this.panel3, "panel3");
this.panel3.Controls.Add(this.chkEnabled);
this.panel3.Controls.Add(this.clbInboundTag); this.panel3.Controls.Add(this.clbInboundTag);
this.panel3.Controls.Add(this.label2); this.panel3.Controls.Add(this.label2);
this.panel3.Controls.Add(this.clbProtocol); this.panel3.Controls.Add(this.clbProtocol);
@ -74,18 +71,13 @@
this.panel3.Controls.Add(this.labRoutingTips); this.panel3.Controls.Add(this.labRoutingTips);
this.panel3.Controls.Add(this.label4); this.panel3.Controls.Add(this.label4);
this.panel3.Controls.Add(this.cmbOutboundTag); this.panel3.Controls.Add(this.cmbOutboundTag);
resources.ApplyResources(this.panel3, "panel3");
this.panel3.Name = "panel3"; this.panel3.Name = "panel3";
// //
// chkEnabled
//
resources.ApplyResources(this.chkEnabled, "chkEnabled");
this.chkEnabled.Name = "chkEnabled";
this.chkEnabled.UseVisualStyleBackColor = true;
//
// clbInboundTag // clbInboundTag
// //
resources.ApplyResources(this.clbInboundTag, "clbInboundTag");
this.clbInboundTag.CheckOnClick = true; this.clbInboundTag.CheckOnClick = true;
resources.ApplyResources(this.clbInboundTag, "clbInboundTag");
this.clbInboundTag.FormattingEnabled = true; this.clbInboundTag.FormattingEnabled = true;
this.clbInboundTag.Items.AddRange(new object[] { this.clbInboundTag.Items.AddRange(new object[] {
resources.GetString("clbInboundTag.Items"), resources.GetString("clbInboundTag.Items"),
@ -100,8 +92,8 @@
// //
// clbProtocol // clbProtocol
// //
resources.ApplyResources(this.clbProtocol, "clbProtocol");
this.clbProtocol.CheckOnClick = true; this.clbProtocol.CheckOnClick = true;
resources.ApplyResources(this.clbProtocol, "clbProtocol");
this.clbProtocol.FormattingEnabled = true; this.clbProtocol.FormattingEnabled = true;
this.clbProtocol.Items.AddRange(new object[] { this.clbProtocol.Items.AddRange(new object[] {
resources.GetString("clbProtocol.Items"), resources.GetString("clbProtocol.Items"),
@ -127,8 +119,8 @@
// //
// labRoutingTips // labRoutingTips
// //
resources.ApplyResources(this.labRoutingTips, "labRoutingTips");
this.labRoutingTips.ForeColor = System.Drawing.Color.Brown; this.labRoutingTips.ForeColor = System.Drawing.Color.Brown;
resources.ApplyResources(this.labRoutingTips, "labRoutingTips");
this.labRoutingTips.Name = "labRoutingTips"; this.labRoutingTips.Name = "labRoutingTips";
// //
// label4 // label4
@ -138,26 +130,26 @@
// //
// cmbOutboundTag // cmbOutboundTag
// //
resources.ApplyResources(this.cmbOutboundTag, "cmbOutboundTag");
this.cmbOutboundTag.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cmbOutboundTag.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbOutboundTag.FormattingEnabled = true; this.cmbOutboundTag.FormattingEnabled = true;
this.cmbOutboundTag.Items.AddRange(new object[] { this.cmbOutboundTag.Items.AddRange(new object[] {
resources.GetString("cmbOutboundTag.Items"), resources.GetString("cmbOutboundTag.Items"),
resources.GetString("cmbOutboundTag.Items1"), resources.GetString("cmbOutboundTag.Items1"),
resources.GetString("cmbOutboundTag.Items2")}); resources.GetString("cmbOutboundTag.Items2")});
resources.ApplyResources(this.cmbOutboundTag, "cmbOutboundTag");
this.cmbOutboundTag.Name = "cmbOutboundTag"; this.cmbOutboundTag.Name = "cmbOutboundTag";
// //
// panel4 // panel4
// //
resources.ApplyResources(this.panel4, "panel4");
this.panel4.Controls.Add(this.btnClose); this.panel4.Controls.Add(this.btnClose);
this.panel4.Controls.Add(this.btnOK); this.panel4.Controls.Add(this.btnOK);
resources.ApplyResources(this.panel4, "panel4");
this.panel4.Name = "panel4"; this.panel4.Name = "panel4";
// //
// btnClose // btnClose
// //
resources.ApplyResources(this.btnClose, "btnClose");
this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
resources.ApplyResources(this.btnClose, "btnClose");
this.btnClose.Name = "btnClose"; this.btnClose.Name = "btnClose";
this.btnClose.UseVisualStyleBackColor = true; this.btnClose.UseVisualStyleBackColor = true;
this.btnClose.Click += new System.EventHandler(this.btnClose_Click); this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
@ -171,15 +163,15 @@
// //
// panel2 // panel2
// //
resources.ApplyResources(this.panel2, "panel2");
this.panel2.Controls.Add(this.groupBox2); this.panel2.Controls.Add(this.groupBox2);
this.panel2.Controls.Add(this.groupBox1); this.panel2.Controls.Add(this.groupBox1);
resources.ApplyResources(this.panel2, "panel2");
this.panel2.Name = "panel2"; this.panel2.Name = "panel2";
// //
// groupBox2 // groupBox2
// //
resources.ApplyResources(this.groupBox2, "groupBox2");
this.groupBox2.Controls.Add(this.txtIP); this.groupBox2.Controls.Add(this.txtIP);
resources.ApplyResources(this.groupBox2, "groupBox2");
this.groupBox2.Name = "groupBox2"; this.groupBox2.Name = "groupBox2";
this.groupBox2.TabStop = false; this.groupBox2.TabStop = false;
// //
@ -190,8 +182,8 @@
// //
// groupBox1 // groupBox1
// //
resources.ApplyResources(this.groupBox1, "groupBox1");
this.groupBox1.Controls.Add(this.txtDomain); this.groupBox1.Controls.Add(this.txtDomain);
resources.ApplyResources(this.groupBox1, "groupBox1");
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
// //
@ -244,6 +236,5 @@
private System.Windows.Forms.CheckedListBox clbProtocol; private System.Windows.Forms.CheckedListBox clbProtocol;
private System.Windows.Forms.CheckedListBox clbInboundTag; private System.Windows.Forms.CheckedListBox clbInboundTag;
private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label2;
private System.Windows.Forms.CheckBox chkEnabled;
} }
} }

View file

@ -59,7 +59,6 @@ namespace v2rayN.Forms
} }
} }
rulesItem.protocol = protocol; rulesItem.protocol = protocol;
rulesItem.enabled = chkEnabled.Checked;
} }
} }
private void BindingData() private void BindingData()
@ -92,7 +91,6 @@ namespace v2rayN.Forms
} }
} }
} }
chkEnabled.Checked = rulesItem.enabled;
} }
} }
private void ClearBind() private void ClearBind()
@ -101,7 +99,6 @@ namespace v2rayN.Forms
cmbOutboundTag.Text = Global.agentTag; cmbOutboundTag.Text = Global.agentTag;
txtDomain.Text = string.Empty; txtDomain.Text = string.Empty;
txtIP.Text = string.Empty; txtIP.Text = string.Empty;
chkEnabled.Checked = true;
} }
private void btnOK_Click(object sender, EventArgs e) private void btnOK_Click(object sender, EventArgs e)
{ {

File diff suppressed because it is too large Load diff

View file

@ -118,9 +118,6 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="chkEnabled.Location" type="System.Drawing.Point, System.Drawing">
<value>670, 18</value>
</data>
<data name="clbInboundTag.Location" type="System.Drawing.Point, System.Drawing"> <data name="clbInboundTag.Location" type="System.Drawing.Point, System.Drawing">
<value>372, 16</value> <value>372, 16</value>
</data> </data>

View file

@ -55,13 +55,12 @@ namespace v2rayN.Forms
lvRoutings.HeaderStyle = ColumnHeaderStyle.Clickable; lvRoutings.HeaderStyle = ColumnHeaderStyle.Clickable;
lvRoutings.Columns.Add("", 30); lvRoutings.Columns.Add("", 30);
lvRoutings.Columns.Add("outboundTag", 80); lvRoutings.Columns.Add("outboundTag", 100);
lvRoutings.Columns.Add("port", 80); lvRoutings.Columns.Add("port", 80);
lvRoutings.Columns.Add("protocol", 80); lvRoutings.Columns.Add("protocol", 100);
lvRoutings.Columns.Add("inboundTag", 80); lvRoutings.Columns.Add("inboundTag", 100);
lvRoutings.Columns.Add("domain", 160); lvRoutings.Columns.Add("domain", 160);
lvRoutings.Columns.Add("ip", 160); lvRoutings.Columns.Add("ip", 160);
lvRoutings.Columns.Add("enable", 60);
lvRoutings.EndUpdate(); lvRoutings.EndUpdate();
} }
@ -82,7 +81,6 @@ namespace v2rayN.Forms
Utils.AddSubItem(lvItem, "inboundTag", Utils.List2String(item.inboundTag)); Utils.AddSubItem(lvItem, "inboundTag", Utils.List2String(item.inboundTag));
Utils.AddSubItem(lvItem, "domain", Utils.List2String(item.domain)); Utils.AddSubItem(lvItem, "domain", Utils.List2String(item.domain));
Utils.AddSubItem(lvItem, "ip", Utils.List2String(item.ip)); Utils.AddSubItem(lvItem, "ip", Utils.List2String(item.ip));
Utils.AddSubItem(lvItem, "enable", item.enabled.ToString());
if (lvItem != null) lvRoutings.Items.Add(lvItem); if (lvItem != null) lvRoutings.Items.Add(lvItem);
} }

View file

@ -7,7 +7,7 @@ namespace v2rayN
{ {
#region #region
//public const string DownloadFileName = "v2ray-windows.zip"; public const string DownloadFileName = "v2ray-windows.zip";
public const string v2rayWebsiteUrl = @"https://www.v2fly.org/"; public const string v2rayWebsiteUrl = @"https://www.v2fly.org/";
public const string AboutUrl = @"https://github.com/2dust/v2rayN"; public const string AboutUrl = @"https://github.com/2dust/v2rayN";
public const string UpdateUrl = AboutUrl + @"/releases"; public const string UpdateUrl = AboutUrl + @"/releases";

View file

@ -51,9 +51,7 @@ namespace v2rayN.Handler
enableStatistics = false, enableStatistics = false,
// 默认中等刷新率 // 默认中等刷新率
statisticsFreshRate = (int)Global.StatisticsFreshRate.medium, statisticsFreshRate = (int)Global.StatisticsFreshRate.medium
enableRoutingAdvanced = true
}; };
} }
@ -176,7 +174,7 @@ namespace v2rayN.Handler
/// <param name="vmessItem"></param> /// <param name="vmessItem"></param>
/// <param name="index"></param> /// <param name="index"></param>
/// <returns></returns> /// <returns></returns>
public static int AddServer(ref Config config, VmessItem vmessItem, int index, bool toFile = true) public static int AddServer(ref Config config, VmessItem vmessItem, int index)
{ {
vmessItem.configVersion = 2; vmessItem.configVersion = 2;
vmessItem.configType = (int)EConfigType.Vmess; vmessItem.configType = (int)EConfigType.Vmess;
@ -214,10 +212,8 @@ namespace v2rayN.Handler
} }
} }
if (toFile) ToJsonFile(config);
{
ToJsonFile(config);
}
return 0; return 0;
} }
@ -528,7 +524,7 @@ namespace v2rayN.Handler
/// <param name="vmessItem"></param> /// <param name="vmessItem"></param>
/// <param name="index"></param> /// <param name="index"></param>
/// <returns></returns> /// <returns></returns>
public static int AddShadowsocksServer(ref Config config, VmessItem vmessItem, int index, bool toFile = true) public static int AddShadowsocksServer(ref Config config, VmessItem vmessItem, int index)
{ {
vmessItem.configVersion = 2; vmessItem.configVersion = 2;
vmessItem.configType = (int)EConfigType.Shadowsocks; vmessItem.configType = (int)EConfigType.Shadowsocks;
@ -562,10 +558,7 @@ namespace v2rayN.Handler
} }
} }
if (toFile) ToJsonFile(config);
{
ToJsonFile(config);
}
return 0; return 0;
} }
@ -577,7 +570,7 @@ namespace v2rayN.Handler
/// <param name="vmessItem"></param> /// <param name="vmessItem"></param>
/// <param name="index"></param> /// <param name="index"></param>
/// <returns></returns> /// <returns></returns>
public static int AddSocksServer(ref Config config, VmessItem vmessItem, int index, bool toFile = true) public static int AddSocksServer(ref Config config, VmessItem vmessItem, int index)
{ {
vmessItem.configVersion = 2; vmessItem.configVersion = 2;
vmessItem.configType = (int)EConfigType.Socks; vmessItem.configType = (int)EConfigType.Socks;
@ -604,10 +597,7 @@ namespace v2rayN.Handler
} }
} }
if (toFile) ToJsonFile(config);
{
ToJsonFile(config);
}
return 0; return 0;
} }
@ -620,7 +610,7 @@ namespace v2rayN.Handler
/// <param name="vmessItem"></param> /// <param name="vmessItem"></param>
/// <param name="index"></param> /// <param name="index"></param>
/// <returns></returns> /// <returns></returns>
public static int AddTrojanServer(ref Config config, VmessItem vmessItem, int index, bool toFile = true) public static int AddTrojanServer(ref Config config, VmessItem vmessItem, int index)
{ {
vmessItem.configVersion = 2; vmessItem.configVersion = 2;
vmessItem.configType = (int)EConfigType.Trojan; vmessItem.configType = (int)EConfigType.Trojan;
@ -654,10 +644,7 @@ namespace v2rayN.Handler
} }
} }
if (toFile) ToJsonFile(config);
{
ToJsonFile(config);
}
return 0; return 0;
} }
@ -767,41 +754,40 @@ namespace v2rayN.Handler
vmessItem.subid = subid; vmessItem.subid = subid;
if (vmessItem.configType == (int)EConfigType.Vmess) if (vmessItem.configType == (int)EConfigType.Vmess)
{ {
if (AddServer(ref config, vmessItem, -1, false) == 0) if (AddServer(ref config, vmessItem, -1) == 0)
{ {
countServers++; countServers++;
} }
} }
else if (vmessItem.configType == (int)EConfigType.Shadowsocks) else if (vmessItem.configType == (int)EConfigType.Shadowsocks)
{ {
if (AddShadowsocksServer(ref config, vmessItem, -1, false) == 0) if (AddShadowsocksServer(ref config, vmessItem, -1) == 0)
{ {
countServers++; countServers++;
} }
} }
else if (vmessItem.configType == (int)EConfigType.Socks) else if (vmessItem.configType == (int)EConfigType.Socks)
{ {
if (AddSocksServer(ref config, vmessItem, -1, false) == 0) if (AddSocksServer(ref config, vmessItem, -1) == 0)
{ {
countServers++; countServers++;
} }
} }
else if (vmessItem.configType == (int)EConfigType.Trojan) else if (vmessItem.configType == (int)EConfigType.Trojan)
{ {
if (AddTrojanServer(ref config, vmessItem, -1, false) == 0) if (AddTrojanServer(ref config, vmessItem, -1) == 0)
{ {
countServers++; countServers++;
} }
} }
else if (vmessItem.configType == (int)EConfigType.VLESS) else if (vmessItem.configType == (int)EConfigType.VLESS)
{ {
if (AddVlessServer(ref config, vmessItem, -1, false) == 0) if (AddVlessServer(ref config, vmessItem, -1) == 0)
{ {
countServers++; countServers++;
} }
} }
} }
ToJsonFile(config);
return countServers; return countServers;
} }
@ -929,7 +915,7 @@ namespace v2rayN.Handler
/// <param name="vmessItem"></param> /// <param name="vmessItem"></param>
/// <param name="index"></param> /// <param name="index"></param>
/// <returns></returns> /// <returns></returns>
public static int AddVlessServer(ref Config config, VmessItem vmessItem, int index, bool toFile = true) public static int AddVlessServer(ref Config config, VmessItem vmessItem, int index)
{ {
vmessItem.configVersion = 2; vmessItem.configVersion = 2;
vmessItem.configType = (int)EConfigType.VLESS; vmessItem.configType = (int)EConfigType.VLESS;
@ -967,10 +953,7 @@ namespace v2rayN.Handler
} }
} }
if (toFile) ToJsonFile(config);
{
ToJsonFile(config);
}
return 0; return 0;
} }
@ -1078,10 +1061,6 @@ namespace v2rayN.Handler
{ {
return -1; return -1;
} }
if (routingItem.rules == null)
{
routingItem.rules = new List<RulesItem>();
}
if (blReplace) if (blReplace)
{ {
routingItem.rules.Clear(); routingItem.rules.Clear();
@ -1193,44 +1172,35 @@ namespace v2rayN.Handler
if (config.routings.Count(it => it.locked != true) <= 0) if (config.routings.Count(it => it.locked != true) <= 0)
{ {
//Global //Global
var item1 = new RoutingItem() var item1 = new RoutingItem();
{ item1.remarks = "全局(Global)";
remarks = "全局(Global)", item1.url = string.Empty;
url = string.Empty, item1.rules = new List<RulesItem>();
}; string result1 = Utils.GetEmbedText(Global.CustomRoutingFileName + "global");
AddBatchRoutingRules(ref item1, Utils.GetEmbedText(Global.CustomRoutingFileName + "global")); AddBatchRoutingRules(ref item1, result1);
config.routings.Add(item1); config.routings.Add(item1);
//Bypass the mainland //Bypass the mainland
var item2 = new RoutingItem() var item2 = new RoutingItem();
{ item2.remarks = "绕过大陆(Whitelist)";
remarks = "绕过大陆(Whitelist)", item2.url = string.Empty;
url = string.Empty, item2.rules = new List<RulesItem>();
}; string result2 = Utils.GetEmbedText(Global.CustomRoutingFileName + "white");
AddBatchRoutingRules(ref item2, Utils.GetEmbedText(Global.CustomRoutingFileName + "white")); AddBatchRoutingRules(ref item2, result2);
config.routings.Add(item2); config.routings.Add(item2);
//Blacklist
var item3 = new RoutingItem()
{
remarks = "黑名单(Blacklist)",
url = string.Empty,
};
AddBatchRoutingRules(ref item3, Utils.GetEmbedText(Global.CustomRoutingFileName + "black"));
config.routings.Add(item3);
config.routingIndex = 0; config.routingIndex = 0;
} }
if (GetLockedRoutingItem(ref config) == null) if (GetLockedRoutingItem(ref config) == null)
{ {
var item1 = new RoutingItem() var item1 = new RoutingItem();
{ item1.remarks = "locked";
remarks = "locked", item1.url = string.Empty;
url = string.Empty, item1.rules = new List<RulesItem>();
locked = true, item1.locked = true;
}; string result1 = Utils.GetEmbedText(Global.CustomRoutingFileName + "locked");
AddBatchRoutingRules(ref item1, Utils.GetEmbedText(Global.CustomRoutingFileName + "locked")); AddBatchRoutingRules(ref item1, result1);
config.routings.Add(item1); config.routings.Add(item1);
} }

View file

@ -52,7 +52,7 @@ namespace v2rayN.Handler
ws.DownloadFileCompleted += ws_DownloadFileCompleted; ws.DownloadFileCompleted += ws_DownloadFileCompleted;
ws.DownloadProgressChanged += ws_DownloadProgressChanged; ws.DownloadProgressChanged += ws_DownloadProgressChanged;
ws.DownloadFileAsync(new Uri(url), Utils.GetPath(Utils.GetDownloadFileName(url))); ws.DownloadFileAsync(new Uri(url), Utils.GetPath(Global.DownloadFileName));
} }
catch (Exception ex) catch (Exception ex)
{ {

View file

@ -1,7 +1,5 @@
using System; using System;
using System.Drawing; using System.Drawing;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using v2rayN.Base; using v2rayN.Base;
using v2rayN.Mode; using v2rayN.Mode;
@ -11,7 +9,7 @@ namespace v2rayN.Handler
class MainFormHandler class MainFormHandler
{ {
private static MainFormHandler instance; private static MainFormHandler instance;
Action<bool, string> _updateUI; Action<bool, string> updateUI;
//private DownloadHandle downloadHandle2; //private DownloadHandle downloadHandle2;
//private Config _config; //private Config _config;
@ -168,82 +166,103 @@ namespace v2rayN.Handler
return counter; return counter;
} }
public void BackupGuiNConfig(Config config, bool auto = false)
public void UpdateSubscriptionProcess(Config config, Action<bool, string> update)
{ {
string fileName = string.Empty; updateUI = update;
if (auto)
updateUI(false, UIRes.I18N("MsgUpdateSubscriptionStart"));
if (config.subItem == null || config.subItem.Count <= 0)
{ {
fileName = Utils.GetTempPath($"guiNConfig{DateTime.Now.ToString("yyyyMMddHHmmssfff")}.json"); updateUI(false, UIRes.I18N("MsgNoValidSubscription"));
return;
} }
else
for (int k = 1; k <= config.subItem.Count; k++)
{ {
SaveFileDialog fileDialog = new SaveFileDialog string id = config.subItem[k - 1].id.TrimEx();
string url = config.subItem[k - 1].url.TrimEx();
string hashCode = $"{k}->";
if (config.subItem[k - 1].enabled == false)
{ {
Filter = "guiNConfig|*.json", continue;
FilterIndex = 2,
RestoreDirectory = true
};
if (fileDialog.ShowDialog() != DialogResult.OK)
{
return;
} }
fileName = fileDialog.FileName; if (Utils.IsNullOrEmpty(id) || Utils.IsNullOrEmpty(url))
{
updateUI(false, $"{hashCode}{UIRes.I18N("MsgNoValidSubscription")}");
continue;
}
DownloadHandle downloadHandle3 = new DownloadHandle();
downloadHandle3.UpdateCompleted += (sender2, args) =>
{
if (args.Success)
{
updateUI(false, $"{hashCode}{UIRes.I18N("MsgGetSubscriptionSuccessfully")}");
string result = Utils.Base64Decode(args.Msg);
if (Utils.IsNullOrEmpty(result))
{
updateUI(false, $"{hashCode}{UIRes.I18N("MsgSubscriptionDecodingFailed")}");
return;
}
ConfigHandler.RemoveServerViaSubid(ref config, id);
updateUI(false, $"{hashCode}{UIRes.I18N("MsgClearSubscription")}");
// RefreshServers();
int ret = MainFormHandler.Instance.AddBatchServers(config, result, id);
if (ret > 0)
{
// RefreshServers();
}
else
{
updateUI(false, $"{hashCode}{UIRes.I18N("MsgFailedImportSubscription")}");
}
updateUI(true, $"{hashCode}{UIRes.I18N("MsgUpdateSubscriptionEnd")}");
}
else
{
updateUI(false, args.Msg);
}
};
downloadHandle3.Error += (sender2, args) =>
{
updateUI(false, args.GetException().Message);
};
downloadHandle3.WebDownloadString(url);
updateUI(false, $"{hashCode}{UIRes.I18N("MsgStartGettingSubscriptions")}");
} }
}
public void BackupGuiNConfig(Config config)
{
SaveFileDialog fileDialog = new SaveFileDialog
{
Filter = "guiNConfig|*.json",
FilterIndex = 2,
RestoreDirectory = true
};
if (fileDialog.ShowDialog() != DialogResult.OK)
{
return;
}
string fileName = fileDialog.FileName;
if (Utils.IsNullOrEmpty(fileName)) if (Utils.IsNullOrEmpty(fileName))
{ {
return; return;
} }
var ret = Utils.ToJsonFile(config, fileName); if (Utils.ToJsonFile(config, fileName) == 0)
if (!auto)
{ {
if (ret == 0) UI.Show(UIRes.I18N("OperationSuccess"));
{ }
else
UI.Show(UIRes.I18N("OperationSuccess")); {
} UI.ShowWarning(UIRes.I18N("OperationFailed"));
else
{
UI.ShowWarning(UIRes.I18N("OperationFailed"));
}
} }
} }
public void UpdateTask(Config config, Action<bool, string> update)
{
_updateUI = update;
Task.Run(() => UpdateTaskRun(config));
}
private void UpdateTaskRun(Config config)
{
var updateHandle = new UpdateHandle();
while (true)
{
Utils.SaveLog("UpdateTaskRun");
Thread.Sleep(60000);
if (config.autoUpdateInterval <= 0)
{
continue;
}
updateHandle.UpdateGeoFile("geosite", config, (bool success, string msg) =>
{
_updateUI(false, msg);
if (success)
Utils.SaveLog("geosite" + msg);
});
Thread.Sleep(60000);
updateHandle.UpdateGeoFile("geoip", config, (bool success, string msg) =>
{
_updateUI(false, msg);
if (success)
Utils.SaveLog("geoip" + msg);
});
Thread.Sleep(60000 * config.autoUpdateInterval);
}
}
} }
} }

View file

@ -41,9 +41,8 @@ namespace v2rayN.Handler
{ {
_config = config; _config = config;
_updateFunc = update; _updateFunc = update;
var url = string.Empty;
DownloadHandle downloadHandle = null; DownloadHandle downloadHandle = null;
if (downloadHandle == null) if (downloadHandle == null)
{ {
downloadHandle = new DownloadHandle(); downloadHandle = new DownloadHandle();
@ -56,8 +55,7 @@ namespace v2rayN.Handler
try try
{ {
string fileName = Utils.GetPath(Utils.GetDownloadFileName(url)); string fileName = Utils.GetPath(Global.DownloadFileName);
fileName = Utils.UrlEncode(fileName);
Process process = new Process Process process = new Process
{ {
StartInfo = new ProcessStartInfo StartInfo = new ProcessStartInfo
@ -94,8 +92,8 @@ namespace v2rayN.Handler
{ {
_updateFunc(false, string.Format(UIRes.I18N("MsgParsingSuccessfully"), "v2rayN")); _updateFunc(false, string.Format(UIRes.I18N("MsgParsingSuccessfully"), "v2rayN"));
url = args.Msg; string url = args.Msg;
askToDownload(downloadHandle, url, true); askToDownload(downloadHandle, url);
} }
else else
{ {
@ -111,7 +109,6 @@ namespace v2rayN.Handler
{ {
_config = config; _config = config;
_updateFunc = update; _updateFunc = update;
var url = string.Empty;
DownloadHandle downloadHandle = null; DownloadHandle downloadHandle = null;
if (downloadHandle == null) if (downloadHandle == null)
@ -126,7 +123,7 @@ namespace v2rayN.Handler
try try
{ {
_updateFunc(true, url); _updateFunc(true, "");
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -149,8 +146,8 @@ namespace v2rayN.Handler
if (args.Success) if (args.Success)
{ {
_updateFunc(false, string.Format(UIRes.I18N("MsgParsingSuccessfully"), "Core")); _updateFunc(false, string.Format(UIRes.I18N("MsgParsingSuccessfully"), "Core"));
url = args.Msg; string url = args.Msg;
askToDownload(downloadHandle, url, true); askToDownload(downloadHandle, url);
} }
else else
{ {
@ -239,7 +236,6 @@ namespace v2rayN.Handler
{ {
_config = config; _config = config;
_updateFunc = update; _updateFunc = update;
var url = string.Format(geoUrl, geoName);
DownloadHandle downloadHandle = null; DownloadHandle downloadHandle = null;
if (downloadHandle == null) if (downloadHandle == null)
@ -254,7 +250,7 @@ namespace v2rayN.Handler
try try
{ {
string fileName = Utils.GetPath(Utils.GetDownloadFileName(url)); string fileName = Utils.GetPath(Global.DownloadFileName);
if (File.Exists(fileName)) if (File.Exists(fileName))
{ {
string targetPath = Utils.GetPath($"{geoName}.dat"); string targetPath = Utils.GetPath($"{geoName}.dat");
@ -282,7 +278,8 @@ namespace v2rayN.Handler
}; };
} }
askToDownload(downloadHandle, url, false); var url = string.Format(geoUrl, geoName);
askToDownload(downloadHandle, url);
} }
#region private #region private
@ -296,12 +293,6 @@ namespace v2rayN.Handler
{ {
AllowAutoRedirect = false AllowAutoRedirect = false
}; };
if (httpProxyTest() > 0)
{
int httpPort = _config.GetLocalPort(Global.InboundHttp);
WebProxy webProxy = new WebProxy(Global.Loopback, httpPort);
webRequestHandler.Proxy = webProxy;
}
HttpClient httpClient = new HttpClient(webRequestHandler); HttpClient httpClient = new HttpClient(webRequestHandler);
string url; string url;
@ -436,21 +427,9 @@ namespace v2rayN.Handler
} }
} }
private void askToDownload(DownloadHandle downloadHandle, string url, bool blAsk) private void askToDownload(DownloadHandle downloadHandle, string url)
{ {
bool blDownload = false; if (UI.ShowYesNo(string.Format(UIRes.I18N("DownloadYesNo"), url)) == DialogResult.Yes)
if (blAsk)
{
if (UI.ShowYesNo(string.Format(UIRes.I18N("DownloadYesNo"), url)) == DialogResult.Yes)
{
blDownload = true;
}
}
else
{
blDownload = true;
}
if (blDownload)
{ {
if (httpProxyTest() > 0) if (httpProxyTest() > 0)
{ {

View file

@ -197,10 +197,7 @@ namespace v2rayN.Handler
{ {
foreach (var item in config.routings[config.routingIndex].rules) foreach (var item in config.routings[config.routingIndex].rules)
{ {
if (item.enabled) routingUserRule(item, ref v2rayConfig);
{
routingUserRule(item, ref v2rayConfig);
}
} }
} }
} }

View file

@ -195,11 +195,6 @@ namespace v2rayN.Mode
get; set; get; set;
} }
public int autoUpdateInterval
{
get; set;
} = 0;
#region #region
public string address() public string address()

View file

@ -19,9 +19,7 @@ namespace v2rayN.Mode
public List<string> domain { get; set; } public List<string> domain { get; set; }
public List<string> protocol { get; set; } public List<string> protocol { get; set; }
public bool enabled { get; set; } = true;
} }
} }

View file

@ -34,7 +34,7 @@ namespace v2rayN
if (!IsDuplicateInstance()) if (!IsDuplicateInstance())
{ {
Utils.SaveLog($"v2rayN start up | {Utils.GetVersion()} | {Utils.GetExePath()}"); Utils.SaveLog("v2rayN start up " + Utils.GetVersion());
//设置语言环境 //设置语言环境
string lang = Utils.RegReadValue(Global.MyRegPath, Global.MyRegKeyLanguage, "zh-Hans"); string lang = Utils.RegReadValue(Global.MyRegPath, Global.MyRegKeyLanguage, "zh-Hans");
@ -82,7 +82,7 @@ namespace v2rayN
string name = Utils.GetExePath(); // Allow different locations to run string name = Utils.GetExePath(); // Allow different locations to run
name = name.Replace("\\", "/"); // https://stackoverflow.com/questions/20714120/could-not-find-a-part-of-the-path-error-while-creating-mutex name = name.Replace("\\", "/"); // https://stackoverflow.com/questions/20714120/could-not-find-a-part-of-the-path-error-while-creating-mutex
Global.mutexObj = new Mutex(false, name, out bool bCreatedNew); Global.mutexObj = new Mutex(false, name, out bool bCreatedNew);
return !bCreatedNew; return !bCreatedNew;
} }

View file

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

View file

@ -12,7 +12,7 @@ namespace v2rayN.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.3.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));

View file

@ -1,29 +0,0 @@
[
{
"outboundTag": "direct",
"protocol": [
"bittorrent"
]
},
{
"outboundTag": "block",
"domain": [
"geosite:category-ads-all"
]
},
{
"outboundTag": "proxy",
"ip": [
"geoip:telegram"
],
"domain": [
"geosite:gfw",
"geosite:greatfire",
"geosite:tld-!cn"
]
},
{
"port": "0-65535",
"outboundTag": "direct"
}
]

View file

@ -536,7 +536,7 @@ namespace v2rayN
try try
{ {
string exePath = GetExePath(); string exePath = GetExePath();
RegWriteValue(autoRunRegPath, autoRunName, run ? $"\"{exePath}\"" : ""); RegWriteValue(autoRunRegPath, autoRunName, run ? exePath : "");
} }
catch catch
{ {
@ -553,7 +553,7 @@ namespace v2rayN
{ {
string value = RegReadValue(autoRunRegPath, autoRunName, ""); string value = RegReadValue(autoRunRegPath, autoRunName, "");
string exePath = GetExePath(); string exePath = GetExePath();
if (value?.Equals(exePath) == true || value?.Equals($"\"{exePath}\"") == true) if (value?.Equals(exePath) == true)
{ {
return true; return true;
} }
@ -708,8 +708,7 @@ namespace v2rayN
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3
| SecurityProtocolType.Tls | SecurityProtocolType.Tls
| SecurityProtocolType.Tls11 | SecurityProtocolType.Tls11
| SecurityProtocolType.Tls12 | SecurityProtocolType.Tls12;
| SecurityProtocolType.Tls13;
ServicePointManager.DefaultConnectionLimit = 256; ServicePointManager.DefaultConnectionLimit = 256;
} }
#endregion #endregion
@ -833,14 +832,6 @@ namespace v2rayN
{ {
i.SubItems.Add(new ListViewItem.ListViewSubItem() { Name = name, Text = text }); i.SubItems.Add(new ListViewItem.ListViewSubItem() { Name = name, Text = text });
} }
public static string GetDownloadFileName(string url)
{
var fileName = System.IO.Path.GetFileName(url);
fileName += "_temp";
return fileName;
}
#endregion #endregion
#region TempPath #region TempPath

View file

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<configuration> <configuration>
<startup> <startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/>
</startup> </startup>
</configuration> </configuration>

View file

@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>v2rayN</RootNamespace> <RootNamespace>v2rayN</RootNamespace>
<AssemblyName>v2rayN</AssemblyName> <AssemblyName>v2rayN</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion> <TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
<IsWebBootstrapper>false</IsWebBootstrapper> <IsWebBootstrapper>false</IsWebBootstrapper>
@ -402,7 +402,6 @@
<EmbeddedResource Include="Sample\custom_routing_white" /> <EmbeddedResource Include="Sample\custom_routing_white" />
<EmbeddedResource Include="Sample\custom_routing_global" /> <EmbeddedResource Include="Sample\custom_routing_global" />
<EmbeddedResource Include="Sample\custom_routing_locked" /> <EmbeddedResource Include="Sample\custom_routing_locked" />
<EmbeddedResource Include="Sample\custom_routing_black" />
<Protobuf Include="Protos\Statistics.proto" /> <Protobuf Include="Protos\Statistics.proto" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<startup> <startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/>
</startup> </startup>
</configuration> </configuration>

View file

@ -3,7 +3,6 @@ using System.Diagnostics;
using System.IO; using System.IO;
using System.IO.Compression; using System.IO.Compression;
using System.Text; using System.Text;
using System.Web;
using System.Windows.Forms; using System.Windows.Forms;
namespace v2rayUpgrade namespace v2rayUpgrade
@ -18,8 +17,7 @@ namespace v2rayUpgrade
InitializeComponent(); InitializeComponent();
if (args.Length > 0) if (args.Length > 0)
{ {
fileName = string.Join(" ", args); fileName = args[0];
fileName = HttpUtility.UrlDecode(fileName);
} }
} }
private void showWarn(string message) private void showWarn(string message)

View file

@ -19,7 +19,7 @@ namespace v2rayUpgrade.Properties {
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。 // (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources { internal class Resources {

View file

@ -12,7 +12,7 @@ namespace v2rayUpgrade.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.3.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));

View file

@ -8,7 +8,7 @@
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<RootNamespace>v2rayUpgrade</RootNamespace> <RootNamespace>v2rayUpgrade</RootNamespace>
<AssemblyName>v2rayUpgrade</AssemblyName> <AssemblyName>v2rayUpgrade</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion> <TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic> <Deterministic>true</Deterministic>
@ -39,7 +39,6 @@
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.IO.Compression" /> <Reference Include="System.IO.Compression" />
<Reference Include="System.IO.Compression.FileSystem" /> <Reference Include="System.IO.Compression.FileSystem" />
<Reference Include="System.Web" />
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<StartArguments>C:\Githubb\v2rayN\v2rayN\v2rayUpgrade\bin\Debug\v2ray-windows.zip</StartArguments> <StartArguments>D:\Github\v2rayN\v2rayN\v2rayUpgrade\bin\Debug\v2ray-windows.zip</StartArguments>
</PropertyGroup> </PropertyGroup>
</Project> </Project>