mirror of
https://github.com/2dust/v2rayN.git
synced 2025-10-23 08:44:41 +00:00
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.
This commit is contained in:
parent
bca030002f
commit
20260412a7
14 changed files with 1 additions and 81 deletions
|
@ -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;
|
||||
|
|
9
v2rayN/ServiceLib/Resx/ResUI.Designer.cs
generated
9
v2rayN/ServiceLib/Resx/ResUI.Designer.cs
generated
|
@ -3966,15 +3966,6 @@ namespace ServiceLib.Resx {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Enable Security Protocol TLS v1.3 (subscription/update) 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string TbSettingsTLS13 {
|
||||
get {
|
||||
return ResourceManager.GetString("TbSettingsTLS13", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Tray right-click menu Configurations display limit 的本地化字符串。
|
||||
/// </summary>
|
||||
|
|
|
@ -747,9 +747,6 @@
|
|||
<data name="TbSettingsSystemproxy" xml:space="preserve">
|
||||
<value>تنظیمات پراکسی سیستم</value>
|
||||
</data>
|
||||
<data name="TbSettingsTLS13" xml:space="preserve">
|
||||
<value>فعال کردن پروتکل امنیتی TLS نسخه 1.3 (اشتراک/بهروزرسانی)</value>
|
||||
</data>
|
||||
<data name="TbSettingsTrayMenuServersLimit" xml:space="preserve">
|
||||
<value>محدودیت نمایش سرورهای منوی سینی کلیک راست</value>
|
||||
</data>
|
||||
|
|
|
@ -747,9 +747,6 @@
|
|||
<data name="TbSettingsSystemproxy" xml:space="preserve">
|
||||
<value>Rendszerproxy beállítások</value>
|
||||
</data>
|
||||
<data name="TbSettingsTLS13" xml:space="preserve">
|
||||
<value>Biztonsági protokoll TLS v1.3 engedélyezése (előfizetés/frissítés)</value>
|
||||
</data>
|
||||
<data name="TbSettingsTrayMenuServersLimit" xml:space="preserve">
|
||||
<value>Tálca jobb egérgombos menü konfigurációk megjelenítési limitje</value>
|
||||
</data>
|
||||
|
|
|
@ -747,9 +747,6 @@
|
|||
<data name="TbSettingsSystemproxy" xml:space="preserve">
|
||||
<value>System proxy settings</value>
|
||||
</data>
|
||||
<data name="TbSettingsTLS13" xml:space="preserve">
|
||||
<value>Enable Security Protocol TLS v1.3 (subscription/update)</value>
|
||||
</data>
|
||||
<data name="TbSettingsTrayMenuServersLimit" xml:space="preserve">
|
||||
<value>Tray right-click menu Configurations display limit</value>
|
||||
</data>
|
||||
|
|
|
@ -747,9 +747,6 @@
|
|||
<data name="TbSettingsSystemproxy" xml:space="preserve">
|
||||
<value>Настройки системного прокси</value>
|
||||
</data>
|
||||
<data name="TbSettingsTLS13" xml:space="preserve">
|
||||
<value>Включить протокол безопасности TLS v1.3 (обновление подписки)</value>
|
||||
</data>
|
||||
<data name="TbSettingsTrayMenuServersLimit" xml:space="preserve">
|
||||
<value>Лимит серверов в меню трея</value>
|
||||
</data>
|
||||
|
|
|
@ -747,9 +747,6 @@
|
|||
<data name="TbSettingsSystemproxy" xml:space="preserve">
|
||||
<value>系统代理设置</value>
|
||||
</data>
|
||||
<data name="TbSettingsTLS13" xml:space="preserve">
|
||||
<value>启用安全协议 TLS v1.3 (订阅/检查更新)</value>
|
||||
</data>
|
||||
<data name="TbSettingsTrayMenuServersLimit" xml:space="preserve">
|
||||
<value>托盘右键菜单配置展示数量限制</value>
|
||||
</data>
|
||||
|
@ -1590,4 +1587,4 @@
|
|||
<data name="TbRuleTypeTips" xml:space="preserve">
|
||||
<value>可对 Routing 和 DNS 单独设定规则,ALL 则都生效</value>
|
||||
</data>
|
||||
</root>
|
||||
</root>
|
|
@ -747,9 +747,6 @@
|
|||
<data name="TbSettingsSystemproxy" xml:space="preserve">
|
||||
<value>系統代理設定</value>
|
||||
</data>
|
||||
<data name="TbSettingsTLS13" xml:space="preserve">
|
||||
<value>啟用安全協定 TLS v1.3 (訂閱/檢查更新)</value>
|
||||
</data>
|
||||
<data name="TbSettingsTrayMenuServersLimit" xml:space="preserve">
|
||||
<value>工具列右鍵選單設定檔展示數量限制</value>
|
||||
</data>
|
||||
|
|
|
@ -17,8 +17,6 @@ public class DownloadService
|
|||
{
|
||||
try
|
||||
{
|
||||
SetSecurityProtocol(AppManager.Instance.Config.GuiItem.EnableSecurityProtocolTls13);
|
||||
|
||||
var progress = new Progress<string>();
|
||||
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<double>();
|
||||
|
@ -69,7 +66,6 @@ public class DownloadService
|
|||
|
||||
public async Task<string?> 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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -429,19 +429,6 @@
|
|||
Margin="{StaticResource Margin4}"
|
||||
HorizontalAlignment="Left" />
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="7"
|
||||
Grid.Column="0"
|
||||
Margin="{StaticResource Margin4}"
|
||||
VerticalAlignment="Center"
|
||||
Text="{x:Static resx:ResUI.TbSettingsTLS13}" />
|
||||
<ToggleSwitch
|
||||
x:Name="togEnableSecurityProtocolTls13"
|
||||
Grid.Row="7"
|
||||
Grid.Column="1"
|
||||
Margin="{StaticResource Margin4}"
|
||||
HorizontalAlignment="Left" />
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="8"
|
||||
Grid.Column="0"
|
||||
|
|
|
@ -82,7 +82,6 @@ public partial class OptionSettingWindow : WindowBase<OptionSettingViewModel>
|
|||
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);
|
||||
|
|
|
@ -651,20 +651,6 @@
|
|||
Margin="{StaticResource Margin8}"
|
||||
HorizontalAlignment="Left" />
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="7"
|
||||
Grid.Column="0"
|
||||
Margin="{StaticResource Margin8}"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.TbSettingsTLS13}" />
|
||||
<ToggleButton
|
||||
x:Name="togEnableSecurityProtocolTls13"
|
||||
Grid.Row="7"
|
||||
Grid.Column="1"
|
||||
Margin="{StaticResource Margin8}"
|
||||
HorizontalAlignment="Left" />
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="8"
|
||||
Grid.Column="0"
|
||||
|
|
|
@ -89,7 +89,6 @@ public partial class OptionSettingWindow
|
|||
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.EnableDragDropSort, v => v.togEnableDragDropSort.IsChecked).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.DoubleClick2Activate, v => v.togDoubleClick2Activate.IsChecked).DisposeWith(disposables);
|
||||
|
|
Loading…
Reference in a new issue