diff --git a/v2rayN/ServiceLib/Global.cs b/v2rayN/ServiceLib/Global.cs index cb651ac6908..82580efc7bb 100644 --- a/v2rayN/ServiceLib/Global.cs +++ b/v2rayN/ServiceLib/Global.cs @@ -413,6 +413,7 @@ public class Global "qq", "random", "randomized", + "unsafe", "" ]; diff --git a/v2rayN/ServiceLib/Handler/ConfigHandler.cs b/v2rayN/ServiceLib/Handler/ConfigHandler.cs index f1fc385fc18..9dd5306099d 100644 --- a/v2rayN/ServiceLib/Handler/ConfigHandler.cs +++ b/v2rayN/ServiceLib/Handler/ConfigHandler.cs @@ -250,6 +250,7 @@ public static async Task AddServer(Config config, ProfileItem profileItem) item.AllowInsecure = profileItem.AllowInsecure; item.Fingerprint = profileItem.Fingerprint; item.Alpn = profileItem.Alpn; + item.CipherSuites = profileItem.CipherSuites; item.PublicKey = profileItem.PublicKey; item.ShortId = profileItem.ShortId; diff --git a/v2rayN/ServiceLib/Models/CoreConfigs/V2rayConfig.cs b/v2rayN/ServiceLib/Models/CoreConfigs/V2rayConfig.cs index d5f189e8a2f..dbe0e1c7dbc 100644 --- a/v2rayN/ServiceLib/Models/CoreConfigs/V2rayConfig.cs +++ b/v2rayN/ServiceLib/Models/CoreConfigs/V2rayConfig.cs @@ -356,6 +356,8 @@ public class TlsSettings4Ray public List? alpn { get; set; } + public string? cipherSuites { get; set; } + public string? fingerprint { get; set; } public bool? show { get; set; } diff --git a/v2rayN/ServiceLib/Models/Entities/ProfileItem.cs b/v2rayN/ServiceLib/Models/Entities/ProfileItem.cs index 5daca9888a0..09eb1d79139 100644 --- a/v2rayN/ServiceLib/Models/Entities/ProfileItem.cs +++ b/v2rayN/ServiceLib/Models/Entities/ProfileItem.cs @@ -183,6 +183,7 @@ public bool GetAllowInsecure() public string AllowInsecure { get; set; } public string Sni { get; set; } public string Alpn { get; set; } = string.Empty; + public string CipherSuites { get; set; } = string.Empty; public string Fingerprint { get; set; } public string PublicKey { get; set; } public string ShortId { get; set; } diff --git a/v2rayN/ServiceLib/Resx/ResUI.Designer.cs b/v2rayN/ServiceLib/Resx/ResUI.Designer.cs index cd70be7a1c8..8e5bfbfd9cd 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.Designer.cs +++ b/v2rayN/ServiceLib/Resx/ResUI.Designer.cs @@ -2796,6 +2796,15 @@ public static string TbCancel { } } + /// + /// 查找类似 Cipher Suites 的本地化字符串。 + /// + public static string TbCipherSuites { + get { + return ResourceManager.GetString("TbCipherSuites", resourceCulture); + } + } + /// /// 查找类似 Certificate Pinning 的本地化字符串。 /// diff --git a/v2rayN/ServiceLib/Resx/ResUI.fa.resx b/v2rayN/ServiceLib/Resx/ResUI.fa.resx index 6c55b7deff5..933d28c1b34 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.fa.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.fa.resx @@ -585,6 +585,9 @@ AlterId + + Cipher Suites + اثرانگشت diff --git a/v2rayN/ServiceLib/Resx/ResUI.fr.resx b/v2rayN/ServiceLib/Resx/ResUI.fr.resx index cfee0bd9c11..5245bf304ec 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.fr.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.fr.resx @@ -585,6 +585,9 @@ ID supplémentaire (alterId) + + Cipher Suites + Empreinte diff --git a/v2rayN/ServiceLib/Resx/ResUI.hu.resx b/v2rayN/ServiceLib/Resx/ResUI.hu.resx index 756e8e32e22..04cf1e116c3 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.hu.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.hu.resx @@ -585,6 +585,9 @@ Alter ID + + Cipher Suites + Ujjlenyomat diff --git a/v2rayN/ServiceLib/Resx/ResUI.id.resx b/v2rayN/ServiceLib/Resx/ResUI.id.resx index 73c26704305..8d1791ed8e8 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.id.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.id.resx @@ -585,6 +585,9 @@ Alter ID + + Cipher Suites + Sidik jari diff --git a/v2rayN/ServiceLib/Resx/ResUI.resx b/v2rayN/ServiceLib/Resx/ResUI.resx index 67339c2b6a9..f44d418f3c6 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.resx @@ -585,6 +585,9 @@ Alter ID + + Cipher Suites + Fingerprint diff --git a/v2rayN/ServiceLib/Resx/ResUI.ru.resx b/v2rayN/ServiceLib/Resx/ResUI.ru.resx index c0c546c2717..789e34a3ff4 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.ru.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.ru.resx @@ -585,6 +585,9 @@ AlterId + + Cipher Suites + Отпечаток diff --git a/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx b/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx index e0a84d3c289..287eb29a02b 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx @@ -585,6 +585,9 @@ 额外 ID (alterId) + + Cipher Suites + Fingerprint diff --git a/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx b/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx index 3d3d582b314..c391bf5bd44 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx @@ -585,6 +585,9 @@ 額外 ID (alterid) + + Cipher Suites + Fingerprint diff --git a/v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayOutboundService.cs b/v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayOutboundService.cs index c5251f9ca73..fe546335720 100644 --- a/v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayOutboundService.cs +++ b/v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayOutboundService.cs @@ -382,6 +382,7 @@ private void FillBoundStreamSettings(Outbounds4Ray outbound) { allowInsecure = _node.GetAllowInsecure(), alpn = _node.GetAlpn(), + cipherSuites = _node.CipherSuites.IsNullOrEmpty() ? null : _node.CipherSuites, fingerprint = _node.Fingerprint.IsNullOrEmpty() ? _config.CoreBasicItem.DefFingerprint : _node.Fingerprint, echConfigList = _node.EchConfigList.NullIfEmpty(), verifyPeerCertByName = _node.VerifyPeerCertByName.NullIfEmpty(), diff --git a/v2rayN/v2rayN.Desktop/Views/AddServerWindow.axaml b/v2rayN/v2rayN.Desktop/Views/AddServerWindow.axaml index 8d92036f231..86447e7d31f 100644 --- a/v2rayN/v2rayN.Desktop/Views/AddServerWindow.axaml +++ b/v2rayN/v2rayN.Desktop/Views/AddServerWindow.axaml @@ -1109,7 +1109,7 @@ Grid.Row="8" ColumnDefinitions="300,Auto" IsVisible="False" - RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto"> + RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto"> + + + diff --git a/v2rayN/v2rayN.Desktop/Views/AddServerWindow.axaml.cs b/v2rayN/v2rayN.Desktop/Views/AddServerWindow.axaml.cs index f5042a6aefc..b6ae665c1fa 100644 --- a/v2rayN/v2rayN.Desktop/Views/AddServerWindow.axaml.cs +++ b/v2rayN/v2rayN.Desktop/Views/AddServerWindow.axaml.cs @@ -76,6 +76,7 @@ public AddServerWindow(ProfileItem profileItem) gridTransport.IsVisible = false; cmbFingerprint.IsEnabled = false; cmbAlpn.IsEnabled = false; + txtCipherSuites.IsEnabled = false; break; case EConfigType.TUIC: @@ -115,6 +116,7 @@ public AddServerWindow(ProfileItem profileItem) gridFinalmask.IsVisible = false; cmbFingerprint.IsEnabled = false; cmbAlpn.IsEnabled = false; + txtCipherSuites.IsEnabled = false; togAllowInsecure.IsEnabled = false; cmbCongestionControl12.ItemsSource = Global.NaiveCongestionControls; @@ -236,6 +238,7 @@ public AddServerWindow(ProfileItem profileItem) this.Bind(ViewModel, vm => vm.AllowInsecure, v => v.togAllowInsecure.IsChecked).DisposeWith(disposables); this.Bind(ViewModel, vm => vm.SelectedSource.Fingerprint, v => v.cmbFingerprint.SelectedValue).DisposeWith(disposables); this.Bind(ViewModel, vm => vm.SelectedSource.Alpn, v => v.cmbAlpn.SelectedValue).DisposeWith(disposables); + this.Bind(ViewModel, vm => vm.SelectedSource.CipherSuites, v => v.txtCipherSuites.Text).DisposeWith(disposables); this.Bind(ViewModel, vm => vm.CertSha, v => v.txtCertSha256Pinning.Text).DisposeWith(disposables); this.Bind(ViewModel, vm => vm.CertTip, v => v.labCertPinning.Text).DisposeWith(disposables); this.Bind(ViewModel, vm => vm.Cert, v => v.txtCert.Text).DisposeWith(disposables); diff --git a/v2rayN/v2rayN/Views/AddServerWindow.xaml b/v2rayN/v2rayN/Views/AddServerWindow.xaml index 6d506d8c8dd..077b2d3ad6c 100644 --- a/v2rayN/v2rayN/Views/AddServerWindow.xaml +++ b/v2rayN/v2rayN/Views/AddServerWindow.xaml @@ -1422,6 +1422,7 @@ + @@ -1481,16 +1482,32 @@ Margin="{StaticResource Margin4}" VerticalAlignment="Center" Style="{StaticResource ToolbarTextBlock}" + Text="{x:Static resx:ResUI.TbCipherSuites}" /> + + + diff --git a/v2rayN/v2rayN/Views/AddServerWindow.xaml.cs b/v2rayN/v2rayN/Views/AddServerWindow.xaml.cs index 88e5153e9df..b4625b4467c 100644 --- a/v2rayN/v2rayN/Views/AddServerWindow.xaml.cs +++ b/v2rayN/v2rayN/Views/AddServerWindow.xaml.cs @@ -75,6 +75,7 @@ public AddServerWindow(ProfileItem profileItem) gridTransport.Visibility = Visibility.Collapsed; cmbFingerprint.IsEnabled = false; cmbAlpn.IsEnabled = false; + txtCipherSuites.IsEnabled = false; break; case EConfigType.TUIC: @@ -114,6 +115,7 @@ public AddServerWindow(ProfileItem profileItem) gridFinalmask.Visibility = Visibility.Collapsed; cmbFingerprint.IsEnabled = false; cmbAlpn.IsEnabled = false; + txtCipherSuites.IsEnabled = false; togAllowInsecure.IsEnabled = false; cmbCongestionControl12.ItemsSource = Global.NaiveCongestionControls; @@ -234,6 +236,7 @@ public AddServerWindow(ProfileItem profileItem) this.Bind(ViewModel, vm => vm.AllowInsecure, v => v.togAllowInsecure.IsChecked).DisposeWith(disposables); this.Bind(ViewModel, vm => vm.SelectedSource.Fingerprint, v => v.cmbFingerprint.Text).DisposeWith(disposables); this.Bind(ViewModel, vm => vm.SelectedSource.Alpn, v => v.cmbAlpn.Text).DisposeWith(disposables); + this.Bind(ViewModel, vm => vm.SelectedSource.CipherSuites, v => v.txtCipherSuites.Text).DisposeWith(disposables); this.Bind(ViewModel, vm => vm.CertSha, v => v.txtCertSha256Pinning.Text).DisposeWith(disposables); this.Bind(ViewModel, vm => vm.CertTip, v => v.labCertPinning.Text).DisposeWith(disposables); this.Bind(ViewModel, vm => vm.Cert, v => v.txtCert.Text).DisposeWith(disposables);