diff --git a/v2rayN/v2rayN/Forms/OptionSettingForm.Designer.cs b/v2rayN/v2rayN/Forms/OptionSettingForm.Designer.cs index e5c94c06..66c4f9ff 100644 --- a/v2rayN/v2rayN/Forms/OptionSettingForm.Designer.cs +++ b/v2rayN/v2rayN/Forms/OptionSettingForm.Designer.cs @@ -69,6 +69,7 @@ this.txtKcpmtu = new System.Windows.Forms.TextBox(); this.label6 = new System.Windows.Forms.Label(); this.tabPage7 = new System.Windows.Forms.TabPage(); + this.chkEnableSecurityProtocolTls13 = new System.Windows.Forms.CheckBox(); this.chkEnableAutoAdjustMainLvColWidth = new System.Windows.Forms.CheckBox(); this.btnSetLoopback = new System.Windows.Forms.Button(); this.txtautoUpdateInterval = new System.Windows.Forms.TextBox(); @@ -376,6 +377,7 @@ // tabPage7 // resources.ApplyResources(this.tabPage7, "tabPage7"); + this.tabPage7.Controls.Add(this.chkEnableSecurityProtocolTls13); this.tabPage7.Controls.Add(this.chkEnableAutoAdjustMainLvColWidth); this.tabPage7.Controls.Add(this.btnSetLoopback); this.tabPage7.Controls.Add(this.txtautoUpdateInterval); @@ -392,6 +394,12 @@ this.tabPage7.Name = "tabPage7"; this.tabPage7.UseVisualStyleBackColor = true; // + // chkEnableSecurityProtocolTls13 + // + resources.ApplyResources(this.chkEnableSecurityProtocolTls13, "chkEnableSecurityProtocolTls13"); + this.chkEnableSecurityProtocolTls13.Name = "chkEnableSecurityProtocolTls13"; + this.chkEnableSecurityProtocolTls13.UseVisualStyleBackColor = true; + // // chkEnableAutoAdjustMainLvColWidth // resources.ApplyResources(this.chkEnableAutoAdjustMainLvColWidth, "chkEnableAutoAdjustMainLvColWidth"); @@ -614,5 +622,6 @@ private System.Windows.Forms.Label label15; private System.Windows.Forms.Button btnSetLoopback; private System.Windows.Forms.CheckBox chkEnableAutoAdjustMainLvColWidth; + private System.Windows.Forms.CheckBox chkEnableSecurityProtocolTls13; } } \ No newline at end of file diff --git a/v2rayN/v2rayN/Forms/OptionSettingForm.cs b/v2rayN/v2rayN/Forms/OptionSettingForm.cs index 7a8c0525..a21e6b31 100644 --- a/v2rayN/v2rayN/Forms/OptionSettingForm.cs +++ b/v2rayN/v2rayN/Forms/OptionSettingForm.cs @@ -124,6 +124,7 @@ namespace v2rayN.Forms cmbCoreType.SelectedIndex = (int)config.coreType; txtautoUpdateInterval.Text = config.autoUpdateInterval.ToString(); chkEnableAutoAdjustMainLvColWidth.Checked = config.uiItem.enableAutoAdjustMainLvColWidth; + chkEnableSecurityProtocolTls13.Checked = config.enableSecurityProtocolTls13; } private void btnOK_Click(object sender, EventArgs e) { @@ -308,6 +309,7 @@ namespace v2rayN.Forms config.coreType = (ECoreType)cmbCoreType.SelectedIndex; config.autoUpdateInterval = Utils.ToInt(txtautoUpdateInterval.Text); config.uiItem.enableAutoAdjustMainLvColWidth = chkEnableAutoAdjustMainLvColWidth.Checked; + config.enableSecurityProtocolTls13 = chkEnableSecurityProtocolTls13.Checked; return 0; } diff --git a/v2rayN/v2rayN/Forms/OptionSettingForm.resx b/v2rayN/v2rayN/Forms/OptionSettingForm.resx index f8510aaf..bd348c62 100644 --- a/v2rayN/v2rayN/Forms/OptionSettingForm.resx +++ b/v2rayN/v2rayN/Forms/OptionSettingForm.resx @@ -134,7 +134,7 @@ Keep older when deduplication - 2 + 3 @@ -146,11 +146,11 @@ tabPage7 - - 4 + + 12 - - 0 + + 4, 22 txtKcpwriteBufferSize @@ -159,10 +159,10 @@ groupBox1 - 9 + 10 - - tti + + False 14 @@ -173,9 +173,6 @@ tabControl1 - - label10 - groupBox1 @@ -191,8 +188,8 @@ txtautoUpdateInterval - - 662, 523 + + 2 35 @@ -210,17 +207,17 @@ 102, 16 + + cmbprotocol + 6 - - 14 + + tabPage6 - - 40 - - - 12 + + tabPage3 5 @@ -255,24 +252,30 @@ label13 + + tabPage2 + True - - 234, 16 + + tti - - 4, 22 + + tabPage6 - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + chkdefAllowInsecure - - 1 + + 75, 23 7 + + tabPage7 + 33 @@ -282,8 +285,11 @@ 662, 60 - - label7 + + chkEnableSecurityProtocolTls13 + + + NoControl http @@ -291,8 +297,8 @@ 7 - - chkdefAllowInsecure + + label5 648, 421 @@ -306,6 +312,9 @@ tabPage6 + + 14 + 654, 427 @@ -318,12 +327,21 @@ 15, 63 + + System.Windows.Forms.CheckBox, 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 + 2 Enable UDP + + 198, 16 + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -333,8 +351,8 @@ &Cancel - - 111, 62 + + label10 654, 427 @@ -366,8 +384,8 @@ label4 - - 42 + + 236, 66 txtKcpmtu @@ -378,8 +396,8 @@ 12 - - True + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 label11 @@ -405,17 +423,20 @@ False - - groupBox1 + + tabControl1 - - NoControl + + $this 3 + + 662, 523 + - 11 + 12 System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -429,8 +450,8 @@ 0 - - 19 + + tabPage6 Fill @@ -444,8 +465,8 @@ True - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 39 15, 40 @@ -462,14 +483,17 @@ System.Windows.Forms.Button, 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 + + 15, 211 + + + 1 89, 12 - - info + + NoControl 0 @@ -507,23 +531,17 @@ 8 - - True + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 198, 16 + + Enable Security Protocol TLS v1.3 (subscription/update/speedtest) Automatically start at system startup - - 654, 427 - - - 1 - - - 4, 4, 4, 4 + + Fill txtKcptti @@ -540,11 +558,14 @@ Ignore Geo files when updating core - - 2 + + tabPage7 - - 3, 3, 3, 3 + + 355, 16 + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 3 @@ -552,14 +573,14 @@ System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True + + 662, 453 33, 29 - - 325, 130 + + 1 124, 60 @@ -576,9 +597,6 @@ 59, 12 - - cmbCoreType - v2rayN.Forms.BaseForm, v2rayN, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null @@ -591,9 +609,18 @@ 4 + + 11 + Statistics freshrate + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + 120, 16 @@ -609,17 +636,14 @@ 20, 143 - - 11 + + 15 True - - tabPage6 - - - tabPage6 + + 4, 4, 4, 4 tabPage6 @@ -691,7 +715,7 @@ groupBox1 - 4 + 5 18, 104 @@ -708,8 +732,8 @@ socks - - tabPage1 + + 36 System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -717,6 +741,9 @@ System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + groupBox2 + panel1 @@ -757,7 +784,7 @@ chkudpEnabled - 5 + 6 Allow connections from the LAN @@ -768,8 +795,8 @@ 8, 17 - - label9 + + tabPage1 tabPage7 @@ -792,32 +819,29 @@ 15 - - 6 + + True False - - tabPage6 + + label7 txtlocalPort - - tabControl1 - - - tabPage7 + + info tabPage7 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 19 - - 125, 12 + + readBufferSize tabPage6 @@ -846,6 +870,9 @@ socks + + 8 + 3, 3 @@ -858,7 +885,7 @@ 84, 16 - + tabControl1 @@ -894,20 +921,20 @@ groupBox1 - - 10 + + 253, 134 - + NoControl - - True + + chkEnableStatistics 4 - - 355, 16 + + 4 53, 12 @@ -936,8 +963,8 @@ Set Windows10 UWP Loopback - - False + + 654, 427 System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -945,17 +972,11 @@ 9 - - 8 - - - 0 - 101, 12 - 10 + 11 tabPage7 @@ -966,8 +987,8 @@ 20 - - cmbprotocol + + allowInsecure groupBox2 @@ -981,11 +1002,8 @@ 107, 12 - - 204, 16 - - - 662, 453 + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 $this @@ -1002,20 +1020,20 @@ System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + False + 41 - - tabPage3 - 257, 60 0 - - 94, 21 + + tabControl1 True @@ -1059,12 +1077,15 @@ 257, 25 - - tabPage2 + + 3, 3, 3, 3 tabControl1 + + True + 30, 376 @@ -1077,9 +1098,6 @@ chkAllowIn2 - - System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - tabPage3 @@ -1116,11 +1134,8 @@ Core: KCP settings - - 10 - - - tabPage6 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 error @@ -1140,20 +1155,20 @@ System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - downlinkCapacity + + 8 120, 16 - - 75, 23 + + 2 txtlocalPort2 - - 2 + + True 246, 16 @@ -1161,8 +1176,8 @@ True - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 506, 16 654, 427 @@ -1170,8 +1185,8 @@ 42 - - 15, 108 + + 10 False @@ -1179,8 +1194,8 @@ 206, 29 - - 2 + + downlinkCapacity chkudpEnabled2 @@ -1191,6 +1206,9 @@ chkEnableAutoAdjustMainLvColWidth + + 40 + tabPage1 @@ -1206,14 +1224,14 @@ 2 - - groupBox2 + + NoControl panel2 - - 39 + + 3 8 @@ -1221,9 +1239,15 @@ linkDnsObjectDoc + + tabPage7 + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 125, 12 + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -1239,17 +1263,17 @@ System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Fill + + 638, 219 - - protocol + + 6 - - 4, 22 + + OptionSettingForm - - 15 + + 2 System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -1257,8 +1281,11 @@ 15, 64 + + 111, 62 + - 12 + 13 groupBox2 @@ -1269,9 +1296,6 @@ 5 - - $this - 13 @@ -1281,17 +1305,14 @@ 0 - - 3 - - - chkEnableStatistics + + 23 8, 52 - - True + + 8 78, 21 @@ -1305,8 +1326,8 @@ True - - allowInsecure + + System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 True @@ -1314,17 +1335,14 @@ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 638, 219 - 23, 12 - - 654, 427 + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 8 + + panel2 Exception @@ -1332,29 +1350,29 @@ 37 - - tabControl1 - 345, 100 + + 94, 21 + NoControl - - True + + 654, 427 10 - - NoControl + + 204, 16 17 - - 23 + + 41 94, 21 @@ -1368,9 +1386,6 @@ 0, 463 - - tabPage7 - groupBox1 @@ -1380,9 +1395,6 @@ Do not use proxy server for addresses beginning with - - 8 - http @@ -1416,8 +1428,8 @@ &OK - - 94, 21 + + 10 1 @@ -1443,9 +1455,6 @@ txtsystemProxyExceptions - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - groupBox2 @@ -1461,8 +1470,8 @@ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True + + 4, 22 groupBox1 @@ -1473,8 +1482,8 @@ 6 - - 236, 66 + + protocol tabPage7 @@ -1488,11 +1497,11 @@ True - - 36 + + True - - 7 + + 0 8 @@ -1509,9 +1518,6 @@ True - - 3 - writeBufferSize @@ -1548,8 +1554,8 @@ System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - NoControl + + True 345, 24 @@ -1560,14 +1566,14 @@ cbFreshrate - - OptionSettingForm - 236, 104 - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 42 + + + 4 NoControl @@ -1575,6 +1581,9 @@ System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 234, 16 + 94, 21 @@ -1584,9 +1593,15 @@ 8, 41 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + 0, 0, 0, 0 + + 2 + uplinkCapacity @@ -1602,14 +1617,14 @@ 6 - - 0 + + 9 Settings - 6 + 7 3, 3, 3, 3 @@ -1620,8 +1635,11 @@ 107, 12 - - label5 + + 0 + + + 390, 16 15, 192 @@ -1629,32 +1647,32 @@ tabPage6 - - False - debug System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 0 + chkmuxEnabled label3 - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + tabPage6 False - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 15, 108 - - 253, 134 + + 325, 130 0, 0 @@ -1662,8 +1680,8 @@ Enable UDP - - 390, 16 + + cmbCoreType 3, 3, 3, 3 @@ -1677,9 +1695,6 @@ 267, 16 - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 75, 23 @@ -1692,8 +1707,8 @@ NoControl - - readBufferSize + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 9 @@ -1707,6 +1722,9 @@ 342, 17 + + 94, 21 + 97, 20 @@ -1731,11 +1749,14 @@ 0 + + groupBox1 + NoControl - - panel2 + + True 7 @@ -1767,6 +1788,9 @@ NoControl + + label9 + True @@ -1779,7 +1803,4 @@ True - - zh-Hans - \ No newline at end of file diff --git a/v2rayN/v2rayN/Forms/OptionSettingForm.zh-Hans.resx b/v2rayN/v2rayN/Forms/OptionSettingForm.zh-Hans.resx index d4dc2f22..133efd06 100644 --- a/v2rayN/v2rayN/Forms/OptionSettingForm.zh-Hans.resx +++ b/v2rayN/v2rayN/Forms/OptionSettingForm.zh-Hans.resx @@ -226,6 +226,9 @@ Core:KCP设置 + + 启用安全协议TLS v1.3 (订阅/检查更新/测速) + 204, 16 diff --git a/v2rayN/v2rayN/Global.cs b/v2rayN/v2rayN/Global.cs index 76c64d66..879d20ea 100644 --- a/v2rayN/v2rayN/Global.cs +++ b/v2rayN/v2rayN/Global.cs @@ -175,10 +175,7 @@ namespace v2rayN /// Language /// public const string MyRegKeyLanguage = "CurrentLanguage"; - /// - /// - /// - public const string MyRegKeySecurityProtocolTls13 = "SecurityProtocolTls13"; + /// /// Icon /// diff --git a/v2rayN/v2rayN/Handler/DownloadHandle.cs b/v2rayN/v2rayN/Handler/DownloadHandle.cs index 24d8e140..ca0cd7d0 100644 --- a/v2rayN/v2rayN/Handler/DownloadHandle.cs +++ b/v2rayN/v2rayN/Handler/DownloadHandle.cs @@ -37,7 +37,7 @@ namespace v2rayN.Handler WebClientEx ws = new WebClientEx(); try { - Utils.SetSecurityProtocol(); + Utils.SetSecurityProtocol(LazyConfig.Instance.GetConfig().enableSecurityProtocolTls13); UpdateCompleted?.Invoke(this, new ResultEventArgs(false, UIRes.I18N("Downloading"))); progressPercentage = -1; @@ -136,7 +136,7 @@ namespace v2rayN.Handler string source = string.Empty; try { - Utils.SetSecurityProtocol(); + Utils.SetSecurityProtocol(LazyConfig.Instance.GetConfig().enableSecurityProtocolTls13); WebClientEx ws = new WebClientEx(); if (webProxy != null) @@ -187,7 +187,7 @@ namespace v2rayN.Handler string source = string.Empty; try { - Utils.SetSecurityProtocol(); + Utils.SetSecurityProtocol(LazyConfig.Instance.GetConfig().enableSecurityProtocolTls13); WebClientEx ws = new WebClientEx(); @@ -205,7 +205,7 @@ namespace v2rayN.Handler WebClientEx ws = new WebClientEx(); try { - Utils.SetSecurityProtocol(); + Utils.SetSecurityProtocol(LazyConfig.Instance.GetConfig().enableSecurityProtocolTls13); UpdateCompleted?.Invoke(this, new ResultEventArgs(false, UIRes.I18N("Downloading"))); progressPercentage = -1; diff --git a/v2rayN/v2rayN/Handler/UpdateHandle.cs b/v2rayN/v2rayN/Handler/UpdateHandle.cs index 509bfc0e..ee3e8188 100644 --- a/v2rayN/v2rayN/Handler/UpdateHandle.cs +++ b/v2rayN/v2rayN/Handler/UpdateHandle.cs @@ -293,7 +293,7 @@ namespace v2rayN.Handler { try { - Utils.SetSecurityProtocol(); + Utils.SetSecurityProtocol(LazyConfig.Instance.GetConfig().enableSecurityProtocolTls13); WebRequestHandler webRequestHandler = new WebRequestHandler { AllowAutoRedirect = false diff --git a/v2rayN/v2rayN/Mode/Config.cs b/v2rayN/v2rayN/Mode/Config.cs index f2ca1c04..6293fcc7 100644 --- a/v2rayN/v2rayN/Mode/Config.cs +++ b/v2rayN/v2rayN/Mode/Config.cs @@ -11,13 +11,7 @@ namespace v2rayN.Mode [Serializable] public class Config { - /// - /// 本地监听 - /// - public List inbound - { - get; set; - } + #region property /// /// 允许日志 @@ -43,14 +37,6 @@ namespace v2rayN.Mode get; set; } - /// - /// vmess服务器信息 - /// - public List vmess - { - get; set; - } - /// /// 允许Mux多路复用 /// @@ -59,14 +45,6 @@ namespace v2rayN.Mode get; set; } - /// - /// KcpItem - /// - public KcpItem kcpItem - { - get; set; - } - /// /// /// @@ -107,7 +85,6 @@ namespace v2rayN.Mode get; set; } - /// /// 自定义远程DNS /// @@ -124,20 +101,6 @@ namespace v2rayN.Mode get; set; } - /// - /// 订阅 - /// - public List subItem - { - get; set; - } - /// - /// UI - /// - public UIItem uiItem - { - get; set; - } /// /// 域名解析策略 /// @@ -153,10 +116,6 @@ namespace v2rayN.Mode { get; set; } - public List routings - { - get; set; - } public bool enableRoutingAdvanced { get; set; @@ -184,11 +143,66 @@ namespace v2rayN.Mode get; set; } = 0; + public bool enableSecurityProtocolTls13 + { + get; set; + } + + #endregion + + #region other entities + + /// + /// 本地监听 + /// + public List inbound + { + get; set; + } + + /// + /// vmess服务器信息 + /// + public List vmess + { + get; set; + } + + /// + /// KcpItem + /// + public KcpItem kcpItem + { + get; set; + } + + /// + /// 订阅 + /// + public List subItem + { + get; set; + } + /// + /// UI + /// + public UIItem uiItem + { + get; set; + } + public List routings + { + get; set; + } + public ConstItem constItem { get; set; } - #region 函数 + + #endregion + + #region function public string address() { @@ -390,6 +404,7 @@ namespace v2rayN.Mode } return vmess.FindIndex(it => it.indexId == indexId); } + #endregion } diff --git a/v2rayN/v2rayN/Tool/Utils.cs b/v2rayN/v2rayN/Tool/Utils.cs index c735f7ab..dc28ce38 100644 --- a/v2rayN/v2rayN/Tool/Utils.cs +++ b/v2rayN/v2rayN/Tool/Utils.cs @@ -715,11 +715,9 @@ namespace v2rayN return lstIPAddress; } - public static void SetSecurityProtocol() + public static void SetSecurityProtocol(bool enableSecurityProtocolTls13) { - string securityProtocolTls13 = RegReadValue(Global.MyRegPath, Global.MyRegKeySecurityProtocolTls13, "0"); - - if (securityProtocolTls13.Equals("1")) + if (enableSecurityProtocolTls13) { ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls