diff --git a/v2rayN/v2rayN/Forms/OptionSettingForm.Designer.cs b/v2rayN/v2rayN/Forms/OptionSettingForm.Designer.cs index d9384320..e790664b 100644 --- a/v2rayN/v2rayN/Forms/OptionSettingForm.Designer.cs +++ b/v2rayN/v2rayN/Forms/OptionSettingForm.Designer.cs @@ -68,6 +68,8 @@ this.txtKcpmtu = new System.Windows.Forms.TextBox(); this.label6 = new System.Windows.Forms.Label(); this.tabPage7 = new System.Windows.Forms.TabPage(); + this.txtautoUpdateSubInterval = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); this.chkEnableSecurityProtocolTls13 = new System.Windows.Forms.CheckBox(); this.chkEnableAutoAdjustMainLvColWidth = new System.Windows.Forms.CheckBox(); this.btnSetLoopback = new System.Windows.Forms.Button(); @@ -374,6 +376,8 @@ // tabPage7 // resources.ApplyResources(this.tabPage7, "tabPage7"); + this.tabPage7.Controls.Add(this.txtautoUpdateSubInterval); + this.tabPage7.Controls.Add(this.label3); this.tabPage7.Controls.Add(this.chkEnableSecurityProtocolTls13); this.tabPage7.Controls.Add(this.chkEnableAutoAdjustMainLvColWidth); this.tabPage7.Controls.Add(this.btnSetLoopback); @@ -388,6 +392,16 @@ this.tabPage7.Name = "tabPage7"; this.tabPage7.UseVisualStyleBackColor = true; // + // txtautoUpdateSubInterval + // + resources.ApplyResources(this.txtautoUpdateSubInterval, "txtautoUpdateSubInterval"); + this.txtautoUpdateSubInterval.Name = "txtautoUpdateSubInterval"; + // + // label3 + // + resources.ApplyResources(this.label3, "label3"); + this.label3.Name = "label3"; + // // chkEnableSecurityProtocolTls13 // resources.ApplyResources(this.chkEnableSecurityProtocolTls13, "chkEnableSecurityProtocolTls13"); @@ -697,5 +711,7 @@ private System.Windows.Forms.Label label4; private System.Windows.Forms.TextBox txtpass; private System.Windows.Forms.TextBox txtuser; + private System.Windows.Forms.TextBox txtautoUpdateSubInterval; + private System.Windows.Forms.Label label3; } } \ No newline at end of file diff --git a/v2rayN/v2rayN/Forms/OptionSettingForm.cs b/v2rayN/v2rayN/Forms/OptionSettingForm.cs index c3ec5c6b..1c713df8 100644 --- a/v2rayN/v2rayN/Forms/OptionSettingForm.cs +++ b/v2rayN/v2rayN/Forms/OptionSettingForm.cs @@ -112,6 +112,7 @@ namespace v2rayN.Forms chkIgnoreGeoUpdateCore.Checked = config.ignoreGeoUpdateCore; txtautoUpdateInterval.Text = config.autoUpdateInterval.ToString(); + txtautoUpdateSubInterval.Text = config.autoUpdateSubInterval.ToString(); chkEnableAutoAdjustMainLvColWidth.Checked = config.uiItem.enableAutoAdjustMainLvColWidth; chkEnableSecurityProtocolTls13.Checked = config.enableSecurityProtocolTls13; } @@ -305,6 +306,7 @@ namespace v2rayN.Forms config.ignoreGeoUpdateCore = chkIgnoreGeoUpdateCore.Checked; config.autoUpdateInterval = Utils.ToInt(txtautoUpdateInterval.Text); + config.autoUpdateSubInterval = Utils.ToInt(txtautoUpdateSubInterval.Text); config.uiItem.enableAutoAdjustMainLvColWidth = chkEnableAutoAdjustMainLvColWidth.Checked; config.enableSecurityProtocolTls13 = chkEnableSecurityProtocolTls13.Checked; diff --git a/v2rayN/v2rayN/Forms/OptionSettingForm.resx b/v2rayN/v2rayN/Forms/OptionSettingForm.resx index bad14b8b..d9adddf4 100644 --- a/v2rayN/v2rayN/Forms/OptionSettingForm.resx +++ b/v2rayN/v2rayN/Forms/OptionSettingForm.resx @@ -150,8 +150,8 @@ 12 - - txtpass + + 4, 22 9 @@ -160,7 +160,7 @@ groupBox1 - 8 + 10 tti @@ -177,8 +177,17 @@ label10 - - True + + 10 + + + tabPage7 + + + 5 + + + 94, 21 9 @@ -192,29 +201,29 @@ txtautoUpdateInterval + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + 38 - - label16 - Top 102, 16 - - 4, 22 + + 0 - - txtKcptti + + 14 tabPage3 - - btnSetLoopback + + Core Type 5 @@ -228,6 +237,9 @@ 111, 100 + + 30 + True @@ -255,14 +267,20 @@ 285, 61 - - tabPage6 + + True + + + readBufferSize + + + 234, 16 tabPage6 - 2 + 4 System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -279,11 +297,17 @@ 12 + + 736, 60 + + + 0, 0 + chkEnableSecurityProtocolTls13 - - Core Type + + NoControl Fill @@ -297,8 +321,11 @@ 722, 421 - - Custom DNS (multiple, separated by commas (,)) + + NoControl + + + 30, 165 95, 12 @@ -306,8 +333,11 @@ System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 14 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 45, 98 39 @@ -315,30 +345,30 @@ 317, 12 - - 30, 138 - 59, 12 - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 0 - - - 37 + + 354, 159 groupBox1 + + 8 + + + tabPage7 + 18, 28 &Cancel + + 36 + 111, 62 @@ -351,35 +381,29 @@ groupBox1 - - Set Windows10 UWP Loopback + + NoControl + + + tabPageCoreType tabPage7 - - groupBox1 + + 736, 10 728, 427 - 15, 165 + 15, 193 - - txtKcpreadBufferSize + + 15, 108 - - cmbloglevel - - - label4 - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Allow connections from the LAN + + txtKcpuplinkCapacity 2 @@ -396,9 +420,6 @@ 11 - - $this - label11 @@ -411,12 +432,12 @@ NoControl - - tabPage6 - 0, 10 + + 143, 20 + cmbCoreType2 @@ -426,6 +447,9 @@ 43 + + labCoreType1 + tabPage6 @@ -435,17 +459,23 @@ tabControl1 + + Automatic update interval of and Geo (hours) + $this 7 + + 736, 523 + NoControl - - 5 + + none System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -456,8 +486,14 @@ 117, 42 - - 0 + + 6 + + + tabPage7 + + + 43 tabPage6 @@ -465,9 +501,6 @@ Fill - - 576, 16 - groupBox1 @@ -486,14 +519,14 @@ 45, 176 - - 15, 16 - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 15, 215 + - 1 + 3 89, 12 @@ -507,14 +540,17 @@ 0 - - 97, 20 + + 97, 21 v2rayN settings - - 15 + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 117, 94 @@ -540,6 +576,9 @@ 8 + + txtKcpdownlinkCapacity + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -549,23 +588,14 @@ Automatically start at system startup - - 728, 427 - 1 - - 36 + + txtKcptti - - 6 - - - tabPage6 - - - 45, 150 + + Vertical 281, 12 @@ -600,12 +630,15 @@ 78, 21 - - Core Type + + Log level tabControl1 + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + 59, 12 @@ -624,23 +657,29 @@ tabPageCoreType + + True + Statistics freshrate - - True + + 5 + + + 107, 12 + + + 75, 23 89, 12 - - 59, 12 + + btnOK - - NoControl - - - Core Type + + chkKcpcongestion 18, 66 @@ -651,14 +690,17 @@ 11 + + 8, 17 + 4, 4, 4, 4 tabPage6 - - 5 + + 37 Turn on Sniffing @@ -669,14 +711,17 @@ groupBox1 + + txtpass + tabPageCoreType - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 59, 12 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 97, 21 System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -690,9 +735,6 @@ 29 - - tabPage6 - tabPageCoreType @@ -714,8 +756,8 @@ label12 - - label2 + + NoControl Auth user @@ -738,14 +780,14 @@ System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 groupBox1 - 5 + 7 18, 104 @@ -762,11 +804,11 @@ 728, 427 - - tabPage1 + + 36 - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 576, 16 System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -774,21 +816,21 @@ 59, 12 - - 10 + + True + + + Listening port panel1 - - 30 + + NoControl 53, 12 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 12 @@ -804,14 +846,11 @@ chkAutoRun - - groupBox1 - 94, 21 - - 4 + + 345, 62 10 @@ -819,26 +858,29 @@ Core Type - - 15, 129 + + 143, 20 + + + 3, 3, 3, 3 chkudpEnabled - - 46 - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 True - - 8, 17 + + tabPage6 - - label9 + + tabPage1 + + + Core Type tabPage7 @@ -855,9 +897,6 @@ 1 - - 12 - System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -870,18 +909,21 @@ True - - Auth pass - label7 + + allowInsecure + txtlocalPort 41 + + 236, 28 + tabPage7 @@ -909,23 +951,14 @@ protocol - - 15, 192 - - - Turn on Mux Multiplexing - - - tabPageCoreType + + True 23, 12 - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 97, 20 + + http 638, 356 @@ -933,6 +966,9 @@ socks + + 8 + 3, 3 @@ -978,11 +1014,11 @@ System proxy settings - - True + + groupBox1 - - 89, 12 + + tabControl1 NoControl @@ -990,38 +1026,26 @@ 5 - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 2 chkEnableStatistics - - 97, 21 - - - 353, 12 - - - groupBox1 - cmbCoreType4 - - 45, 46 + + 305, 12 193, 162 - - tabPageCoreType + + True - - 2 - - - 107, 12 + + 46 System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -1029,17 +1053,11 @@ tabPage6 - - 0, 0 + + label2 - - 234, 16 - - - 728, 427 - - - 728, 427 + + Set Windows10 UWP Loopback 9 @@ -1054,13 +1072,13 @@ 101, 12 - 9 + 11 - - groupBox1 + + tabPage7 - - 143, 20 + + 12 20 @@ -1071,23 +1089,20 @@ groupBox2 + + 6 + Enable Statistics (Realtime netspeed and traffic records. Require restart the v2rayN client) 107, 12 - - 0, 0, 0, 0 - 736, 453 - - tabPage6 - - - txtremoteDNS + + tabPageCoreType 4 @@ -1095,21 +1110,21 @@ True - - txtsystemProxyExceptions + + Automatic update interval of subscriptions (hours) - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 246, 16 + + + txtautoUpdateSubInterval + + + Do not use proxy server for addresses beginning with 11 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -1119,26 +1134,23 @@ System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True - - - 345, 62 + + 37 chkKeepOlderDedupl - - True + + 15, 129 - - 2 + + 42 - - Automatically adjust column width after updating subscription + + 5 True @@ -1170,29 +1182,35 @@ 117, 146 + + Automatically adjust column width after updating subscription + + + 0 + 30, 376 - - 11 + + 97, 20 CoreType settings - - System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - tabPage3 + + 2 + 40 15, 160 - - Vertical + + 45, 46 38 @@ -1203,12 +1221,18 @@ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 9 + label1 Core: KCP settings + + NoControl + cmbCoreType5 @@ -1218,8 +1242,8 @@ True - - 59, 12 + + 0, 0 NoControl @@ -1239,8 +1263,8 @@ tabControl1 - - 736, 10 + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 45, 124 @@ -1251,23 +1275,26 @@ Core Type + + btnSetLoopback + True + + 506, 16 + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 345, 100 - 42 10 - - 45, 98 + + label16 44 @@ -1275,11 +1302,8 @@ 224, 29 - - 2 - - - tabPage6 + + chkEnableAutoAdjustMainLvColWidth labCoreType3 @@ -1287,11 +1311,8 @@ chkIgnoreGeoUpdateCore - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 40 + + Allow connections from the LAN 161, 60 @@ -1299,8 +1320,8 @@ System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - chkEnableAutoAdjustMainLvColWidth + + tabPage6 True @@ -1320,8 +1341,8 @@ 39 - - 8 + + tabPageCoreType 35 @@ -1335,20 +1356,29 @@ System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + labCoreType6 + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tabPage7 + + txtKcpreadBufferSize + + + 143, 20 System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Log level + + groupBox1 - - tabControl1 + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Fill 638, 219 @@ -1359,36 +1389,27 @@ OptionSettingForm - - 14 + + 2 txtuser - - Core: basic settings - 120, 21 - 10 + 12 groupBox2 - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - cmbCoreType6 + + 39 System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True - 1 @@ -1398,38 +1419,38 @@ 13 - - NoControl - 198, 16 + + 6 + 8, 52 - - 9 - - + True + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + tabPage7 True - - allowInsecure + + System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 True - - NoControl + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 1 + + 3, 3, 3, 3 23, 12 @@ -1449,48 +1470,42 @@ Exception + + 117, 172 + 3, 3, 3, 3 0 - - chklogEnabled - 4, 22 - - groupBox1 + + 345, 100 94, 21 - - 3 - - + NoControl - - 117, 120 + + 728, 427 NoControl - - 204, 16 - - - 4, 22 - 41 94, 21 + + debug + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -1509,18 +1524,24 @@ 143, 20 + + True + tabPage1 + + 3 + 3, 3, 3, 3 + + 9 + tabPageCoreType - - 143, 20 - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -1536,8 +1557,8 @@ 4, 22 - - Listening port + + tabPage6 7 @@ -1560,17 +1581,17 @@ 1 - - 94, 21 + + Core: basic settings - - txtKcpuplinkCapacity + + Core Type tabPage2 - - 59, 12 + + chklogEnabled tabControl1 @@ -1578,8 +1599,8 @@ tabPage7 - - labCoreType1 + + txtsystemProxyExceptions System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -1599,20 +1620,23 @@ 40 - - Automatic update interval of subscriptions and Geo (hours) + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 42 - - http + + 4, 22 23 - - labCoreType6 + + NoControl + + + label3 6 @@ -1623,20 +1647,20 @@ groupBox1 - - NoControl + + 15, 16 System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - label13 + + True 1 - - 6 + + $this 8 @@ -1644,17 +1668,17 @@ 59, 12 - - tabPageCoreType + + txtremoteDNS - - tabPageCoreType + + Vertical 0, 463 - - True + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 True @@ -1662,8 +1686,8 @@ 3 - - 117, 172 + + 1 11 @@ -1671,8 +1695,14 @@ System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 39 + + 89, 12 + + + 15 + + + 6 97, 21 @@ -1683,23 +1713,20 @@ 397, 27 - - 36 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 45, 72 - - - Fill - - + groupBox1 + + tabPage6 + 32 - - 15, 108 + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Core: DNS settings @@ -1707,8 +1734,8 @@ 345, 24 - - 143, 20 + + 45, 72 cbFreshrate @@ -1728,41 +1755,53 @@ tabPage7 + + tabPageCoreType + 8 - - 125, 12 + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - NoControl + + 204, 16 cmbCoreType1 - - 75, 23 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 writeBufferSize - + + uplinkCapacity + + + 59, 12 + + 10 4 - - uplinkCapacity + + 0, 0, 0, 0 - - 736, 523 + + 40 143, 20 - - txtKcpdownlinkCapacity + + label4 + + + Bottom System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -1770,20 +1809,20 @@ NoControl - - Vertical + + True - - 6 + + 30, 138 - - 7 + + 59, 12 2 - 390, 132 + 354, 132 Settings @@ -1791,14 +1830,14 @@ 3 - - tabPage7 + + cmbCoreType6 - - 6 + + 143, 20 - - NoControl + + cmbloglevel label5 @@ -1806,38 +1845,44 @@ System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 390, 16 + groupBox2 - - 15, 187 + + 15, 192 - - btnOK + + tabPage6 6 - - NoControl + + 6 - - debug + + label13 System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 0 + + Auth pass chkmuxEnabled - - none + + panel2 - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 728, 427 + + + tabPage6 3 @@ -1845,17 +1890,17 @@ 15, 84 - - chkKcpcongestion + + 117, 120 224, 65 - - labCoreType5 + + 342, 17 - - 0, 0 + + Core Type Enable UDP @@ -1869,12 +1914,15 @@ 37 - - 3, 3, 3, 3 + + True 9 + + 14 + 126, 16 @@ -1890,35 +1938,35 @@ 75, 23 - - Do not use proxy server for addresses beginning with + + 269, 12 - - 390, 16 + + NoControl 94, 21 - - readBufferSize + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 2 + + 45, 150 0 - - True + + groupBox1 - - 342, 17 + + 0 94, 21 - - 3 + + 97, 20 System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -1929,29 +1977,32 @@ 38 - - 236, 28 + + Custom DNS (multiple, separated by commas (,)) - - Bottom + + 728, 427 - - 3 + + 11 - - 6 + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 4 - - 143, 20 + + groupBox1 - - 3, 3, 3, 3 + + 125, 12 - - panel2 + + labCoreType5 + + + 1 System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -1959,20 +2010,20 @@ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Core Type + + 2 + + + Turn on Mux Multiplexing + + + True label6 - - 246, 16 - - - 506, 16 - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 3 txtKcpwriteBufferSize @@ -1989,14 +2040,14 @@ NoControl - - 37 + + label9 NoControl - - 736, 60 + + 2 label14 diff --git a/v2rayN/v2rayN/Forms/OptionSettingForm.zh-Hans.resx b/v2rayN/v2rayN/Forms/OptionSettingForm.zh-Hans.resx index f9cf4aea..5104d229 100644 --- a/v2rayN/v2rayN/Forms/OptionSettingForm.zh-Hans.resx +++ b/v2rayN/v2rayN/Forms/OptionSettingForm.zh-Hans.resx @@ -250,6 +250,15 @@ v2rayN设置 + + 248, 159 + + + 173, 12 + + + 自动更新订阅的间隔(单位小时) + 启用安全协议TLS v1.3 (订阅/检查更新/测速) @@ -263,13 +272,13 @@ 解除Windows10 UWP应用回环代理限制 - 274, 134 + 248, 134 - 227, 12 + 191, 12 - 自动更新订阅和Geo文件的间隔(单位小时) + 自动更新Geo文件的间隔(单位小时) 150, 16 diff --git a/v2rayN/v2rayN/Handler/MainFormHandler.cs b/v2rayN/v2rayN/Handler/MainFormHandler.cs index 64df0711..54154e19 100644 --- a/v2rayN/v2rayN/Handler/MainFormHandler.cs +++ b/v2rayN/v2rayN/Handler/MainFormHandler.cs @@ -208,40 +208,54 @@ namespace v2rayN.Handler private void UpdateTaskRun(Config config, Action update) { + var autoUpdateSubTime = DateTime.Now; + var autoUpdateGeoTime = DateTime.Now; + + Thread.Sleep(60000); + Utils.SaveLog("UpdateTaskRun"); + var updateHandle = new UpdateHandle(); while (true) { - Thread.Sleep(60000); - if (config.autoUpdateInterval <= 0) + var dtNow = DateTime.Now; + + if (config.autoUpdateSubInterval > 0) { - continue; + if ((dtNow - autoUpdateSubTime).Hours % config.autoUpdateSubInterval == 0) + { + updateHandle.UpdateSubscriptionProcess(config, true, (bool success, string msg) => + { + update(success, msg); + if (success) + Utils.SaveLog("subscription" + msg); + }); + autoUpdateSubTime = dtNow; + } + Thread.Sleep(60000); } - Utils.SaveLog("UpdateTaskRun"); - updateHandle.UpdateSubscriptionProcess(config, true, (bool success, string msg) => + if (config.autoUpdateInterval > 0) { - update(success, msg); - if (success) - Utils.SaveLog("subscription" + msg); - }); + if ((dtNow - autoUpdateGeoTime).Hours % config.autoUpdateInterval == 0) + { + updateHandle.UpdateGeoFile("geosite", config, (bool success, string msg) => + { + update(false, msg); + if (success) + Utils.SaveLog("geosite" + msg); + }); - Thread.Sleep(60000); + updateHandle.UpdateGeoFile("geoip", config, (bool success, string msg) => + { + update(false, msg); + if (success) + Utils.SaveLog("geoip" + msg); + }); + autoUpdateGeoTime = dtNow; + } + } - updateHandle.UpdateGeoFile("geosite", config, (bool success, string msg) => - { - update(false, msg); - if (success) - Utils.SaveLog("geosite" + msg); - }); - - updateHandle.UpdateGeoFile("geoip", config, (bool success, string msg) => - { - update(false, msg); - if (success) - Utils.SaveLog("geoip" + msg); - }); - - Thread.Sleep(1000 * 3600 * config.autoUpdateInterval); + Thread.Sleep(1000 * 3600); } } diff --git a/v2rayN/v2rayN/Mode/Config.cs b/v2rayN/v2rayN/Mode/Config.cs index 20913046..612d6a1a 100644 --- a/v2rayN/v2rayN/Mode/Config.cs +++ b/v2rayN/v2rayN/Mode/Config.cs @@ -125,10 +125,9 @@ namespace v2rayN.Mode get; set; } - public int autoUpdateInterval - { - get; set; - } = 0; + public int autoUpdateInterval { get; set; } = 0; + + public int autoUpdateSubInterval { get; set; } = 0; public bool enableSecurityProtocolTls13 {