mirror of
https://github.com/2dust/v2rayN.git
synced 2025-07-01 12:32:10 +00:00
up4.16
This commit is contained in:
parent
4d872e9143
commit
7513ff860b
12 changed files with 2041 additions and 1746 deletions
204
v2rayN/v2rayN/Forms/MainForm.Designer.cs
generated
204
v2rayN/v2rayN/Forms/MainForm.Designer.cs
generated
|
@ -129,6 +129,9 @@
|
||||||
this.tsbPromotion = new System.Windows.Forms.ToolStripButton();
|
this.tsbPromotion = new System.Windows.Forms.ToolStripButton();
|
||||||
this.toolStripSeparator11 = new System.Windows.Forms.ToolStripSeparator();
|
this.toolStripSeparator11 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
this.tsbClose = new System.Windows.Forms.ToolStripButton();
|
this.tsbClose = new System.Windows.Forms.ToolStripButton();
|
||||||
|
this.tsbCheckUpdateGeoSite = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.tsbCheckUpdateGeoIP = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.toolStripSeparator15 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.scMain)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.scMain)).BeginInit();
|
||||||
this.scMain.Panel1.SuspendLayout();
|
this.scMain.Panel1.SuspendLayout();
|
||||||
this.scMain.Panel2.SuspendLayout();
|
this.scMain.Panel2.SuspendLayout();
|
||||||
|
@ -150,19 +153,17 @@
|
||||||
//
|
//
|
||||||
// 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
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.lvServers, "lvServers");
|
|
||||||
this.lvServers.ContextMenuStrip = this.cmsLv;
|
this.lvServers.ContextMenuStrip = this.cmsLv;
|
||||||
|
resources.ApplyResources(this.lvServers, "lvServers");
|
||||||
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;
|
||||||
|
@ -181,7 +182,6 @@
|
||||||
//
|
//
|
||||||
// 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,
|
||||||
|
@ -217,194 +217,195 @@
|
||||||
this.menuExport2SubContent});
|
this.menuExport2SubContent});
|
||||||
this.cmsLv.Name = "cmsLv";
|
this.cmsLv.Name = "cmsLv";
|
||||||
this.cmsLv.OwnerItem = this.tsbServer;
|
this.cmsLv.OwnerItem = this.tsbServer;
|
||||||
|
resources.ApplyResources(this.cmsLv, "cmsLv");
|
||||||
//
|
//
|
||||||
// menuAddVmessServer
|
// menuAddVmessServer
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.menuAddVmessServer, "menuAddVmessServer");
|
|
||||||
this.menuAddVmessServer.Name = "menuAddVmessServer";
|
this.menuAddVmessServer.Name = "menuAddVmessServer";
|
||||||
|
resources.ApplyResources(this.menuAddVmessServer, "menuAddVmessServer");
|
||||||
this.menuAddVmessServer.Click += new System.EventHandler(this.menuAddVmessServer_Click);
|
this.menuAddVmessServer.Click += new System.EventHandler(this.menuAddVmessServer_Click);
|
||||||
//
|
//
|
||||||
// menuAddVlessServer
|
// menuAddVlessServer
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.menuAddVlessServer, "menuAddVlessServer");
|
|
||||||
this.menuAddVlessServer.Name = "menuAddVlessServer";
|
this.menuAddVlessServer.Name = "menuAddVlessServer";
|
||||||
|
resources.ApplyResources(this.menuAddVlessServer, "menuAddVlessServer");
|
||||||
this.menuAddVlessServer.Click += new System.EventHandler(this.menuAddVlessServer_Click);
|
this.menuAddVlessServer.Click += new System.EventHandler(this.menuAddVlessServer_Click);
|
||||||
//
|
//
|
||||||
// menuAddShadowsocksServer
|
// menuAddShadowsocksServer
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.menuAddShadowsocksServer, "menuAddShadowsocksServer");
|
|
||||||
this.menuAddShadowsocksServer.Name = "menuAddShadowsocksServer";
|
this.menuAddShadowsocksServer.Name = "menuAddShadowsocksServer";
|
||||||
|
resources.ApplyResources(this.menuAddShadowsocksServer, "menuAddShadowsocksServer");
|
||||||
this.menuAddShadowsocksServer.Click += new System.EventHandler(this.menuAddShadowsocksServer_Click);
|
this.menuAddShadowsocksServer.Click += new System.EventHandler(this.menuAddShadowsocksServer_Click);
|
||||||
//
|
//
|
||||||
// menuAddSocksServer
|
// menuAddSocksServer
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.menuAddSocksServer, "menuAddSocksServer");
|
|
||||||
this.menuAddSocksServer.Name = "menuAddSocksServer";
|
this.menuAddSocksServer.Name = "menuAddSocksServer";
|
||||||
|
resources.ApplyResources(this.menuAddSocksServer, "menuAddSocksServer");
|
||||||
this.menuAddSocksServer.Click += new System.EventHandler(this.menuAddSocksServer_Click);
|
this.menuAddSocksServer.Click += new System.EventHandler(this.menuAddSocksServer_Click);
|
||||||
//
|
//
|
||||||
// menuAddTrojanServer
|
// menuAddTrojanServer
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.menuAddTrojanServer, "menuAddTrojanServer");
|
|
||||||
this.menuAddTrojanServer.Name = "menuAddTrojanServer";
|
this.menuAddTrojanServer.Name = "menuAddTrojanServer";
|
||||||
|
resources.ApplyResources(this.menuAddTrojanServer, "menuAddTrojanServer");
|
||||||
this.menuAddTrojanServer.Click += new System.EventHandler(this.menuAddTrojanServer_Click);
|
this.menuAddTrojanServer.Click += new System.EventHandler(this.menuAddTrojanServer_Click);
|
||||||
//
|
//
|
||||||
// menuAddCustomServer
|
// menuAddCustomServer
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.menuAddCustomServer, "menuAddCustomServer");
|
|
||||||
this.menuAddCustomServer.Name = "menuAddCustomServer";
|
this.menuAddCustomServer.Name = "menuAddCustomServer";
|
||||||
|
resources.ApplyResources(this.menuAddCustomServer, "menuAddCustomServer");
|
||||||
this.menuAddCustomServer.Click += new System.EventHandler(this.menuAddCustomServer_Click);
|
this.menuAddCustomServer.Click += new System.EventHandler(this.menuAddCustomServer_Click);
|
||||||
//
|
//
|
||||||
// menuAddServers
|
// menuAddServers
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.menuAddServers, "menuAddServers");
|
|
||||||
this.menuAddServers.Name = "menuAddServers";
|
this.menuAddServers.Name = "menuAddServers";
|
||||||
|
resources.ApplyResources(this.menuAddServers, "menuAddServers");
|
||||||
this.menuAddServers.Click += new System.EventHandler(this.menuAddServers_Click);
|
this.menuAddServers.Click += new System.EventHandler(this.menuAddServers_Click);
|
||||||
//
|
//
|
||||||
// menuScanScreen
|
// menuScanScreen
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.menuScanScreen, "menuScanScreen");
|
|
||||||
this.menuScanScreen.Name = "menuScanScreen";
|
this.menuScanScreen.Name = "menuScanScreen";
|
||||||
|
resources.ApplyResources(this.menuScanScreen, "menuScanScreen");
|
||||||
this.menuScanScreen.Click += new System.EventHandler(this.menuScanScreen_Click);
|
this.menuScanScreen.Click += new System.EventHandler(this.menuScanScreen_Click);
|
||||||
//
|
//
|
||||||
// toolStripSeparator1
|
// toolStripSeparator1
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.toolStripSeparator1, "toolStripSeparator1");
|
|
||||||
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
||||||
|
resources.ApplyResources(this.toolStripSeparator1, "toolStripSeparator1");
|
||||||
//
|
//
|
||||||
// menuRemoveServer
|
// menuRemoveServer
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.menuRemoveServer, "menuRemoveServer");
|
|
||||||
this.menuRemoveServer.Name = "menuRemoveServer";
|
this.menuRemoveServer.Name = "menuRemoveServer";
|
||||||
|
resources.ApplyResources(this.menuRemoveServer, "menuRemoveServer");
|
||||||
this.menuRemoveServer.Click += new System.EventHandler(this.menuRemoveServer_Click);
|
this.menuRemoveServer.Click += new System.EventHandler(this.menuRemoveServer_Click);
|
||||||
//
|
//
|
||||||
// menuRemoveDuplicateServer
|
// menuRemoveDuplicateServer
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.menuRemoveDuplicateServer, "menuRemoveDuplicateServer");
|
|
||||||
this.menuRemoveDuplicateServer.Name = "menuRemoveDuplicateServer";
|
this.menuRemoveDuplicateServer.Name = "menuRemoveDuplicateServer";
|
||||||
|
resources.ApplyResources(this.menuRemoveDuplicateServer, "menuRemoveDuplicateServer");
|
||||||
this.menuRemoveDuplicateServer.Click += new System.EventHandler(this.menuRemoveDuplicateServer_Click);
|
this.menuRemoveDuplicateServer.Click += new System.EventHandler(this.menuRemoveDuplicateServer_Click);
|
||||||
//
|
//
|
||||||
// menuCopyServer
|
// menuCopyServer
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.menuCopyServer, "menuCopyServer");
|
|
||||||
this.menuCopyServer.Name = "menuCopyServer";
|
this.menuCopyServer.Name = "menuCopyServer";
|
||||||
|
resources.ApplyResources(this.menuCopyServer, "menuCopyServer");
|
||||||
this.menuCopyServer.Click += new System.EventHandler(this.menuCopyServer_Click);
|
this.menuCopyServer.Click += new System.EventHandler(this.menuCopyServer_Click);
|
||||||
//
|
//
|
||||||
// menuSetDefaultServer
|
// menuSetDefaultServer
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.menuSetDefaultServer, "menuSetDefaultServer");
|
|
||||||
this.menuSetDefaultServer.Name = "menuSetDefaultServer";
|
this.menuSetDefaultServer.Name = "menuSetDefaultServer";
|
||||||
|
resources.ApplyResources(this.menuSetDefaultServer, "menuSetDefaultServer");
|
||||||
this.menuSetDefaultServer.Click += new System.EventHandler(this.menuSetDefaultServer_Click);
|
this.menuSetDefaultServer.Click += new System.EventHandler(this.menuSetDefaultServer_Click);
|
||||||
//
|
//
|
||||||
// toolStripSeparator3
|
// toolStripSeparator3
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.toolStripSeparator3, "toolStripSeparator3");
|
|
||||||
this.toolStripSeparator3.Name = "toolStripSeparator3";
|
this.toolStripSeparator3.Name = "toolStripSeparator3";
|
||||||
|
resources.ApplyResources(this.toolStripSeparator3, "toolStripSeparator3");
|
||||||
//
|
//
|
||||||
// menuMoveTop
|
// menuMoveTop
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.menuMoveTop, "menuMoveTop");
|
|
||||||
this.menuMoveTop.Name = "menuMoveTop";
|
this.menuMoveTop.Name = "menuMoveTop";
|
||||||
|
resources.ApplyResources(this.menuMoveTop, "menuMoveTop");
|
||||||
this.menuMoveTop.Click += new System.EventHandler(this.menuMoveTop_Click);
|
this.menuMoveTop.Click += new System.EventHandler(this.menuMoveTop_Click);
|
||||||
//
|
//
|
||||||
// menuMoveUp
|
// menuMoveUp
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.menuMoveUp, "menuMoveUp");
|
|
||||||
this.menuMoveUp.Name = "menuMoveUp";
|
this.menuMoveUp.Name = "menuMoveUp";
|
||||||
|
resources.ApplyResources(this.menuMoveUp, "menuMoveUp");
|
||||||
this.menuMoveUp.Click += new System.EventHandler(this.menuMoveUp_Click);
|
this.menuMoveUp.Click += new System.EventHandler(this.menuMoveUp_Click);
|
||||||
//
|
//
|
||||||
// menuMoveDown
|
// menuMoveDown
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.menuMoveDown, "menuMoveDown");
|
|
||||||
this.menuMoveDown.Name = "menuMoveDown";
|
this.menuMoveDown.Name = "menuMoveDown";
|
||||||
|
resources.ApplyResources(this.menuMoveDown, "menuMoveDown");
|
||||||
this.menuMoveDown.Click += new System.EventHandler(this.menuMoveDown_Click);
|
this.menuMoveDown.Click += new System.EventHandler(this.menuMoveDown_Click);
|
||||||
//
|
//
|
||||||
// menuMoveBottom
|
// menuMoveBottom
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.menuMoveBottom, "menuMoveBottom");
|
|
||||||
this.menuMoveBottom.Name = "menuMoveBottom";
|
this.menuMoveBottom.Name = "menuMoveBottom";
|
||||||
|
resources.ApplyResources(this.menuMoveBottom, "menuMoveBottom");
|
||||||
this.menuMoveBottom.Click += new System.EventHandler(this.menuMoveBottom_Click);
|
this.menuMoveBottom.Click += new System.EventHandler(this.menuMoveBottom_Click);
|
||||||
//
|
//
|
||||||
// menuSelectAll
|
// menuSelectAll
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.menuSelectAll, "menuSelectAll");
|
|
||||||
this.menuSelectAll.Name = "menuSelectAll";
|
this.menuSelectAll.Name = "menuSelectAll";
|
||||||
|
resources.ApplyResources(this.menuSelectAll, "menuSelectAll");
|
||||||
this.menuSelectAll.Click += new System.EventHandler(this.menuSelectAll_Click);
|
this.menuSelectAll.Click += new System.EventHandler(this.menuSelectAll_Click);
|
||||||
//
|
//
|
||||||
// toolStripSeparator9
|
// toolStripSeparator9
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.toolStripSeparator9, "toolStripSeparator9");
|
|
||||||
this.toolStripSeparator9.Name = "toolStripSeparator9";
|
this.toolStripSeparator9.Name = "toolStripSeparator9";
|
||||||
|
resources.ApplyResources(this.toolStripSeparator9, "toolStripSeparator9");
|
||||||
//
|
//
|
||||||
// menuPingServer
|
// menuPingServer
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.menuPingServer, "menuPingServer");
|
|
||||||
this.menuPingServer.Name = "menuPingServer";
|
this.menuPingServer.Name = "menuPingServer";
|
||||||
|
resources.ApplyResources(this.menuPingServer, "menuPingServer");
|
||||||
this.menuPingServer.Click += new System.EventHandler(this.menuPingServer_Click);
|
this.menuPingServer.Click += new System.EventHandler(this.menuPingServer_Click);
|
||||||
//
|
//
|
||||||
// menuTcpingServer
|
// menuTcpingServer
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.menuTcpingServer, "menuTcpingServer");
|
|
||||||
this.menuTcpingServer.Name = "menuTcpingServer";
|
this.menuTcpingServer.Name = "menuTcpingServer";
|
||||||
|
resources.ApplyResources(this.menuTcpingServer, "menuTcpingServer");
|
||||||
this.menuTcpingServer.Click += new System.EventHandler(this.menuTcpingServer_Click);
|
this.menuTcpingServer.Click += new System.EventHandler(this.menuTcpingServer_Click);
|
||||||
//
|
//
|
||||||
// menuRealPingServer
|
// menuRealPingServer
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.menuRealPingServer, "menuRealPingServer");
|
|
||||||
this.menuRealPingServer.Name = "menuRealPingServer";
|
this.menuRealPingServer.Name = "menuRealPingServer";
|
||||||
|
resources.ApplyResources(this.menuRealPingServer, "menuRealPingServer");
|
||||||
this.menuRealPingServer.Click += new System.EventHandler(this.menuRealPingServer_Click);
|
this.menuRealPingServer.Click += new System.EventHandler(this.menuRealPingServer_Click);
|
||||||
//
|
//
|
||||||
// menuSpeedServer
|
// menuSpeedServer
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.menuSpeedServer, "menuSpeedServer");
|
|
||||||
this.menuSpeedServer.Name = "menuSpeedServer";
|
this.menuSpeedServer.Name = "menuSpeedServer";
|
||||||
|
resources.ApplyResources(this.menuSpeedServer, "menuSpeedServer");
|
||||||
this.menuSpeedServer.Click += new System.EventHandler(this.menuSpeedServer_Click);
|
this.menuSpeedServer.Click += new System.EventHandler(this.menuSpeedServer_Click);
|
||||||
//
|
//
|
||||||
// tsbTestMe
|
// tsbTestMe
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.tsbTestMe, "tsbTestMe");
|
|
||||||
this.tsbTestMe.Name = "tsbTestMe";
|
this.tsbTestMe.Name = "tsbTestMe";
|
||||||
|
resources.ApplyResources(this.tsbTestMe, "tsbTestMe");
|
||||||
this.tsbTestMe.Click += new System.EventHandler(this.tsbTestMe_Click);
|
this.tsbTestMe.Click += new System.EventHandler(this.tsbTestMe_Click);
|
||||||
//
|
//
|
||||||
// menuClearServerStatistics
|
// menuClearServerStatistics
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.menuClearServerStatistics, "menuClearServerStatistics");
|
|
||||||
this.menuClearServerStatistics.Name = "menuClearServerStatistics";
|
this.menuClearServerStatistics.Name = "menuClearServerStatistics";
|
||||||
|
resources.ApplyResources(this.menuClearServerStatistics, "menuClearServerStatistics");
|
||||||
this.menuClearServerStatistics.Click += new System.EventHandler(this.menuClearStatistic_Click);
|
this.menuClearServerStatistics.Click += new System.EventHandler(this.menuClearStatistic_Click);
|
||||||
//
|
//
|
||||||
// toolStripSeparator6
|
// toolStripSeparator6
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.toolStripSeparator6, "toolStripSeparator6");
|
|
||||||
this.toolStripSeparator6.Name = "toolStripSeparator6";
|
this.toolStripSeparator6.Name = "toolStripSeparator6";
|
||||||
|
resources.ApplyResources(this.toolStripSeparator6, "toolStripSeparator6");
|
||||||
//
|
//
|
||||||
// menuExport2ClientConfig
|
// menuExport2ClientConfig
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.menuExport2ClientConfig, "menuExport2ClientConfig");
|
|
||||||
this.menuExport2ClientConfig.Name = "menuExport2ClientConfig";
|
this.menuExport2ClientConfig.Name = "menuExport2ClientConfig";
|
||||||
|
resources.ApplyResources(this.menuExport2ClientConfig, "menuExport2ClientConfig");
|
||||||
this.menuExport2ClientConfig.Click += new System.EventHandler(this.menuExport2ClientConfig_Click);
|
this.menuExport2ClientConfig.Click += new System.EventHandler(this.menuExport2ClientConfig_Click);
|
||||||
//
|
//
|
||||||
// menuExport2ServerConfig
|
// menuExport2ServerConfig
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.menuExport2ServerConfig, "menuExport2ServerConfig");
|
|
||||||
this.menuExport2ServerConfig.Name = "menuExport2ServerConfig";
|
this.menuExport2ServerConfig.Name = "menuExport2ServerConfig";
|
||||||
|
resources.ApplyResources(this.menuExport2ServerConfig, "menuExport2ServerConfig");
|
||||||
this.menuExport2ServerConfig.Click += new System.EventHandler(this.menuExport2ServerConfig_Click);
|
this.menuExport2ServerConfig.Click += new System.EventHandler(this.menuExport2ServerConfig_Click);
|
||||||
//
|
//
|
||||||
// menuExport2ShareUrl
|
// menuExport2ShareUrl
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.menuExport2ShareUrl, "menuExport2ShareUrl");
|
|
||||||
this.menuExport2ShareUrl.Name = "menuExport2ShareUrl";
|
this.menuExport2ShareUrl.Name = "menuExport2ShareUrl";
|
||||||
|
resources.ApplyResources(this.menuExport2ShareUrl, "menuExport2ShareUrl");
|
||||||
this.menuExport2ShareUrl.Click += new System.EventHandler(this.menuExport2ShareUrl_Click);
|
this.menuExport2ShareUrl.Click += new System.EventHandler(this.menuExport2ShareUrl_Click);
|
||||||
//
|
//
|
||||||
// menuExport2SubContent
|
// menuExport2SubContent
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.menuExport2SubContent, "menuExport2SubContent");
|
|
||||||
this.menuExport2SubContent.Name = "menuExport2SubContent";
|
this.menuExport2SubContent.Name = "menuExport2SubContent";
|
||||||
|
resources.ApplyResources(this.menuExport2SubContent, "menuExport2SubContent");
|
||||||
this.menuExport2SubContent.Click += new System.EventHandler(this.menuExport2SubContent_Click);
|
this.menuExport2SubContent.Click += new System.EventHandler(this.menuExport2SubContent_Click);
|
||||||
//
|
//
|
||||||
// tsbServer
|
// 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
|
||||||
|
@ -414,14 +415,14 @@
|
||||||
//
|
//
|
||||||
// notifyMain
|
// notifyMain
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.notifyMain, "notifyMain");
|
|
||||||
this.notifyMain.ContextMenuStrip = this.cmsMain;
|
this.notifyMain.ContextMenuStrip = this.cmsMain;
|
||||||
|
resources.ApplyResources(this.notifyMain, "notifyMain");
|
||||||
this.notifyMain.MouseClick += new System.Windows.Forms.MouseEventHandler(this.notifyMain_MouseClick);
|
this.notifyMain.MouseClick += new System.Windows.Forms.MouseEventHandler(this.notifyMain_MouseClick);
|
||||||
//
|
//
|
||||||
// cmsMain
|
// cmsMain
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.cmsMain, "cmsMain");
|
|
||||||
this.cmsMain.ImageScalingSize = new System.Drawing.Size(20, 20);
|
this.cmsMain.ImageScalingSize = new System.Drawing.Size(20, 20);
|
||||||
|
resources.ApplyResources(this.cmsMain, "cmsMain");
|
||||||
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,
|
||||||
|
@ -439,73 +440,73 @@
|
||||||
//
|
//
|
||||||
// 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
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.menuKeepClear, "menuKeepClear");
|
|
||||||
this.menuKeepClear.Name = "menuKeepClear";
|
this.menuKeepClear.Name = "menuKeepClear";
|
||||||
|
resources.ApplyResources(this.menuKeepClear, "menuKeepClear");
|
||||||
this.menuKeepClear.Click += new System.EventHandler(this.menuKeepClear_Click);
|
this.menuKeepClear.Click += new System.EventHandler(this.menuKeepClear_Click);
|
||||||
//
|
//
|
||||||
// menuGlobal
|
// menuGlobal
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.menuGlobal, "menuGlobal");
|
|
||||||
this.menuGlobal.Name = "menuGlobal";
|
this.menuGlobal.Name = "menuGlobal";
|
||||||
|
resources.ApplyResources(this.menuGlobal, "menuGlobal");
|
||||||
this.menuGlobal.Click += new System.EventHandler(this.menuGlobal_Click);
|
this.menuGlobal.Click += new System.EventHandler(this.menuGlobal_Click);
|
||||||
//
|
//
|
||||||
// menuKeepNothing
|
// menuKeepNothing
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.menuKeepNothing, "menuKeepNothing");
|
|
||||||
this.menuKeepNothing.Name = "menuKeepNothing";
|
this.menuKeepNothing.Name = "menuKeepNothing";
|
||||||
|
resources.ApplyResources(this.menuKeepNothing, "menuKeepNothing");
|
||||||
this.menuKeepNothing.Click += new System.EventHandler(this.menuKeepNothing_Click);
|
this.menuKeepNothing.Click += new System.EventHandler(this.menuKeepNothing_Click);
|
||||||
//
|
//
|
||||||
// menuRoutings
|
// menuRoutings
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.menuRoutings, "menuRoutings");
|
|
||||||
this.menuRoutings.Name = "menuRoutings";
|
this.menuRoutings.Name = "menuRoutings";
|
||||||
|
resources.ApplyResources(this.menuRoutings, "menuRoutings");
|
||||||
//
|
//
|
||||||
// menuServers
|
// menuServers
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.menuServers, "menuServers");
|
|
||||||
this.menuServers.Name = "menuServers";
|
this.menuServers.Name = "menuServers";
|
||||||
|
resources.ApplyResources(this.menuServers, "menuServers");
|
||||||
//
|
//
|
||||||
// toolStripSeparator13
|
// toolStripSeparator13
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.toolStripSeparator13, "toolStripSeparator13");
|
|
||||||
this.toolStripSeparator13.Name = "toolStripSeparator13";
|
this.toolStripSeparator13.Name = "toolStripSeparator13";
|
||||||
|
resources.ApplyResources(this.toolStripSeparator13, "toolStripSeparator13");
|
||||||
//
|
//
|
||||||
// menuAddServers2
|
// menuAddServers2
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.menuAddServers2, "menuAddServers2");
|
|
||||||
this.menuAddServers2.Name = "menuAddServers2";
|
this.menuAddServers2.Name = "menuAddServers2";
|
||||||
|
resources.ApplyResources(this.menuAddServers2, "menuAddServers2");
|
||||||
this.menuAddServers2.Click += new System.EventHandler(this.menuAddServers_Click);
|
this.menuAddServers2.Click += new System.EventHandler(this.menuAddServers_Click);
|
||||||
//
|
//
|
||||||
// menuScanScreen2
|
// menuScanScreen2
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.menuScanScreen2, "menuScanScreen2");
|
|
||||||
this.menuScanScreen2.Name = "menuScanScreen2";
|
this.menuScanScreen2.Name = "menuScanScreen2";
|
||||||
|
resources.ApplyResources(this.menuScanScreen2, "menuScanScreen2");
|
||||||
this.menuScanScreen2.Click += new System.EventHandler(this.menuScanScreen_Click);
|
this.menuScanScreen2.Click += new System.EventHandler(this.menuScanScreen_Click);
|
||||||
//
|
//
|
||||||
// menuUpdateSubscriptions
|
// menuUpdateSubscriptions
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.menuUpdateSubscriptions, "menuUpdateSubscriptions");
|
|
||||||
this.menuUpdateSubscriptions.Name = "menuUpdateSubscriptions";
|
this.menuUpdateSubscriptions.Name = "menuUpdateSubscriptions";
|
||||||
|
resources.ApplyResources(this.menuUpdateSubscriptions, "menuUpdateSubscriptions");
|
||||||
this.menuUpdateSubscriptions.Click += new System.EventHandler(this.menuUpdateSubscriptions_Click);
|
this.menuUpdateSubscriptions.Click += new System.EventHandler(this.menuUpdateSubscriptions_Click);
|
||||||
//
|
//
|
||||||
// toolStripSeparator2
|
// toolStripSeparator2
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.toolStripSeparator2, "toolStripSeparator2");
|
|
||||||
this.toolStripSeparator2.Name = "toolStripSeparator2";
|
this.toolStripSeparator2.Name = "toolStripSeparator2";
|
||||||
|
resources.ApplyResources(this.toolStripSeparator2, "toolStripSeparator2");
|
||||||
//
|
//
|
||||||
// menuExit
|
// menuExit
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.menuExit, "menuExit");
|
|
||||||
this.menuExit.Name = "menuExit";
|
this.menuExit.Name = "menuExit";
|
||||||
|
resources.ApplyResources(this.menuExit, "menuExit");
|
||||||
this.menuExit.Click += new System.EventHandler(this.menuExit_Click);
|
this.menuExit.Click += new System.EventHandler(this.menuExit_Click);
|
||||||
//
|
//
|
||||||
// bgwScan
|
// bgwScan
|
||||||
|
@ -516,25 +517,25 @@
|
||||||
//
|
//
|
||||||
// groupBox1
|
// groupBox1
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.groupBox1, "groupBox1");
|
|
||||||
this.groupBox1.Controls.Add(this.scMain);
|
this.groupBox1.Controls.Add(this.scMain);
|
||||||
|
resources.ApplyResources(this.groupBox1, "groupBox1");
|
||||||
this.groupBox1.Name = "groupBox1";
|
this.groupBox1.Name = "groupBox1";
|
||||||
this.groupBox1.TabStop = false;
|
this.groupBox1.TabStop = false;
|
||||||
//
|
//
|
||||||
// groupBox2
|
// groupBox2
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.groupBox2, "groupBox2");
|
|
||||||
this.groupBox2.Controls.Add(this.txtMsgBox);
|
this.groupBox2.Controls.Add(this.txtMsgBox);
|
||||||
this.groupBox2.Controls.Add(this.ssMain);
|
this.groupBox2.Controls.Add(this.ssMain);
|
||||||
|
resources.ApplyResources(this.groupBox2, "groupBox2");
|
||||||
this.groupBox2.Name = "groupBox2";
|
this.groupBox2.Name = "groupBox2";
|
||||||
this.groupBox2.TabStop = false;
|
this.groupBox2.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;
|
||||||
|
@ -542,41 +543,40 @@
|
||||||
//
|
//
|
||||||
// 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,
|
||||||
this.menuMsgBoxCopyAll,
|
this.menuMsgBoxCopyAll,
|
||||||
this.menuMsgBoxAddRoutingRule});
|
this.menuMsgBoxAddRoutingRule});
|
||||||
this.cmsMsgBox.Name = "cmsMsgBox";
|
this.cmsMsgBox.Name = "cmsMsgBox";
|
||||||
|
resources.ApplyResources(this.cmsMsgBox, "cmsMsgBox");
|
||||||
//
|
//
|
||||||
// menuMsgBoxSelectAll
|
// menuMsgBoxSelectAll
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.menuMsgBoxSelectAll, "menuMsgBoxSelectAll");
|
|
||||||
this.menuMsgBoxSelectAll.Name = "menuMsgBoxSelectAll";
|
this.menuMsgBoxSelectAll.Name = "menuMsgBoxSelectAll";
|
||||||
|
resources.ApplyResources(this.menuMsgBoxSelectAll, "menuMsgBoxSelectAll");
|
||||||
this.menuMsgBoxSelectAll.Click += new System.EventHandler(this.menuMsgBoxSelectAll_Click);
|
this.menuMsgBoxSelectAll.Click += new System.EventHandler(this.menuMsgBoxSelectAll_Click);
|
||||||
//
|
//
|
||||||
// menuMsgBoxCopy
|
// menuMsgBoxCopy
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.menuMsgBoxCopy, "menuMsgBoxCopy");
|
|
||||||
this.menuMsgBoxCopy.Name = "menuMsgBoxCopy";
|
this.menuMsgBoxCopy.Name = "menuMsgBoxCopy";
|
||||||
|
resources.ApplyResources(this.menuMsgBoxCopy, "menuMsgBoxCopy");
|
||||||
this.menuMsgBoxCopy.Click += new System.EventHandler(this.menuMsgBoxCopy_Click);
|
this.menuMsgBoxCopy.Click += new System.EventHandler(this.menuMsgBoxCopy_Click);
|
||||||
//
|
//
|
||||||
// menuMsgBoxCopyAll
|
// menuMsgBoxCopyAll
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.menuMsgBoxCopyAll, "menuMsgBoxCopyAll");
|
|
||||||
this.menuMsgBoxCopyAll.Name = "menuMsgBoxCopyAll";
|
this.menuMsgBoxCopyAll.Name = "menuMsgBoxCopyAll";
|
||||||
|
resources.ApplyResources(this.menuMsgBoxCopyAll, "menuMsgBoxCopyAll");
|
||||||
this.menuMsgBoxCopyAll.Click += new System.EventHandler(this.menuMsgBoxCopyAll_Click);
|
this.menuMsgBoxCopyAll.Click += new System.EventHandler(this.menuMsgBoxCopyAll_Click);
|
||||||
//
|
//
|
||||||
// menuMsgBoxAddRoutingRule
|
// menuMsgBoxAddRoutingRule
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.menuMsgBoxAddRoutingRule, "menuMsgBoxAddRoutingRule");
|
|
||||||
this.menuMsgBoxAddRoutingRule.Name = "menuMsgBoxAddRoutingRule";
|
this.menuMsgBoxAddRoutingRule.Name = "menuMsgBoxAddRoutingRule";
|
||||||
|
resources.ApplyResources(this.menuMsgBoxAddRoutingRule, "menuMsgBoxAddRoutingRule");
|
||||||
this.menuMsgBoxAddRoutingRule.Click += new System.EventHandler(this.menuMsgBoxAddRoutingRule_Click);
|
this.menuMsgBoxAddRoutingRule.Click += new System.EventHandler(this.menuMsgBoxAddRoutingRule_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,
|
||||||
|
@ -588,6 +588,7 @@
|
||||||
this.toolSslBlank3,
|
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);
|
||||||
//
|
//
|
||||||
|
@ -598,8 +599,8 @@
|
||||||
//
|
//
|
||||||
// toolSslSocksPort
|
// toolSslSocksPort
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.toolSslSocksPort, "toolSslSocksPort");
|
|
||||||
this.toolSslSocksPort.Name = "toolSslSocksPort";
|
this.toolSslSocksPort.Name = "toolSslSocksPort";
|
||||||
|
resources.ApplyResources(this.toolSslSocksPort, "toolSslSocksPort");
|
||||||
//
|
//
|
||||||
// toolSslBlank1
|
// toolSslBlank1
|
||||||
//
|
//
|
||||||
|
@ -614,8 +615,8 @@
|
||||||
//
|
//
|
||||||
// toolSslHttpPort
|
// toolSslHttpPort
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.toolSslHttpPort, "toolSslHttpPort");
|
|
||||||
this.toolSslHttpPort.Name = "toolSslHttpPort";
|
this.toolSslHttpPort.Name = "toolSslHttpPort";
|
||||||
|
resources.ApplyResources(this.toolSslHttpPort, "toolSslHttpPort");
|
||||||
//
|
//
|
||||||
// toolSslBlank2
|
// toolSslBlank2
|
||||||
//
|
//
|
||||||
|
@ -637,8 +638,8 @@
|
||||||
//
|
//
|
||||||
// toolSslBlank4
|
// toolSslBlank4
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.toolSslBlank4, "toolSslBlank4");
|
|
||||||
this.toolSslBlank4.Name = "toolSslBlank4";
|
this.toolSslBlank4.Name = "toolSslBlank4";
|
||||||
|
resources.ApplyResources(this.toolSslBlank4, "toolSslBlank4");
|
||||||
//
|
//
|
||||||
// panel1
|
// panel1
|
||||||
//
|
//
|
||||||
|
@ -647,7 +648,6 @@
|
||||||
//
|
//
|
||||||
// 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,
|
||||||
|
@ -665,87 +665,88 @@
|
||||||
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
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.toolStripSeparator4, "toolStripSeparator4");
|
|
||||||
this.toolStripSeparator4.Name = "toolStripSeparator4";
|
this.toolStripSeparator4.Name = "toolStripSeparator4";
|
||||||
|
resources.ApplyResources(this.toolStripSeparator4, "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
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.tsbSubSetting, "tsbSubSetting");
|
|
||||||
this.tsbSubSetting.Name = "tsbSubSetting";
|
this.tsbSubSetting.Name = "tsbSubSetting";
|
||||||
|
resources.ApplyResources(this.tsbSubSetting, "tsbSubSetting");
|
||||||
this.tsbSubSetting.Click += new System.EventHandler(this.tsbSubSetting_Click);
|
this.tsbSubSetting.Click += new System.EventHandler(this.tsbSubSetting_Click);
|
||||||
//
|
//
|
||||||
// tsbSubUpdate
|
// tsbSubUpdate
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.tsbSubUpdate, "tsbSubUpdate");
|
|
||||||
this.tsbSubUpdate.Name = "tsbSubUpdate";
|
this.tsbSubUpdate.Name = "tsbSubUpdate";
|
||||||
|
resources.ApplyResources(this.tsbSubUpdate, "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
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.toolStripSeparator8, "toolStripSeparator8");
|
|
||||||
this.toolStripSeparator8.Name = "toolStripSeparator8";
|
this.toolStripSeparator8.Name = "toolStripSeparator8";
|
||||||
|
resources.ApplyResources(this.toolStripSeparator8, "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
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.tsbOptionSetting, "tsbOptionSetting");
|
|
||||||
this.tsbOptionSetting.Name = "tsbOptionSetting";
|
this.tsbOptionSetting.Name = "tsbOptionSetting";
|
||||||
|
resources.ApplyResources(this.tsbOptionSetting, "tsbOptionSetting");
|
||||||
this.tsbOptionSetting.Click += new System.EventHandler(this.tsbOptionSetting_Click);
|
this.tsbOptionSetting.Click += new System.EventHandler(this.tsbOptionSetting_Click);
|
||||||
//
|
//
|
||||||
// tsbRoutingSetting
|
// tsbRoutingSetting
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.tsbRoutingSetting, "tsbRoutingSetting");
|
|
||||||
this.tsbRoutingSetting.Name = "tsbRoutingSetting";
|
this.tsbRoutingSetting.Name = "tsbRoutingSetting";
|
||||||
|
resources.ApplyResources(this.tsbRoutingSetting, "tsbRoutingSetting");
|
||||||
this.tsbRoutingSetting.Click += new System.EventHandler(this.tsbRoutingSetting_Click);
|
this.tsbRoutingSetting.Click += new System.EventHandler(this.tsbRoutingSetting_Click);
|
||||||
//
|
//
|
||||||
// toolStripSeparator14
|
// toolStripSeparator14
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.toolStripSeparator14, "toolStripSeparator14");
|
|
||||||
this.toolStripSeparator14.Name = "toolStripSeparator14";
|
this.toolStripSeparator14.Name = "toolStripSeparator14";
|
||||||
|
resources.ApplyResources(this.toolStripSeparator14, "toolStripSeparator14");
|
||||||
//
|
//
|
||||||
// tsbBackupGuiNConfig
|
// tsbBackupGuiNConfig
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.tsbBackupGuiNConfig, "tsbBackupGuiNConfig");
|
|
||||||
this.tsbBackupGuiNConfig.Name = "tsbBackupGuiNConfig";
|
this.tsbBackupGuiNConfig.Name = "tsbBackupGuiNConfig";
|
||||||
|
resources.ApplyResources(this.tsbBackupGuiNConfig, "tsbBackupGuiNConfig");
|
||||||
this.tsbBackupGuiNConfig.Click += new System.EventHandler(this.tsbBackupGuiNConfig_Click);
|
this.tsbBackupGuiNConfig.Click += new System.EventHandler(this.tsbBackupGuiNConfig_Click);
|
||||||
//
|
//
|
||||||
// toolStripSeparator5
|
// toolStripSeparator5
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.toolStripSeparator5, "toolStripSeparator5");
|
|
||||||
this.toolStripSeparator5.Name = "toolStripSeparator5";
|
this.toolStripSeparator5.Name = "toolStripSeparator5";
|
||||||
|
resources.ApplyResources(this.toolStripSeparator5, "toolStripSeparator5");
|
||||||
//
|
//
|
||||||
// tsbReload
|
// tsbReload
|
||||||
//
|
//
|
||||||
|
@ -755,45 +756,47 @@
|
||||||
//
|
//
|
||||||
// toolStripSeparator7
|
// toolStripSeparator7
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.toolStripSeparator7, "toolStripSeparator7");
|
|
||||||
this.toolStripSeparator7.Name = "toolStripSeparator7";
|
this.toolStripSeparator7.Name = "toolStripSeparator7";
|
||||||
|
resources.ApplyResources(this.toolStripSeparator7, "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,
|
||||||
this.tsbCheckUpdateXrayCore});
|
this.tsbCheckUpdateXrayCore,
|
||||||
|
this.toolStripSeparator15,
|
||||||
|
this.tsbCheckUpdateGeoSite,
|
||||||
|
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
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.tsbCheckUpdateN, "tsbCheckUpdateN");
|
|
||||||
this.tsbCheckUpdateN.Name = "tsbCheckUpdateN";
|
this.tsbCheckUpdateN.Name = "tsbCheckUpdateN";
|
||||||
|
resources.ApplyResources(this.tsbCheckUpdateN, "tsbCheckUpdateN");
|
||||||
this.tsbCheckUpdateN.Click += new System.EventHandler(this.tsbCheckUpdateN_Click);
|
this.tsbCheckUpdateN.Click += new System.EventHandler(this.tsbCheckUpdateN_Click);
|
||||||
//
|
//
|
||||||
// tsbCheckUpdateCore
|
// tsbCheckUpdateCore
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.tsbCheckUpdateCore, "tsbCheckUpdateCore");
|
|
||||||
this.tsbCheckUpdateCore.Name = "tsbCheckUpdateCore";
|
this.tsbCheckUpdateCore.Name = "tsbCheckUpdateCore";
|
||||||
|
resources.ApplyResources(this.tsbCheckUpdateCore, "tsbCheckUpdateCore");
|
||||||
this.tsbCheckUpdateCore.Click += new System.EventHandler(this.tsbCheckUpdateCore_Click);
|
this.tsbCheckUpdateCore.Click += new System.EventHandler(this.tsbCheckUpdateCore_Click);
|
||||||
//
|
//
|
||||||
// tsbCheckUpdateXrayCore
|
// tsbCheckUpdateXrayCore
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.tsbCheckUpdateXrayCore, "tsbCheckUpdateXrayCore");
|
|
||||||
this.tsbCheckUpdateXrayCore.Name = "tsbCheckUpdateXrayCore";
|
this.tsbCheckUpdateXrayCore.Name = "tsbCheckUpdateXrayCore";
|
||||||
|
resources.ApplyResources(this.tsbCheckUpdateXrayCore, "tsbCheckUpdateXrayCore");
|
||||||
this.tsbCheckUpdateXrayCore.Click += new System.EventHandler(this.tsbCheckUpdateXrayCore_Click);
|
this.tsbCheckUpdateXrayCore.Click += new System.EventHandler(this.tsbCheckUpdateXrayCore_Click);
|
||||||
//
|
//
|
||||||
// toolStripSeparator10
|
// toolStripSeparator10
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.toolStripSeparator10, "toolStripSeparator10");
|
|
||||||
this.toolStripSeparator10.Name = "toolStripSeparator10";
|
this.toolStripSeparator10.Name = "toolStripSeparator10";
|
||||||
|
resources.ApplyResources(this.toolStripSeparator10, "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,
|
||||||
|
@ -801,49 +804,50 @@
|
||||||
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
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.tsbAbout, "tsbAbout");
|
|
||||||
this.tsbAbout.Name = "tsbAbout";
|
this.tsbAbout.Name = "tsbAbout";
|
||||||
|
resources.ApplyResources(this.tsbAbout, "tsbAbout");
|
||||||
this.tsbAbout.Click += new System.EventHandler(this.tsbAbout_Click);
|
this.tsbAbout.Click += new System.EventHandler(this.tsbAbout_Click);
|
||||||
//
|
//
|
||||||
// tsbV2rayWebsite
|
// tsbV2rayWebsite
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.tsbV2rayWebsite, "tsbV2rayWebsite");
|
|
||||||
this.tsbV2rayWebsite.Name = "tsbV2rayWebsite";
|
this.tsbV2rayWebsite.Name = "tsbV2rayWebsite";
|
||||||
|
resources.ApplyResources(this.tsbV2rayWebsite, "tsbV2rayWebsite");
|
||||||
this.tsbV2rayWebsite.Click += new System.EventHandler(this.tsbV2rayWebsite_Click);
|
this.tsbV2rayWebsite.Click += new System.EventHandler(this.tsbV2rayWebsite_Click);
|
||||||
//
|
//
|
||||||
// toolStripSeparator12
|
// toolStripSeparator12
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.toolStripSeparator12, "toolStripSeparator12");
|
|
||||||
this.toolStripSeparator12.Name = "toolStripSeparator12";
|
this.toolStripSeparator12.Name = "toolStripSeparator12";
|
||||||
|
resources.ApplyResources(this.toolStripSeparator12, "toolStripSeparator12");
|
||||||
//
|
//
|
||||||
// tsbLanguageDef
|
// tsbLanguageDef
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.tsbLanguageDef, "tsbLanguageDef");
|
|
||||||
this.tsbLanguageDef.Name = "tsbLanguageDef";
|
this.tsbLanguageDef.Name = "tsbLanguageDef";
|
||||||
|
resources.ApplyResources(this.tsbLanguageDef, "tsbLanguageDef");
|
||||||
this.tsbLanguageDef.Click += new System.EventHandler(this.tsbLanguageDef_Click);
|
this.tsbLanguageDef.Click += new System.EventHandler(this.tsbLanguageDef_Click);
|
||||||
//
|
//
|
||||||
// tsbLanguageZhHans
|
// tsbLanguageZhHans
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.tsbLanguageZhHans, "tsbLanguageZhHans");
|
|
||||||
this.tsbLanguageZhHans.Name = "tsbLanguageZhHans";
|
this.tsbLanguageZhHans.Name = "tsbLanguageZhHans";
|
||||||
|
resources.ApplyResources(this.tsbLanguageZhHans, "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
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this.toolStripSeparator11, "toolStripSeparator11");
|
|
||||||
this.toolStripSeparator11.Name = "toolStripSeparator11";
|
this.toolStripSeparator11.Name = "toolStripSeparator11";
|
||||||
|
resources.ApplyResources(this.toolStripSeparator11, "toolStripSeparator11");
|
||||||
//
|
//
|
||||||
// tsbClose
|
// tsbClose
|
||||||
//
|
//
|
||||||
|
@ -851,6 +855,23 @@
|
||||||
this.tsbClose.Name = "tsbClose";
|
this.tsbClose.Name = "tsbClose";
|
||||||
this.tsbClose.Click += new System.EventHandler(this.tsbClose_Click);
|
this.tsbClose.Click += new System.EventHandler(this.tsbClose_Click);
|
||||||
//
|
//
|
||||||
|
// tsbCheckUpdateGeoSite
|
||||||
|
//
|
||||||
|
this.tsbCheckUpdateGeoSite.Name = "tsbCheckUpdateGeoSite";
|
||||||
|
resources.ApplyResources(this.tsbCheckUpdateGeoSite, "tsbCheckUpdateGeoSite");
|
||||||
|
this.tsbCheckUpdateGeoSite.Click += new System.EventHandler(this.tsbCheckUpdateGeoSite_Click);
|
||||||
|
//
|
||||||
|
// tsbCheckUpdateGeoIP
|
||||||
|
//
|
||||||
|
this.tsbCheckUpdateGeoIP.Name = "tsbCheckUpdateGeoIP";
|
||||||
|
resources.ApplyResources(this.tsbCheckUpdateGeoIP, "tsbCheckUpdateGeoIP");
|
||||||
|
this.tsbCheckUpdateGeoIP.Click += new System.EventHandler(this.tsbCheckUpdateGeoIP_Click);
|
||||||
|
//
|
||||||
|
// toolStripSeparator15
|
||||||
|
//
|
||||||
|
this.toolStripSeparator15.Name = "toolStripSeparator15";
|
||||||
|
resources.ApplyResources(this.toolStripSeparator15, "toolStripSeparator15");
|
||||||
|
//
|
||||||
// MainForm
|
// MainForm
|
||||||
//
|
//
|
||||||
resources.ApplyResources(this, "$this");
|
resources.ApplyResources(this, "$this");
|
||||||
|
@ -987,6 +1008,9 @@
|
||||||
private System.Windows.Forms.ToolStripMenuItem menuMsgBoxCopyAll;
|
private System.Windows.Forms.ToolStripMenuItem menuMsgBoxCopyAll;
|
||||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator14;
|
private System.Windows.Forms.ToolStripSeparator toolStripSeparator14;
|
||||||
private System.Windows.Forms.ToolStripMenuItem tsbBackupGuiNConfig;
|
private System.Windows.Forms.ToolStripMenuItem tsbBackupGuiNConfig;
|
||||||
|
private System.Windows.Forms.ToolStripSeparator toolStripSeparator15;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem tsbCheckUpdateGeoSite;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem tsbCheckUpdateGeoIP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -650,7 +650,8 @@ namespace v2rayN.Forms
|
||||||
|
|
||||||
private void tsbTestMe_Click(object sender, EventArgs e)
|
private void tsbTestMe_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
string result = httpProxyTest() + "ms";
|
SpeedtestHandler statistics = new SpeedtestHandler(ref config);
|
||||||
|
string result = statistics.RunAvailabilityCheck() + "ms";
|
||||||
AppendText(false, string.Format(UIRes.I18N("TestMeOutput"), result));
|
AppendText(false, string.Format(UIRes.I18N("TestMeOutput"), result));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -662,12 +663,6 @@ namespace v2rayN.Forms
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private int httpProxyTest()
|
|
||||||
{
|
|
||||||
SpeedtestHandler statistics = new SpeedtestHandler(ref config, ref v2rayHandler, lvSelecteds, "", UpdateSpeedtestHandler);
|
|
||||||
return statistics.RunAvailabilityCheck();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void menuExport2ClientConfig_Click(object sender, EventArgs e)
|
private void menuExport2ClientConfig_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
int index = GetLvSelectedIndex();
|
int index = GetLvSelectedIndex();
|
||||||
|
@ -1167,88 +1162,17 @@ namespace v2rayN.Forms
|
||||||
|
|
||||||
#region CheckUpdate
|
#region CheckUpdate
|
||||||
|
|
||||||
private void askToDownload(DownloadHandle downloadHandle, string url)
|
|
||||||
{
|
|
||||||
if (UI.ShowYesNo(string.Format(UIRes.I18N("DownloadYesNo"), url)) == DialogResult.Yes)
|
|
||||||
{
|
|
||||||
if (httpProxyTest() > 0)
|
|
||||||
{
|
|
||||||
int httpPort = config.GetLocalPort(Global.InboundHttp);
|
|
||||||
WebProxy webProxy = new WebProxy(Global.Loopback, httpPort);
|
|
||||||
downloadHandle.DownloadFileAsync(url, webProxy, 600);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
downloadHandle.DownloadFileAsync(url, null, 600);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
private void tsbCheckUpdateN_Click(object sender, EventArgs e)
|
private void tsbCheckUpdateN_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
//System.Diagnostics.Process.Start(Global.UpdateUrl);
|
void _updateUI(bool success, string msg)
|
||||||
DownloadHandle downloadHandle = null;
|
|
||||||
if (downloadHandle == null)
|
|
||||||
{
|
{
|
||||||
downloadHandle = new DownloadHandle();
|
AppendText(false, msg);
|
||||||
downloadHandle.AbsoluteCompleted += (sender2, args) =>
|
if (success)
|
||||||
{
|
{
|
||||||
if (args.Success)
|
menuExit_Click(null, null);
|
||||||
{
|
}
|
||||||
AppendText(false, string.Format(UIRes.I18N("MsgParsingSuccessfully"), "v2rayN"));
|
};
|
||||||
|
(new UpdateHandle()).CheckUpdateGuiN(config, _updateUI);
|
||||||
string url = args.Msg;
|
|
||||||
this.Invoke((MethodInvoker)(delegate
|
|
||||||
{
|
|
||||||
askToDownload(downloadHandle, url);
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
AppendText(false, args.Msg);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
downloadHandle.UpdateCompleted += (sender2, args) =>
|
|
||||||
{
|
|
||||||
if (args.Success)
|
|
||||||
{
|
|
||||||
AppendText(false, UIRes.I18N("MsgDownloadV2rayCoreSuccessfully"));
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
string fileName = Utils.GetPath(downloadHandle.DownloadFileName);
|
|
||||||
Process process = new Process
|
|
||||||
{
|
|
||||||
StartInfo = new ProcessStartInfo
|
|
||||||
{
|
|
||||||
FileName = "v2rayUpgrade.exe",
|
|
||||||
Arguments = "\"" + fileName + "\"",
|
|
||||||
WorkingDirectory = Utils.StartupPath()
|
|
||||||
}
|
|
||||||
};
|
|
||||||
process.Start();
|
|
||||||
if (process.Id > 0)
|
|
||||||
{
|
|
||||||
menuExit_Click(null, null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
AppendText(false, ex.Message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
AppendText(false, args.Msg);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
downloadHandle.Error += (sender2, args) =>
|
|
||||||
{
|
|
||||||
AppendText(true, args.GetException().Message);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
AppendText(false, string.Format(UIRes.I18N("MsgStartUpdating"), "v2rayN"));
|
|
||||||
downloadHandle.CheckUpdateAsync("v2rayN");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void tsbCheckUpdateCore_Click(object sender, EventArgs e)
|
private void tsbCheckUpdateCore_Click(object sender, EventArgs e)
|
||||||
|
@ -1263,67 +1187,52 @@ namespace v2rayN.Forms
|
||||||
|
|
||||||
private void CheckUpdateCore(string type)
|
private void CheckUpdateCore(string type)
|
||||||
{
|
{
|
||||||
DownloadHandle downloadHandle = null;
|
void _updateUI(bool success, string msg)
|
||||||
if (downloadHandle == null)
|
|
||||||
{
|
{
|
||||||
downloadHandle = new DownloadHandle();
|
AppendText(false, msg);
|
||||||
downloadHandle.AbsoluteCompleted += (sender2, args) =>
|
if (success)
|
||||||
{
|
{
|
||||||
if (args.Success)
|
CloseV2ray();
|
||||||
{
|
|
||||||
AppendText(false, string.Format(UIRes.I18N("MsgParsingSuccessfully"), "Core"));
|
|
||||||
|
|
||||||
string url = args.Msg;
|
string fileName = Global.DownloadFileName;
|
||||||
this.Invoke((MethodInvoker)(delegate
|
fileName = Utils.GetPath(fileName);
|
||||||
{
|
FileManager.ZipExtractToFile(fileName, config.ignoreGeoUpdateCore ? "geo" : "");
|
||||||
askToDownload(downloadHandle, url);
|
|
||||||
}));
|
AppendText(false, UIRes.I18N("MsgUpdateV2rayCoreSuccessfullyMore"));
|
||||||
}
|
|
||||||
else
|
Global.reloadV2ray = true;
|
||||||
{
|
LoadV2ray();
|
||||||
AppendText(false, args.Msg);
|
|
||||||
}
|
AppendText(false, UIRes.I18N("MsgUpdateV2rayCoreSuccessfully"));
|
||||||
};
|
}
|
||||||
downloadHandle.UpdateCompleted += (sender2, args) =>
|
};
|
||||||
|
(new UpdateHandle()).CheckUpdateCore(type, config, _updateUI);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void tsbCheckUpdateGeoSite_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
(new UpdateHandle()).UpdateGeoFile("geosite", config, (bool success, string msg) =>
|
||||||
|
{
|
||||||
|
AppendText(false, msg);
|
||||||
|
if (success)
|
||||||
{
|
{
|
||||||
if (args.Success)
|
Global.reloadV2ray = true;
|
||||||
{
|
LoadV2ray();
|
||||||
AppendText(false, UIRes.I18N("MsgDownloadV2rayCoreSuccessfully"));
|
}
|
||||||
AppendText(false, UIRes.I18N("MsgUnpacking"));
|
});
|
||||||
|
}
|
||||||
|
|
||||||
try
|
private void tsbCheckUpdateGeoIP_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
CloseV2ray();
|
(new UpdateHandle()).UpdateGeoFile("geoip", config, (bool success, string msg) =>
|
||||||
|
{
|
||||||
string fileName = downloadHandle.DownloadFileName;
|
AppendText(false, msg);
|
||||||
fileName = Utils.GetPath(fileName);
|
if (success)
|
||||||
FileManager.ZipExtractToFile(fileName, config.ignoreGeoUpdateCore ? "geo" : "");
|
|
||||||
|
|
||||||
AppendText(false, UIRes.I18N("MsgUpdateV2rayCoreSuccessfullyMore"));
|
|
||||||
|
|
||||||
Global.reloadV2ray = true;
|
|
||||||
LoadV2ray();
|
|
||||||
|
|
||||||
AppendText(false, UIRes.I18N("MsgUpdateV2rayCoreSuccessfully"));
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
AppendText(false, ex.Message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
AppendText(false, args.Msg);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
downloadHandle.Error += (sender2, args) =>
|
|
||||||
{
|
{
|
||||||
AppendText(true, args.GetException().Message);
|
Global.reloadV2ray = true;
|
||||||
};
|
LoadV2ray();
|
||||||
}
|
}
|
||||||
|
});
|
||||||
AppendText(false, string.Format(UIRes.I18N("MsgStartUpdating"), "Core"));
|
|
||||||
downloadHandle.CheckUpdateAsync(type);
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -1397,15 +1306,16 @@ namespace v2rayN.Forms
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void UpdateSubscriptionProcess()
|
private void UpdateSubscriptionProcess()
|
||||||
{
|
{
|
||||||
void _updateUI(bool refresh, string msg)
|
void _updateUI(bool success, string msg)
|
||||||
{
|
{
|
||||||
AppendText(false, msg);
|
AppendText(false, msg);
|
||||||
if (refresh)
|
if (success)
|
||||||
{
|
{
|
||||||
RefreshServers();
|
RefreshServers();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
MainFormHandler.Instance.UpdateSubscriptionProcess(config, _updateUI);
|
|
||||||
|
(new UpdateHandle()).UpdateSubscriptionProcess(config, _updateUI);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void tsbQRCodeSwitch_CheckedChanged(object sender, EventArgs e)
|
private void tsbQRCodeSwitch_CheckedChanged(object sender, EventArgs e)
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -318,15 +318,6 @@
|
||||||
ZW0uRHJhd2luZy5HcmFwaGljc1VuaXQBAAAAB3ZhbHVlX18ACAMAAAADAAAACw==
|
ZW0uRHJhd2luZy5HcmFwaGljc1VuaXQBAAAAB3ZhbHVlX18ACAMAAAADAAAACw==
|
||||||
</value>
|
</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="cmsMain.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>196, 170</value>
|
|
||||||
</data>
|
|
||||||
<data name="menuSysAgentMode.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>195, 22</value>
|
|
||||||
</data>
|
|
||||||
<data name="menuSysAgentMode.Text" xml:space="preserve">
|
|
||||||
<value>系统代理</value>
|
|
||||||
</data>
|
|
||||||
<data name="menuKeepClear.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="menuKeepClear.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>172, 22</value>
|
<value>172, 22</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -345,6 +336,12 @@
|
||||||
<data name="menuKeepNothing.Text" xml:space="preserve">
|
<data name="menuKeepNothing.Text" xml:space="preserve">
|
||||||
<value>不改变系统代理</value>
|
<value>不改变系统代理</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="menuSysAgentMode.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>195, 22</value>
|
||||||
|
</data>
|
||||||
|
<data name="menuSysAgentMode.Text" xml:space="preserve">
|
||||||
|
<value>系统代理</value>
|
||||||
|
</data>
|
||||||
<data name="menuRoutings.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="menuRoutings.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>195, 22</value>
|
<value>195, 22</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -387,15 +384,12 @@
|
||||||
<data name="menuExit.Text" xml:space="preserve">
|
<data name="menuExit.Text" xml:space="preserve">
|
||||||
<value>退出</value>
|
<value>退出</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="cmsMain.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>196, 170</value>
|
||||||
|
</data>
|
||||||
<data name="groupBox1.Text" xml:space="preserve">
|
<data name="groupBox1.Text" xml:space="preserve">
|
||||||
<value>服务器列表</value>
|
<value>服务器列表</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="groupBox2.Text" xml:space="preserve">
|
|
||||||
<value>信息</value>
|
|
||||||
</data>
|
|
||||||
<data name="cmsMsgBox.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>222, 92</value>
|
|
||||||
</data>
|
|
||||||
<data name="menuMsgBoxSelectAll.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="menuMsgBoxSelectAll.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>221, 22</value>
|
<value>221, 22</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -420,9 +414,27 @@
|
||||||
<data name="menuMsgBoxAddRoutingRule.Text" xml:space="preserve">
|
<data name="menuMsgBoxAddRoutingRule.Text" xml:space="preserve">
|
||||||
<value>快速添加路由规则 (Ctrl+V)</value>
|
<value>快速添加路由规则 (Ctrl+V)</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="cmsMsgBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>222, 92</value>
|
||||||
|
</data>
|
||||||
<data name="toolSslServerSpeed.Text" xml:space="preserve">
|
<data name="toolSslServerSpeed.Text" xml:space="preserve">
|
||||||
<value>网速显示未启用</value>
|
<value>网速显示未启用</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="groupBox2.Text" xml:space="preserve">
|
||||||
|
<value>信息</value>
|
||||||
|
</data>
|
||||||
|
<data name="tsbSubSetting.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>124, 22</value>
|
||||||
|
</data>
|
||||||
|
<data name="tsbSubSetting.Text" xml:space="preserve">
|
||||||
|
<value>订阅设置</value>
|
||||||
|
</data>
|
||||||
|
<data name="tsbSubUpdate.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>124, 22</value>
|
||||||
|
</data>
|
||||||
|
<data name="tsbSubUpdate.Text" xml:space="preserve">
|
||||||
|
<value>更新订阅</value>
|
||||||
|
</data>
|
||||||
<data name="tsbSub.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="tsbSub.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>61, 53</value>
|
<value>61, 53</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -435,12 +447,21 @@
|
||||||
<data name="tsbQRCodeSwitch.Text" xml:space="preserve">
|
<data name="tsbQRCodeSwitch.Text" xml:space="preserve">
|
||||||
<value> 分享 </value>
|
<value> 分享 </value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="tsbOptionSetting.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>189, 22</value>
|
||||||
|
</data>
|
||||||
<data name="tsbOptionSetting.Text" xml:space="preserve">
|
<data name="tsbOptionSetting.Text" xml:space="preserve">
|
||||||
<value>参数设置</value>
|
<value>参数设置</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="tsbRoutingSetting.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>189, 22</value>
|
||||||
|
</data>
|
||||||
<data name="tsbRoutingSetting.Text" xml:space="preserve">
|
<data name="tsbRoutingSetting.Text" xml:space="preserve">
|
||||||
<value>路由设置</value>
|
<value>路由设置</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="toolStripSeparator14.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>186, 6</value>
|
||||||
|
</data>
|
||||||
<data name="tsbBackupGuiNConfig.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="tsbBackupGuiNConfig.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>189, 22</value>
|
<value>189, 22</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -470,12 +491,36 @@
|
||||||
<data name="tsbReload.Text" xml:space="preserve">
|
<data name="tsbReload.Text" xml:space="preserve">
|
||||||
<value> 重启服务 </value>
|
<value> 重启服务 </value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="tsbCheckUpdateN.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>135, 22</value>
|
||||||
|
</data>
|
||||||
|
<data name="tsbCheckUpdateN.Text" xml:space="preserve">
|
||||||
|
<value>v2rayN</value>
|
||||||
|
</data>
|
||||||
|
<data name="tsbCheckUpdateCore.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>135, 22</value>
|
||||||
|
</data>
|
||||||
|
<data name="tsbCheckUpdateCore.Text" xml:space="preserve">
|
||||||
|
<value>v2fly-Core</value>
|
||||||
|
</data>
|
||||||
|
<data name="tsbCheckUpdateXrayCore.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>135, 22</value>
|
||||||
|
</data>
|
||||||
|
<data name="tsbCheckUpdateXrayCore.Text" xml:space="preserve">
|
||||||
|
<value>Xray-Core</value>
|
||||||
|
</data>
|
||||||
<data name="tsbCheckUpdate.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="tsbCheckUpdate.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>85, 53</value>
|
<value>85, 53</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="tsbCheckUpdate.Text" xml:space="preserve">
|
<data name="tsbCheckUpdate.Text" xml:space="preserve">
|
||||||
<value> 检查更新 </value>
|
<value> 检查更新 </value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="tsbAbout.Text" xml:space="preserve">
|
||||||
|
<value>v2rayN 项目</value>
|
||||||
|
</data>
|
||||||
|
<data name="tsbV2rayWebsite.Text" xml:space="preserve">
|
||||||
|
<value>V2Ray 官网</value>
|
||||||
|
</data>
|
||||||
<data name="tsbHelp.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="tsbHelp.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>69, 53</value>
|
<value>69, 53</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -501,40 +546,4 @@
|
||||||
<data name="tsbClose.Text" xml:space="preserve">
|
<data name="tsbClose.Text" xml:space="preserve">
|
||||||
<value> 关闭窗口 </value>
|
<value> 关闭窗口 </value>
|
||||||
</data>
|
</data>
|
||||||
<data name="tsbSubSetting.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>124, 22</value>
|
|
||||||
</data>
|
|
||||||
<data name="tsbSubSetting.Text" xml:space="preserve">
|
|
||||||
<value>订阅设置</value>
|
|
||||||
</data>
|
|
||||||
<data name="tsbSubUpdate.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>124, 22</value>
|
|
||||||
</data>
|
|
||||||
<data name="tsbSubUpdate.Text" xml:space="preserve">
|
|
||||||
<value>更新订阅</value>
|
|
||||||
</data>
|
|
||||||
<data name="tsbCheckUpdateN.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>135, 22</value>
|
|
||||||
</data>
|
|
||||||
<data name="tsbCheckUpdateN.Text" xml:space="preserve">
|
|
||||||
<value>v2rayN</value>
|
|
||||||
</data>
|
|
||||||
<data name="tsbCheckUpdateCore.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>135, 22</value>
|
|
||||||
</data>
|
|
||||||
<data name="tsbCheckUpdateCore.Text" xml:space="preserve">
|
|
||||||
<value>v2fly-Core</value>
|
|
||||||
</data>
|
|
||||||
<data name="tsbCheckUpdateXrayCore.Size" type="System.Drawing.Size, System.Drawing">
|
|
||||||
<value>135, 22</value>
|
|
||||||
</data>
|
|
||||||
<data name="tsbCheckUpdateXrayCore.Text" xml:space="preserve">
|
|
||||||
<value>Xray-Core</value>
|
|
||||||
</data>
|
|
||||||
<data name="tsbAbout.Text" xml:space="preserve">
|
|
||||||
<value>v2rayN 项目</value>
|
|
||||||
</data>
|
|
||||||
<data name="tsbV2rayWebsite.Text" xml:space="preserve">
|
|
||||||
<value>V2Ray 官网</value>
|
|
||||||
</data>
|
|
||||||
</root>
|
</root>
|
|
@ -7,7 +7,7 @@ namespace v2rayN
|
||||||
{
|
{
|
||||||
#region 常量
|
#region 常量
|
||||||
|
|
||||||
|
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";
|
||||||
|
|
|
@ -1,16 +1,7 @@
|
||||||
using Newtonsoft.Json;
|
using System;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.Http;
|
|
||||||
using System.Text;
|
|
||||||
using System.Text.RegularExpressions;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using v2rayN.Base;
|
using v2rayN.Base;
|
||||||
using v2rayN.Mode;
|
|
||||||
using v2rayN.Properties;
|
|
||||||
|
|
||||||
namespace v2rayN.Handler
|
namespace v2rayN.Handler
|
||||||
{
|
{
|
||||||
|
@ -19,19 +10,10 @@ namespace v2rayN.Handler
|
||||||
/// </summary>
|
/// </summary>
|
||||||
class DownloadHandle
|
class DownloadHandle
|
||||||
{
|
{
|
||||||
public event EventHandler<ResultEventArgs> AbsoluteCompleted;
|
|
||||||
|
|
||||||
public event EventHandler<ResultEventArgs> UpdateCompleted;
|
public event EventHandler<ResultEventArgs> UpdateCompleted;
|
||||||
|
|
||||||
public event ErrorEventHandler Error;
|
public event ErrorEventHandler Error;
|
||||||
|
|
||||||
public string DownloadFileName
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return "v2ray-windows.zip";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class ResultEventArgs : EventArgs
|
public class ResultEventArgs : EventArgs
|
||||||
{
|
{
|
||||||
|
@ -49,155 +31,7 @@ namespace v2rayN.Handler
|
||||||
private long totalBytesToReceive = 0;
|
private long totalBytesToReceive = 0;
|
||||||
private DateTime totalDatetime = new DateTime();
|
private DateTime totalDatetime = new DateTime();
|
||||||
private int DownloadTimeout = -1;
|
private int DownloadTimeout = -1;
|
||||||
|
|
||||||
#region Check for updates
|
|
||||||
|
|
||||||
private readonly string nLatestUrl = Global.NUrl + "/latest";
|
|
||||||
private const string nUrl = Global.NUrl + "/download/{0}/v2rayN.zip";
|
|
||||||
private readonly string v2flyCoreLatestUrl = Global.v2flyCoreUrl + "/latest";
|
|
||||||
private const string v2flyCoreUrl = Global.v2flyCoreUrl + "/download/{0}/v2ray-windows-{1}.zip";
|
|
||||||
private readonly string xrayCoreLatestUrl = Global.xrayCoreUrl + "/latest";
|
|
||||||
private const string xrayCoreUrl = Global.xrayCoreUrl + "/download/{0}/Xray-windows-{1}.zip";
|
|
||||||
|
|
||||||
public async void CheckUpdateAsync(string type)
|
|
||||||
{
|
|
||||||
Utils.SetSecurityProtocol();
|
|
||||||
WebRequestHandler webRequestHandler = new WebRequestHandler
|
|
||||||
{
|
|
||||||
AllowAutoRedirect = false
|
|
||||||
};
|
|
||||||
HttpClient httpClient = new HttpClient(webRequestHandler);
|
|
||||||
|
|
||||||
string url;
|
|
||||||
if (type == "v2fly")
|
|
||||||
{
|
|
||||||
url = v2flyCoreLatestUrl;
|
|
||||||
}
|
|
||||||
else if (type == "xray")
|
|
||||||
{
|
|
||||||
url = xrayCoreLatestUrl;
|
|
||||||
}
|
|
||||||
else if (type == "v2rayN")
|
|
||||||
{
|
|
||||||
url = nLatestUrl;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
throw new ArgumentException("Type");
|
|
||||||
}
|
|
||||||
HttpResponseMessage response = await httpClient.GetAsync(url);
|
|
||||||
if (response.StatusCode.ToString() == "Redirect")
|
|
||||||
{
|
|
||||||
responseHandler(type, response.Headers.Location.ToString());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Utils.SaveLog("StatusCode error: " + url);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取V2RayCore版本
|
|
||||||
/// </summary>
|
|
||||||
public string getCoreVersion(string type)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var core = string.Empty;
|
|
||||||
var match = string.Empty;
|
|
||||||
if (type == "v2fly")
|
|
||||||
{
|
|
||||||
core = "v2ray.exe";
|
|
||||||
match = "V2Ray";
|
|
||||||
}
|
|
||||||
else if (type == "xray")
|
|
||||||
{
|
|
||||||
core = "xray.exe";
|
|
||||||
match = "Xray";
|
|
||||||
}
|
|
||||||
string filePath = Utils.GetPath(core);
|
|
||||||
if (!File.Exists(filePath))
|
|
||||||
{
|
|
||||||
string msg = string.Format(UIRes.I18N("NotFoundCore"), @"");
|
|
||||||
//ShowMsg(true, msg);
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
Process p = new Process();
|
|
||||||
p.StartInfo.FileName = filePath;
|
|
||||||
p.StartInfo.Arguments = "-version";
|
|
||||||
p.StartInfo.WorkingDirectory = Utils.StartupPath();
|
|
||||||
p.StartInfo.UseShellExecute = false;
|
|
||||||
p.StartInfo.RedirectStandardOutput = true;
|
|
||||||
p.StartInfo.CreateNoWindow = true;
|
|
||||||
p.StartInfo.StandardOutputEncoding = Encoding.UTF8;
|
|
||||||
p.Start();
|
|
||||||
p.WaitForExit(5000);
|
|
||||||
string echo = p.StandardOutput.ReadToEnd();
|
|
||||||
string version = Regex.Match(echo, $"{match} ([0-9.]+) \\(").Groups[1].Value;
|
|
||||||
return version;
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Utils.SaveLog(ex.Message, ex);
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
private void responseHandler(string type, string redirectUrl)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
string version = redirectUrl.Substring(redirectUrl.LastIndexOf("/", StringComparison.Ordinal) + 1);
|
|
||||||
|
|
||||||
string curVersion;
|
|
||||||
string message;
|
|
||||||
string url;
|
|
||||||
if (type == "v2fly")
|
|
||||||
{
|
|
||||||
curVersion = "v" + getCoreVersion(type);
|
|
||||||
message = string.Format(UIRes.I18N("IsLatestCore"), curVersion);
|
|
||||||
string osBit = Environment.Is64BitProcess ? "64" : "32";
|
|
||||||
url = string.Format(v2flyCoreUrl, version, osBit);
|
|
||||||
}
|
|
||||||
else if (type == "xray")
|
|
||||||
{
|
|
||||||
curVersion = "v" + getCoreVersion(type);
|
|
||||||
message = string.Format(UIRes.I18N("IsLatestCore"), curVersion);
|
|
||||||
string osBit = Environment.Is64BitProcess ? "64" : "32";
|
|
||||||
url = string.Format(xrayCoreUrl, version, osBit);
|
|
||||||
}
|
|
||||||
else if (type == "v2rayN")
|
|
||||||
{
|
|
||||||
curVersion = FileVersionInfo.GetVersionInfo(Utils.GetExePath()).FileVersion.ToString();
|
|
||||||
message = string.Format(UIRes.I18N("IsLatestN"), curVersion);
|
|
||||||
url = string.Format(nUrl, version);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
throw new ArgumentException("Type");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (curVersion == version)
|
|
||||||
{
|
|
||||||
AbsoluteCompleted?.Invoke(this, new ResultEventArgs(false, message));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
AbsoluteCompleted?.Invoke(this, new ResultEventArgs(true, url));
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Utils.SaveLog(ex.Message, ex);
|
|
||||||
|
|
||||||
Error?.Invoke(this, new ErrorEventArgs(ex));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Download
|
|
||||||
|
|
||||||
public WebClientEx DownloadFileAsync(string url, WebProxy webProxy, int downloadTimeout)
|
public WebClientEx DownloadFileAsync(string url, WebProxy webProxy, int downloadTimeout)
|
||||||
{
|
{
|
||||||
WebClientEx ws = new WebClientEx();
|
WebClientEx ws = new WebClientEx();
|
||||||
|
@ -218,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(DownloadFileName));
|
ws.DownloadFileAsync(new Uri(url), Utils.GetPath(Global.DownloadFileName));
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
@ -354,7 +188,6 @@ namespace v2rayN.Handler
|
||||||
return string.Empty;
|
return string.Empty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,10 @@ namespace v2rayN.Handler
|
||||||
private List<int> _selecteds;
|
private List<int> _selecteds;
|
||||||
Action<int, string> _updateFunc;
|
Action<int, string> _updateFunc;
|
||||||
|
|
||||||
|
public SpeedtestHandler(ref Config config)
|
||||||
|
{
|
||||||
|
_config = config;
|
||||||
|
}
|
||||||
|
|
||||||
public SpeedtestHandler(ref Config config, ref V2rayHandler v2rayHandler, List<int> selecteds, string actionType, Action<int, string> update)
|
public SpeedtestHandler(ref Config config, ref V2rayHandler v2rayHandler, List<int> selecteds, string actionType, Action<int, string> update)
|
||||||
{
|
{
|
||||||
|
|
453
v2rayN/v2rayN/Handler/UpdateHandle.cs
Normal file
453
v2rayN/v2rayN/Handler/UpdateHandle.cs
Normal file
|
@ -0,0 +1,453 @@
|
||||||
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
|
using System.Net;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using v2rayN.Mode;
|
||||||
|
|
||||||
|
namespace v2rayN.Handler
|
||||||
|
{
|
||||||
|
class UpdateHandle
|
||||||
|
{
|
||||||
|
Action<bool, string> _updateFunc;
|
||||||
|
private Config _config;
|
||||||
|
|
||||||
|
public event EventHandler<ResultEventArgs> AbsoluteCompleted;
|
||||||
|
|
||||||
|
public class ResultEventArgs : EventArgs
|
||||||
|
{
|
||||||
|
public bool Success;
|
||||||
|
public string Msg;
|
||||||
|
|
||||||
|
public ResultEventArgs(bool success, string msg)
|
||||||
|
{
|
||||||
|
this.Success = success;
|
||||||
|
this.Msg = msg;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private readonly string nLatestUrl = Global.NUrl + "/latest";
|
||||||
|
private const string nUrl = Global.NUrl + "/download/{0}/v2rayN.zip";
|
||||||
|
private readonly string v2flyCoreLatestUrl = Global.v2flyCoreUrl + "/latest";
|
||||||
|
private const string v2flyCoreUrl = Global.v2flyCoreUrl + "/download/{0}/v2ray-windows-{1}.zip";
|
||||||
|
private readonly string xrayCoreLatestUrl = Global.xrayCoreUrl + "/latest";
|
||||||
|
private const string xrayCoreUrl = Global.xrayCoreUrl + "/download/{0}/Xray-windows-{1}.zip";
|
||||||
|
private const string geoUrl = "https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/{0}.dat";
|
||||||
|
|
||||||
|
public void CheckUpdateGuiN(Config config, Action<bool, string> update)
|
||||||
|
{
|
||||||
|
_config = config;
|
||||||
|
_updateFunc = update;
|
||||||
|
|
||||||
|
DownloadHandle downloadHandle = null;
|
||||||
|
if (downloadHandle == null)
|
||||||
|
{
|
||||||
|
downloadHandle = new DownloadHandle();
|
||||||
|
|
||||||
|
downloadHandle.UpdateCompleted += (sender2, args) =>
|
||||||
|
{
|
||||||
|
if (args.Success)
|
||||||
|
{
|
||||||
|
_updateFunc(false, UIRes.I18N("MsgDownloadV2rayCoreSuccessfully"));
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string fileName = Utils.GetPath(Global.DownloadFileName);
|
||||||
|
Process process = new Process
|
||||||
|
{
|
||||||
|
StartInfo = new ProcessStartInfo
|
||||||
|
{
|
||||||
|
FileName = "v2rayUpgrade.exe",
|
||||||
|
Arguments = "\"" + fileName + "\"",
|
||||||
|
WorkingDirectory = Utils.StartupPath()
|
||||||
|
}
|
||||||
|
};
|
||||||
|
process.Start();
|
||||||
|
if (process.Id > 0)
|
||||||
|
{
|
||||||
|
_updateFunc(true, "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_updateFunc(false, ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_updateFunc(false, args.Msg);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
downloadHandle.Error += (sender2, args) =>
|
||||||
|
{
|
||||||
|
_updateFunc(false, args.GetException().Message);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
AbsoluteCompleted += (sender2, args) =>
|
||||||
|
{
|
||||||
|
if (args.Success)
|
||||||
|
{
|
||||||
|
_updateFunc(false, string.Format(UIRes.I18N("MsgParsingSuccessfully"), "v2rayN"));
|
||||||
|
|
||||||
|
string url = args.Msg;
|
||||||
|
askToDownload(downloadHandle, url);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_updateFunc(false, args.Msg);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
_updateFunc(false, string.Format(UIRes.I18N("MsgStartUpdating"), "v2rayN"));
|
||||||
|
CheckUpdateAsync("v2rayN");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void CheckUpdateCore(string type, Config config, Action<bool, string> update)
|
||||||
|
{
|
||||||
|
_config = config;
|
||||||
|
_updateFunc = update;
|
||||||
|
|
||||||
|
DownloadHandle downloadHandle = null;
|
||||||
|
if (downloadHandle == null)
|
||||||
|
{
|
||||||
|
downloadHandle = new DownloadHandle();
|
||||||
|
downloadHandle.UpdateCompleted += (sender2, args) =>
|
||||||
|
{
|
||||||
|
if (args.Success)
|
||||||
|
{
|
||||||
|
_updateFunc(false, UIRes.I18N("MsgDownloadV2rayCoreSuccessfully"));
|
||||||
|
_updateFunc(false, UIRes.I18N("MsgUnpacking"));
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
_updateFunc(true, "");
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_updateFunc(false, ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_updateFunc(false, args.Msg);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
downloadHandle.Error += (sender2, args) =>
|
||||||
|
{
|
||||||
|
_updateFunc(true, args.GetException().Message);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
AbsoluteCompleted += (sender2, args) =>
|
||||||
|
{
|
||||||
|
if (args.Success)
|
||||||
|
{
|
||||||
|
_updateFunc(false, string.Format(UIRes.I18N("MsgParsingSuccessfully"), "Core"));
|
||||||
|
string url = args.Msg;
|
||||||
|
askToDownload(downloadHandle, url);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_updateFunc(false, args.Msg);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
_updateFunc(false, string.Format(UIRes.I18N("MsgStartUpdating"), "Core"));
|
||||||
|
CheckUpdateAsync(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void UpdateSubscriptionProcess(Config config, Action<bool, string> update)
|
||||||
|
{
|
||||||
|
_config = config;
|
||||||
|
_updateFunc = update;
|
||||||
|
|
||||||
|
_updateFunc(false, UIRes.I18N("MsgUpdateSubscriptionStart"));
|
||||||
|
|
||||||
|
if (config.subItem == null || config.subItem.Count <= 0)
|
||||||
|
{
|
||||||
|
_updateFunc(false, UIRes.I18N("MsgNoValidSubscription"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int k = 1; k <= config.subItem.Count; k++)
|
||||||
|
{
|
||||||
|
string id = config.subItem[k - 1].id.Trim();
|
||||||
|
string url = config.subItem[k - 1].url.Trim();
|
||||||
|
string hashCode = $"{k}->";
|
||||||
|
if (config.subItem[k - 1].enabled == false)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (Utils.IsNullOrEmpty(id) || Utils.IsNullOrEmpty(url))
|
||||||
|
{
|
||||||
|
_updateFunc(false, $"{hashCode}{UIRes.I18N("MsgNoValidSubscription")}");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
DownloadHandle downloadHandle3 = new DownloadHandle();
|
||||||
|
downloadHandle3.UpdateCompleted += (sender2, args) =>
|
||||||
|
{
|
||||||
|
if (args.Success)
|
||||||
|
{
|
||||||
|
_updateFunc(false, $"{hashCode}{UIRes.I18N("MsgGetSubscriptionSuccessfully")}");
|
||||||
|
string result = Utils.Base64Decode(args.Msg);
|
||||||
|
if (Utils.IsNullOrEmpty(result))
|
||||||
|
{
|
||||||
|
_updateFunc(false, $"{hashCode}{UIRes.I18N("MsgSubscriptionDecodingFailed")}");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ConfigHandler.RemoveServerViaSubid(ref config, id);
|
||||||
|
_updateFunc(false, $"{hashCode}{UIRes.I18N("MsgClearSubscription")}");
|
||||||
|
// RefreshServers();
|
||||||
|
int ret = MainFormHandler.Instance.AddBatchServers(config, result, id);
|
||||||
|
if (ret > 0)
|
||||||
|
{
|
||||||
|
// RefreshServers();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_updateFunc(false, $"{hashCode}{UIRes.I18N("MsgFailedImportSubscription")}");
|
||||||
|
}
|
||||||
|
_updateFunc(true, $"{hashCode}{UIRes.I18N("MsgUpdateSubscriptionEnd")}");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_updateFunc(false, args.Msg);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
downloadHandle3.Error += (sender2, args) =>
|
||||||
|
{
|
||||||
|
_updateFunc(false, args.GetException().Message);
|
||||||
|
};
|
||||||
|
|
||||||
|
downloadHandle3.WebDownloadString(url);
|
||||||
|
_updateFunc(false, $"{hashCode}{UIRes.I18N("MsgStartGettingSubscriptions")}");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void UpdateGeoFile(string geoName, Config config, Action<bool, string> update)
|
||||||
|
{
|
||||||
|
_config = config;
|
||||||
|
_updateFunc = update;
|
||||||
|
|
||||||
|
DownloadHandle downloadHandle = null;
|
||||||
|
if (downloadHandle == null)
|
||||||
|
{
|
||||||
|
downloadHandle = new DownloadHandle();
|
||||||
|
|
||||||
|
downloadHandle.UpdateCompleted += (sender2, args) =>
|
||||||
|
{
|
||||||
|
if (args.Success)
|
||||||
|
{
|
||||||
|
_updateFunc(false, UIRes.I18N("MsgDownloadV2rayCoreSuccessfully"));
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string fileName = Utils.GetPath(Global.DownloadFileName);
|
||||||
|
if (File.Exists(fileName))
|
||||||
|
{
|
||||||
|
string targetPath = Utils.GetPath($"{geoName}.dat");
|
||||||
|
if (File.Exists(targetPath))
|
||||||
|
{
|
||||||
|
File.Delete(targetPath);
|
||||||
|
}
|
||||||
|
File.Move(fileName, targetPath);
|
||||||
|
_updateFunc(true, "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_updateFunc(false, ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_updateFunc(false, args.Msg);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
downloadHandle.Error += (sender2, args) =>
|
||||||
|
{
|
||||||
|
_updateFunc(false, args.GetException().Message);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
var url = string.Format(geoUrl, geoName);
|
||||||
|
askToDownload(downloadHandle, url);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region private
|
||||||
|
|
||||||
|
private async void CheckUpdateAsync(string type)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Utils.SetSecurityProtocol();
|
||||||
|
WebRequestHandler webRequestHandler = new WebRequestHandler
|
||||||
|
{
|
||||||
|
AllowAutoRedirect = false
|
||||||
|
};
|
||||||
|
HttpClient httpClient = new HttpClient(webRequestHandler);
|
||||||
|
|
||||||
|
string url;
|
||||||
|
if (type == "v2fly")
|
||||||
|
{
|
||||||
|
url = v2flyCoreLatestUrl;
|
||||||
|
}
|
||||||
|
else if (type == "xray")
|
||||||
|
{
|
||||||
|
url = xrayCoreLatestUrl;
|
||||||
|
}
|
||||||
|
else if (type == "v2rayN")
|
||||||
|
{
|
||||||
|
url = nLatestUrl;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new ArgumentException("Type");
|
||||||
|
}
|
||||||
|
HttpResponseMessage response = await httpClient.GetAsync(url);
|
||||||
|
if (response.StatusCode.ToString() == "Redirect")
|
||||||
|
{
|
||||||
|
responseHandler(type, response.Headers.Location.ToString());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Utils.SaveLog("StatusCode error: " + url);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Utils.SaveLog(ex.Message, ex);
|
||||||
|
_updateFunc(false, ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取V2RayCore版本
|
||||||
|
/// </summary>
|
||||||
|
private string getCoreVersion(string type)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var core = string.Empty;
|
||||||
|
var match = string.Empty;
|
||||||
|
if (type == "v2fly")
|
||||||
|
{
|
||||||
|
core = "v2ray.exe";
|
||||||
|
match = "V2Ray";
|
||||||
|
}
|
||||||
|
else if (type == "xray")
|
||||||
|
{
|
||||||
|
core = "xray.exe";
|
||||||
|
match = "Xray";
|
||||||
|
}
|
||||||
|
string filePath = Utils.GetPath(core);
|
||||||
|
if (!File.Exists(filePath))
|
||||||
|
{
|
||||||
|
string msg = string.Format(UIRes.I18N("NotFoundCore"), @"");
|
||||||
|
//ShowMsg(true, msg);
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
Process p = new Process();
|
||||||
|
p.StartInfo.FileName = filePath;
|
||||||
|
p.StartInfo.Arguments = "-version";
|
||||||
|
p.StartInfo.WorkingDirectory = Utils.StartupPath();
|
||||||
|
p.StartInfo.UseShellExecute = false;
|
||||||
|
p.StartInfo.RedirectStandardOutput = true;
|
||||||
|
p.StartInfo.CreateNoWindow = true;
|
||||||
|
p.StartInfo.StandardOutputEncoding = Encoding.UTF8;
|
||||||
|
p.Start();
|
||||||
|
p.WaitForExit(5000);
|
||||||
|
string echo = p.StandardOutput.ReadToEnd();
|
||||||
|
string version = Regex.Match(echo, $"{match} ([0-9.]+) \\(").Groups[1].Value;
|
||||||
|
return version;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Utils.SaveLog(ex.Message, ex);
|
||||||
|
_updateFunc(false, ex.Message);
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void responseHandler(string type, string redirectUrl)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string version = redirectUrl.Substring(redirectUrl.LastIndexOf("/", StringComparison.Ordinal) + 1);
|
||||||
|
|
||||||
|
string curVersion;
|
||||||
|
string message;
|
||||||
|
string url;
|
||||||
|
if (type == "v2fly")
|
||||||
|
{
|
||||||
|
curVersion = "v" + getCoreVersion(type);
|
||||||
|
message = string.Format(UIRes.I18N("IsLatestCore"), curVersion);
|
||||||
|
string osBit = Environment.Is64BitProcess ? "64" : "32";
|
||||||
|
url = string.Format(v2flyCoreUrl, version, osBit);
|
||||||
|
}
|
||||||
|
else if (type == "xray")
|
||||||
|
{
|
||||||
|
curVersion = "v" + getCoreVersion(type);
|
||||||
|
message = string.Format(UIRes.I18N("IsLatestCore"), curVersion);
|
||||||
|
string osBit = Environment.Is64BitProcess ? "64" : "32";
|
||||||
|
url = string.Format(xrayCoreUrl, version, osBit);
|
||||||
|
}
|
||||||
|
else if (type == "v2rayN")
|
||||||
|
{
|
||||||
|
curVersion = FileVersionInfo.GetVersionInfo(Utils.GetExePath()).FileVersion.ToString();
|
||||||
|
message = string.Format(UIRes.I18N("IsLatestN"), curVersion);
|
||||||
|
url = string.Format(nUrl, version);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new ArgumentException("Type");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (curVersion == version)
|
||||||
|
{
|
||||||
|
AbsoluteCompleted?.Invoke(this, new ResultEventArgs(false, message));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
AbsoluteCompleted?.Invoke(this, new ResultEventArgs(true, url));
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Utils.SaveLog(ex.Message, ex);
|
||||||
|
_updateFunc(false, ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void askToDownload(DownloadHandle downloadHandle, string url)
|
||||||
|
{
|
||||||
|
if (UI.ShowYesNo(string.Format(UIRes.I18N("DownloadYesNo"), url)) == DialogResult.Yes)
|
||||||
|
{
|
||||||
|
if (httpProxyTest() > 0)
|
||||||
|
{
|
||||||
|
int httpPort = _config.GetLocalPort(Global.InboundHttp);
|
||||||
|
WebProxy webProxy = new WebProxy(Global.Loopback, httpPort);
|
||||||
|
downloadHandle.DownloadFileAsync(url, webProxy, 600);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
downloadHandle.DownloadFileAsync(url, null, 600);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private int httpProxyTest()
|
||||||
|
{
|
||||||
|
SpeedtestHandler statistics = new SpeedtestHandler(ref _config);
|
||||||
|
return statistics.RunAvailabilityCheck();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
|
@ -249,8 +249,12 @@ namespace v2rayN.Handler
|
||||||
var it = Utils.DeepCopy(rules);
|
var it = Utils.DeepCopy(rules);
|
||||||
it.ip = null;
|
it.ip = null;
|
||||||
it.type = "field";
|
it.type = "field";
|
||||||
for (int k = 0; k < it.domain.Count; k++)
|
for (int k = it.domain.Count - 1; k >= 0; k--)
|
||||||
{
|
{
|
||||||
|
if (it.domain[k].StartsWith("#"))
|
||||||
|
{
|
||||||
|
it.domain.RemoveAt(k);
|
||||||
|
}
|
||||||
it.domain[k] = it.domain[k].Replace(Global.RoutingRuleComma, ",");
|
it.domain[k] = it.domain[k].Replace(Global.RoutingRuleComma, ",");
|
||||||
}
|
}
|
||||||
//if (Utils.IsNullOrEmpty(it.port))
|
//if (Utils.IsNullOrEmpty(it.port))
|
||||||
|
@ -704,7 +708,7 @@ namespace v2rayN.Handler
|
||||||
break;
|
break;
|
||||||
case "grpc":
|
case "grpc":
|
||||||
var grpcSettings = new GrpcSettings();
|
var grpcSettings = new GrpcSettings();
|
||||||
|
|
||||||
grpcSettings.serviceName = config.path();
|
grpcSettings.serviceName = config.path();
|
||||||
streamSettings.grpcSettings = grpcSettings;
|
streamSettings.grpcSettings = grpcSettings;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -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.15")]
|
[assembly: AssemblyFileVersion("4.16")]
|
||||||
|
|
|
@ -766,9 +766,9 @@ namespace v2rayN
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
IDataObject data = Clipboard.GetDataObject();
|
IDataObject data = Clipboard.GetDataObject();
|
||||||
if (data.GetDataPresent(DataFormats.Text))
|
if (data.GetDataPresent(DataFormats.UnicodeText))
|
||||||
{
|
{
|
||||||
strData = data.GetData(DataFormats.Text).ToString();
|
strData = data.GetData(DataFormats.UnicodeText).ToString();
|
||||||
}
|
}
|
||||||
return strData;
|
return strData;
|
||||||
}
|
}
|
||||||
|
|
|
@ -138,6 +138,7 @@
|
||||||
<DependentUpon>RoutingRuleSettingForm.cs</DependentUpon>
|
<DependentUpon>RoutingRuleSettingForm.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Handler\ShareHandler.cs" />
|
<Compile Include="Handler\ShareHandler.cs" />
|
||||||
|
<Compile Include="Handler\UpdateHandle.cs" />
|
||||||
<Compile Include="Mode\ComboItem.cs" />
|
<Compile Include="Mode\ComboItem.cs" />
|
||||||
<Compile Include="Forms\MainForm.cs">
|
<Compile Include="Forms\MainForm.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
|
|
Loading…
Reference in a new issue