Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions v2rayN/ServiceLib/Global.cs
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,7 @@ public class Global
"qq",
"random",
"randomized",
"unsafe",
""
];

Expand Down
1 change: 1 addition & 0 deletions v2rayN/ServiceLib/Handler/ConfigHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ public static async Task<int> 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;
Expand Down
2 changes: 2 additions & 0 deletions v2rayN/ServiceLib/Models/CoreConfigs/V2rayConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,8 @@ public class TlsSettings4Ray

public List<string>? alpn { get; set; }

public string? cipherSuites { get; set; }

public string? fingerprint { get; set; }

public bool? show { get; set; }
Expand Down
1 change: 1 addition & 0 deletions v2rayN/ServiceLib/Models/Entities/ProfileItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
9 changes: 9 additions & 0 deletions v2rayN/ServiceLib/Resx/ResUI.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions v2rayN/ServiceLib/Resx/ResUI.fa.resx
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,9 @@
<data name="TbAlterId" xml:space="preserve">
<value>AlterId</value>
</data>
<data name="TbCipherSuites" xml:space="preserve">
<value>Cipher Suites</value>
</data>
<data name="TbFingerprint" xml:space="preserve">
<value>اثرانگشت</value>
</data>
Expand Down
3 changes: 3 additions & 0 deletions v2rayN/ServiceLib/Resx/ResUI.fr.resx
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,9 @@
<data name="TbAlterId" xml:space="preserve">
<value>ID supplémentaire (alterId)</value>
</data>
<data name="TbCipherSuites" xml:space="preserve">
<value>Cipher Suites</value>
</data>
<data name="TbFingerprint" xml:space="preserve">
<value>Empreinte</value>
</data>
Expand Down
3 changes: 3 additions & 0 deletions v2rayN/ServiceLib/Resx/ResUI.hu.resx
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,9 @@
<data name="TbAlterId" xml:space="preserve">
<value>Alter ID</value>
</data>
<data name="TbCipherSuites" xml:space="preserve">
<value>Cipher Suites</value>
</data>
<data name="TbFingerprint" xml:space="preserve">
<value>Ujjlenyomat</value>
</data>
Expand Down
3 changes: 3 additions & 0 deletions v2rayN/ServiceLib/Resx/ResUI.id.resx
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,9 @@
<data name="TbAlterId" xml:space="preserve">
<value>Alter ID</value>
</data>
<data name="TbCipherSuites" xml:space="preserve">
<value>Cipher Suites</value>
</data>
<data name="TbFingerprint" xml:space="preserve">
<value>Sidik jari</value>
</data>
Expand Down
3 changes: 3 additions & 0 deletions v2rayN/ServiceLib/Resx/ResUI.resx
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,9 @@
<data name="TbAlterId" xml:space="preserve">
<value>Alter ID</value>
</data>
<data name="TbCipherSuites" xml:space="preserve">
<value>Cipher Suites</value>
</data>
<data name="TbFingerprint" xml:space="preserve">
<value>Fingerprint</value>
</data>
Expand Down
3 changes: 3 additions & 0 deletions v2rayN/ServiceLib/Resx/ResUI.ru.resx
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,9 @@
<data name="TbAlterId" xml:space="preserve">
<value>AlterId</value>
</data>
<data name="TbCipherSuites" xml:space="preserve">
<value>Cipher Suites</value>
</data>
<data name="TbFingerprint" xml:space="preserve">
<value>Отпечаток</value>
</data>
Expand Down
3 changes: 3 additions & 0 deletions v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,9 @@
<data name="TbAlterId" xml:space="preserve">
<value>额外 ID (alterId)</value>
</data>
<data name="TbCipherSuites" xml:space="preserve">
<value>Cipher Suites</value>
</data>
<data name="TbFingerprint" xml:space="preserve">
<value>Fingerprint</value>
</data>
Expand Down
3 changes: 3 additions & 0 deletions v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,9 @@
<data name="TbAlterId" xml:space="preserve">
<value>額外 ID (alterid)</value>
</data>
<data name="TbCipherSuites" xml:space="preserve">
<value>Cipher Suites</value>
</data>
<data name="TbFingerprint" xml:space="preserve">
<value>Fingerprint</value>
</data>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
30 changes: 22 additions & 8 deletions v2rayN/v2rayN.Desktop/Views/AddServerWindow.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -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">

<TextBlock
Grid.Row="1"
Expand Down Expand Up @@ -1156,50 +1156,64 @@
Grid.Column="0"
Margin="{StaticResource Margin4}"
VerticalAlignment="Center"
Text="{x:Static resx:ResUI.TbCipherSuites}" />
<TextBox
x:Name="txtCipherSuites"
Grid.Row="4"
Grid.Column="1"
Width="400"
Margin="{StaticResource Margin4}"
HorizontalAlignment="Left" />

