From 20260412a7b258b15d540e045595e77acd279b39 Mon Sep 17 00:00:00 2001
From: 2dust <31833384+2dust@users.noreply.github.com>
Date: Mon, 20 Oct 2025 20:17:13 +0800
Subject: [PATCH] Remove Enable Security Protocol TLS v1.3
(subscription/update)
The TLS version is automatically negotiated by the operating system stack; by default it selects the highest version supported by both endpoints.
---
v2rayN/ServiceLib/Models/ConfigItems.cs | 1 -
v2rayN/ServiceLib/Resx/ResUI.Designer.cs | 9 ---------
v2rayN/ServiceLib/Resx/ResUI.fa-Ir.resx | 3 ---
v2rayN/ServiceLib/Resx/ResUI.hu.resx | 3 ---
v2rayN/ServiceLib/Resx/ResUI.resx | 3 ---
v2rayN/ServiceLib/Resx/ResUI.ru.resx | 3 ---
v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx | 5 +----
v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx | 3 ---
v2rayN/ServiceLib/Services/DownloadService.cs | 20 -------------------
.../ViewModels/OptionSettingViewModel.cs | 3 ---
.../Views/OptionSettingWindow.axaml | 13 ------------
.../Views/OptionSettingWindow.axaml.cs | 1 -
v2rayN/v2rayN/Views/OptionSettingWindow.xaml | 14 -------------
.../v2rayN/Views/OptionSettingWindow.xaml.cs | 1 -
14 files changed, 1 insertion(+), 81 deletions(-)
diff --git a/v2rayN/ServiceLib/Models/ConfigItems.cs b/v2rayN/ServiceLib/Models/ConfigItems.cs
index 3a7a7b97..985c3a88 100644
--- a/v2rayN/ServiceLib/Models/ConfigItems.cs
+++ b/v2rayN/ServiceLib/Models/ConfigItems.cs
@@ -71,7 +71,6 @@ public class GUIItem
public bool DisplayRealTimeSpeed { get; set; }
public bool KeepOlderDedupl { get; set; }
public int AutoUpdateInterval { get; set; }
- public bool EnableSecurityProtocolTls13 { get; set; }
public int TrayMenuServersLimit { get; set; } = 20;
public bool EnableHWA { get; set; } = false;
public bool EnableLog { get; set; } = true;
diff --git a/v2rayN/ServiceLib/Resx/ResUI.Designer.cs b/v2rayN/ServiceLib/Resx/ResUI.Designer.cs
index eb7dd406..5bf7eb6e 100644
--- a/v2rayN/ServiceLib/Resx/ResUI.Designer.cs
+++ b/v2rayN/ServiceLib/Resx/ResUI.Designer.cs
@@ -3966,15 +3966,6 @@ namespace ServiceLib.Resx {
}
}
- ///
- /// 查找类似 Enable Security Protocol TLS v1.3 (subscription/update) 的本地化字符串。
- ///
- public static string TbSettingsTLS13 {
- get {
- return ResourceManager.GetString("TbSettingsTLS13", resourceCulture);
- }
- }
-
///
/// 查找类似 Tray right-click menu Configurations display limit 的本地化字符串。
///
diff --git a/v2rayN/ServiceLib/Resx/ResUI.fa-Ir.resx b/v2rayN/ServiceLib/Resx/ResUI.fa-Ir.resx
index 9a864836..7bcf40f5 100644
--- a/v2rayN/ServiceLib/Resx/ResUI.fa-Ir.resx
+++ b/v2rayN/ServiceLib/Resx/ResUI.fa-Ir.resx
@@ -747,9 +747,6 @@
تنظیمات پراکسی سیستم
-
- فعال کردن پروتکل امنیتی TLS نسخه 1.3 (اشتراک/بهروزرسانی)
-
محدودیت نمایش سرورهای منوی سینی کلیک راست
diff --git a/v2rayN/ServiceLib/Resx/ResUI.hu.resx b/v2rayN/ServiceLib/Resx/ResUI.hu.resx
index 0e920aa8..3ffa2e12 100644
--- a/v2rayN/ServiceLib/Resx/ResUI.hu.resx
+++ b/v2rayN/ServiceLib/Resx/ResUI.hu.resx
@@ -747,9 +747,6 @@
Rendszerproxy beállítások
-
- Biztonsági protokoll TLS v1.3 engedélyezése (előfizetés/frissítés)
-
Tálca jobb egérgombos menü konfigurációk megjelenítési limitje
diff --git a/v2rayN/ServiceLib/Resx/ResUI.resx b/v2rayN/ServiceLib/Resx/ResUI.resx
index 9fd73a15..5447e569 100644
--- a/v2rayN/ServiceLib/Resx/ResUI.resx
+++ b/v2rayN/ServiceLib/Resx/ResUI.resx
@@ -747,9 +747,6 @@
System proxy settings
-
- Enable Security Protocol TLS v1.3 (subscription/update)
-
Tray right-click menu Configurations display limit
diff --git a/v2rayN/ServiceLib/Resx/ResUI.ru.resx b/v2rayN/ServiceLib/Resx/ResUI.ru.resx
index 197afb51..72a63936 100644
--- a/v2rayN/ServiceLib/Resx/ResUI.ru.resx
+++ b/v2rayN/ServiceLib/Resx/ResUI.ru.resx
@@ -747,9 +747,6 @@
Настройки системного прокси
-
- Включить протокол безопасности TLS v1.3 (обновление подписки)
-
Лимит серверов в меню трея
diff --git a/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx b/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx
index 5666a55a..a6e297c3 100644
--- a/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx
+++ b/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx
@@ -747,9 +747,6 @@
系统代理设置
-
- 启用安全协议 TLS v1.3 (订阅/检查更新)
-
托盘右键菜单配置展示数量限制
@@ -1590,4 +1587,4 @@
可对 Routing 和 DNS 单独设定规则,ALL 则都生效
-
+
\ No newline at end of file
diff --git a/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx b/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx
index 2ab8dfbf..fe10f622 100644
--- a/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx
+++ b/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx
@@ -747,9 +747,6 @@
系統代理設定
-
- 啟用安全協定 TLS v1.3 (訂閱/檢查更新)
-
工具列右鍵選單設定檔展示數量限制
diff --git a/v2rayN/ServiceLib/Services/DownloadService.cs b/v2rayN/ServiceLib/Services/DownloadService.cs
index 4b2a7881..d4122964 100644
--- a/v2rayN/ServiceLib/Services/DownloadService.cs
+++ b/v2rayN/ServiceLib/Services/DownloadService.cs
@@ -17,8 +17,6 @@ public class DownloadService
{
try
{
- SetSecurityProtocol(AppManager.Instance.Config.GuiItem.EnableSecurityProtocolTls13);
-
var progress = new Progress();
progress.ProgressChanged += (sender, value) => updateFunc?.Invoke(false, $"{value}");
@@ -42,7 +40,6 @@ public class DownloadService
{
try
{
- SetSecurityProtocol(AppManager.Instance.Config.GuiItem.EnableSecurityProtocolTls13);
UpdateCompleted?.Invoke(this, new RetResult(false, $"{ResUI.Downloading} {url}"));
var progress = new Progress();
@@ -69,7 +66,6 @@ public class DownloadService
public async Task UrlRedirectAsync(string url, bool blProxy)
{
- SetSecurityProtocol(AppManager.Instance.Config.GuiItem.EnableSecurityProtocolTls13);
var webRequestHandler = new SocketsHttpHandler
{
AllowAutoRedirect = false,
@@ -139,7 +135,6 @@ public class DownloadService
{
try
{
- SetSecurityProtocol(AppManager.Instance.Config.GuiItem.EnableSecurityProtocolTls13);
var webProxy = await GetWebProxy(blProxy);
var client = new HttpClient(new SocketsHttpHandler()
{
@@ -184,8 +179,6 @@ public class DownloadService
{
try
{
- SetSecurityProtocol(AppManager.Instance.Config.GuiItem.EnableSecurityProtocolTls13);
-
var webProxy = await GetWebProxy(blProxy);
if (userAgent.IsNullOrEmpty())
@@ -236,17 +229,4 @@ public class DownloadService
return false;
}
}
-
- private static void SetSecurityProtocol(bool enableSecurityProtocolTls13)
- {
- if (enableSecurityProtocolTls13)
- {
- ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12 | SecurityProtocolType.Tls13;
- }
- else
- {
- ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls12;
- }
- ServicePointManager.DefaultConnectionLimit = 256;
- }
}
diff --git a/v2rayN/ServiceLib/ViewModels/OptionSettingViewModel.cs b/v2rayN/ServiceLib/ViewModels/OptionSettingViewModel.cs
index d2f334af..8bf21763 100644
--- a/v2rayN/ServiceLib/ViewModels/OptionSettingViewModel.cs
+++ b/v2rayN/ServiceLib/ViewModels/OptionSettingViewModel.cs
@@ -48,7 +48,6 @@ public class OptionSettingViewModel : MyReactiveObject
[Reactive] public bool DisplayRealTimeSpeed { get; set; }
[Reactive] public bool EnableAutoAdjustMainLvColWidth { get; set; }
[Reactive] public bool EnableUpdateSubOnlyRemarksExist { get; set; }
- [Reactive] public bool EnableSecurityProtocolTls13 { get; set; }
[Reactive] public bool AutoHideStartup { get; set; }
[Reactive] public bool Hide2TrayWhenClose { get; set; }
[Reactive] public bool EnableDragDropSort { get; set; }
@@ -166,7 +165,6 @@ public class OptionSettingViewModel : MyReactiveObject
KeepOlderDedupl = _config.GuiItem.KeepOlderDedupl;
EnableAutoAdjustMainLvColWidth = _config.UiItem.EnableAutoAdjustMainLvColWidth;
EnableUpdateSubOnlyRemarksExist = _config.UiItem.EnableUpdateSubOnlyRemarksExist;
- EnableSecurityProtocolTls13 = _config.GuiItem.EnableSecurityProtocolTls13;
AutoHideStartup = _config.UiItem.AutoHideStartup;
Hide2TrayWhenClose = _config.UiItem.Hide2TrayWhenClose;
EnableDragDropSort = _config.UiItem.EnableDragDropSort;
@@ -326,7 +324,6 @@ public class OptionSettingViewModel : MyReactiveObject
_config.GuiItem.KeepOlderDedupl = KeepOlderDedupl;
_config.UiItem.EnableAutoAdjustMainLvColWidth = EnableAutoAdjustMainLvColWidth;
_config.UiItem.EnableUpdateSubOnlyRemarksExist = EnableUpdateSubOnlyRemarksExist;
- _config.GuiItem.EnableSecurityProtocolTls13 = EnableSecurityProtocolTls13;
_config.UiItem.AutoHideStartup = AutoHideStartup;
_config.UiItem.Hide2TrayWhenClose = Hide2TrayWhenClose;
_config.GuiItem.AutoUpdateInterval = AutoUpdateInterval;
diff --git a/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml b/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml
index e3d225d6..40faf34a 100644
--- a/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml
+++ b/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml
@@ -429,19 +429,6 @@
Margin="{StaticResource Margin4}"
HorizontalAlignment="Left" />
-
-
-
this.Bind(ViewModel, vm => vm.KeepOlderDedupl, v => v.togKeepOlderDedupl.IsChecked).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.EnableAutoAdjustMainLvColWidth, v => v.togEnableAutoAdjustMainLvColWidth.IsChecked).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.EnableUpdateSubOnlyRemarksExist, v => v.togEnableUpdateSubOnlyRemarksExist.IsChecked).DisposeWith(disposables);
- this.Bind(ViewModel, vm => vm.EnableSecurityProtocolTls13, v => v.togEnableSecurityProtocolTls13.IsChecked).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.AutoHideStartup, v => v.togAutoHideStartup.IsChecked).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.Hide2TrayWhenClose, v => v.togHide2TrayWhenClose.IsChecked).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.DoubleClick2Activate, v => v.togDoubleClick2Activate.IsChecked).DisposeWith(disposables);
diff --git a/v2rayN/v2rayN/Views/OptionSettingWindow.xaml b/v2rayN/v2rayN/Views/OptionSettingWindow.xaml
index 98b90235..129f1d09 100644
--- a/v2rayN/v2rayN/Views/OptionSettingWindow.xaml
+++ b/v2rayN/v2rayN/Views/OptionSettingWindow.xaml
@@ -651,20 +651,6 @@
Margin="{StaticResource Margin8}"
HorizontalAlignment="Left" />
-
-
-
vm.KeepOlderDedupl, v => v.togKeepOlderDedupl.IsChecked).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.EnableAutoAdjustMainLvColWidth, v => v.togEnableAutoAdjustMainLvColWidth.IsChecked).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.EnableUpdateSubOnlyRemarksExist, v => v.togEnableUpdateSubOnlyRemarksExist.IsChecked).DisposeWith(disposables);
- this.Bind(ViewModel, vm => vm.EnableSecurityProtocolTls13, v => v.togEnableSecurityProtocolTls13.IsChecked).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.AutoHideStartup, v => v.togAutoHideStartup.IsChecked).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.EnableDragDropSort, v => v.togEnableDragDropSort.IsChecked).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.DoubleClick2Activate, v => v.togDoubleClick2Activate.IsChecked).DisposeWith(disposables);