<TextBlock
Grid.Row="5"
Grid.Column="0"
Margin="{StaticResource Margin4}"
VerticalAlignment="Center"
Text="{x:Static resx:ResUI.TbAllowInsecure}" />
<ToggleSwitch
x:Name="togAllowInsecure"
Grid.Row="4"
Grid.Row="5"
Grid.Column="1"
Margin="{StaticResource Margin4}"
HorizontalAlignment="Left" />

<TextBlock
Grid.Row="5"
Grid.Row="6"
Grid.Column="0"
Margin="{StaticResource Margin4}"
VerticalAlignment="Center"
Text="{x:Static resx:ResUI.TbEchConfigList}" />
<TextBox
x:Name="txtEchConfigList"
Grid.Row="5"
Grid.Row="6"
Grid.Column="1"
Width="400"
Margin="{StaticResource Margin4}"
HorizontalAlignment="Left" />

<TextBlock
Grid.Row="6"
Grid.Row="7"
Grid.Column="0"
Margin="{StaticResource Margin4}"
VerticalAlignment="Center"
Text="{x:Static resx:ResUI.TbVerifyPeerCertByName}" />
<TextBox
x:Name="txtVerifyPeerCertByName"
Grid.Row="6"
Grid.Row="7"
Grid.Column="1"
Width="400"
Margin="{StaticResource Margin4}"
HorizontalAlignment="Left" />

<TextBlock
Grid.Row="7"
Grid.Row="8"
Grid.Column="0"
Margin="{StaticResource Margin4}"
VerticalAlignment="Center"
Text="{x:Static resx:ResUI.TbCertPinning}" />
<StackPanel
Grid.Row="7"
Grid.Row="8"
Grid.Column="1"
VerticalAlignment="Center"
Orientation="Horizontal">
Expand Down
3 changes: 3 additions & 0 deletions v2rayN/v2rayN.Desktop/Views/AddServerWindow.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ public AddServerWindow(ProfileItem profileItem)
gridTransport.IsVisible = false;
cmbFingerprint.IsEnabled = false;
cmbAlpn.IsEnabled = false;
txtCipherSuites.IsEnabled = false;
break;

case EConfigType.TUIC:
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
31 changes: 24 additions & 7 deletions v2rayN/v2rayN/Views/AddServerWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -1422,6 +1422,7 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="300" />
Expand Down Expand Up @@ -1481,55 +1482,71 @@
Margin="{StaticResource Margin4}"
VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.TbCipherSuites}" />
<TextBox
x:Name="txtCipherSuites"
Grid.Row="4"
Grid.Column="1"
Width="400"
Margin="{StaticResource Margin4}"
HorizontalAlignment="Left"
Style="{StaticResource DefTextBox}" />

<TextBlock
Grid.Row="5"
Grid.Column="0"
Margin="{StaticResource Margin4}"
VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.TbAllowInsecure}" />
<ToggleButton
x:Name="togAllowInsecure"
Grid.Row="4"
Grid.Row="5"
Grid.Column="1"
Margin="{StaticResource Margin4}"
HorizontalAlignment="Left" />

<TextBlock
Grid.Row="5"
Grid.Row="6"
Grid.Column="0"
Margin="{StaticResource Margin4}"
VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.TbEchConfigList}" />
<TextBox
x:Name="txtEchConfigList"
Grid.Row="5"
Grid.Row="6"
Grid.Column="1"
Width="400"
Margin="{StaticResource Margin4}"
HorizontalAlignment="Left"
Style="{StaticResource DefTextBox}" />

<TextBlock
Grid.Row="6"
Grid.Row="7"
Grid.Column="0"
Margin="{StaticResource Margin4}"
VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.TbVerifyPeerCertByName}" />
<TextBox
x:Name="txtVerifyPeerCertByName"
Grid.Row="6"
Grid.Row="7"
Grid.Column="1"
Width="400"
Margin="{StaticResource Margin4}"
HorizontalAlignment="Left"
Style="{StaticResource DefTextBox}" />

<TextBlock
Grid.Row="7"
Grid.Row="8"
Grid.Column="0"
Margin="{StaticResource Margin4}"
VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.TbCertPinning}" />
<StackPanel
Grid.Row="7"
Grid.Row="8"
Grid.Column="1"
VerticalAlignment="Center"
Orientation="Horizontal">
Expand Down
3 changes: 3 additions & 0 deletions v2rayN/v2rayN/Views/AddServerWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down