mirror of
https://github.com/2dust/v2rayN.git
synced 2026-01-18 03:49:34 +00:00
Add support for CoreType7 (Hysteria2) in option settings
This commit is contained in:
parent
2c9a90c878
commit
2fefafdd37
5 changed files with 47 additions and 5 deletions
|
|
@ -108,6 +108,7 @@ public class OptionSettingViewModel : MyReactiveObject
|
||||||
[Reactive] public string CoreType4 { get; set; }
|
[Reactive] public string CoreType4 { get; set; }
|
||||||
[Reactive] public string CoreType5 { get; set; }
|
[Reactive] public string CoreType5 { get; set; }
|
||||||
[Reactive] public string CoreType6 { get; set; }
|
[Reactive] public string CoreType6 { get; set; }
|
||||||
|
[Reactive] public string CoreType7 { get; set; }
|
||||||
[Reactive] public string CoreType9 { get; set; }
|
[Reactive] public string CoreType9 { get; set; }
|
||||||
|
|
||||||
#endregion CoreType
|
#endregion CoreType
|
||||||
|
|
@ -276,6 +277,10 @@ public class OptionSettingViewModel : MyReactiveObject
|
||||||
CoreType6 = type;
|
CoreType6 = type;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 7:
|
||||||
|
CoreType7 = type;
|
||||||
|
break;
|
||||||
|
|
||||||
case 9:
|
case 9:
|
||||||
CoreType9 = type;
|
CoreType9 = type;
|
||||||
break;
|
break;
|
||||||
|
|
@ -427,6 +432,10 @@ public class OptionSettingViewModel : MyReactiveObject
|
||||||
type = CoreType6;
|
type = CoreType6;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 7:
|
||||||
|
type = CoreType7;
|
||||||
|
break;
|
||||||
|
|
||||||
case 9:
|
case 9:
|
||||||
type = CoreType9;
|
type = CoreType9;
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -463,7 +463,7 @@
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
IsVisible="{Binding BlIsLinux}"
|
IsVisible="{Binding BlIsLinux}"
|
||||||
Text="{x:Static resx:ResUI.TbSettingsHide2TrayWhenCloseTip}" />
|
Text="{x:Static resx:ResUI.TbSettingsHide2TrayWhenCloseTip}" />
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="10"
|
Grid.Row="10"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
|
|
@ -477,7 +477,7 @@
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Margin="{StaticResource Margin4}"
|
Margin="{StaticResource Margin4}"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
IsVisible="{Binding BlIsIsMacOS}"/>
|
IsVisible="{Binding BlIsIsMacOS}" />
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="11"
|
Grid.Row="11"
|
||||||
|
|
@ -876,7 +876,7 @@
|
||||||
<Grid
|
<Grid
|
||||||
Margin="{StaticResource Margin4}"
|
Margin="{StaticResource Margin4}"
|
||||||
ColumnDefinitions="Auto,Auto"
|
ColumnDefinitions="Auto,Auto"
|
||||||
RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto">
|
RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
|
|
@ -960,10 +960,23 @@
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Margin="{StaticResource Margin4}"
|
Margin="{StaticResource Margin4}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
|
Text="Hysteria2" />
|
||||||
|
<ComboBox
|
||||||
|
x:Name="cmbCoreType7"
|
||||||
|
Grid.Row="7"
|
||||||
|
Grid.Column="1"
|
||||||
|
Width="200"
|
||||||
|
Margin="{StaticResource Margin4}" />
|
||||||
|
|
||||||
|
<TextBlock
|
||||||
|
Grid.Row="8"
|
||||||
|
Grid.Column="0"
|
||||||
|
Margin="{StaticResource Margin4}"
|
||||||
|
VerticalAlignment="Center"
|
||||||
Text="Wireguard" />
|
Text="Wireguard" />
|
||||||
<ComboBox
|
<ComboBox
|
||||||
x:Name="cmbCoreType9"
|
x:Name="cmbCoreType9"
|
||||||
Grid.Row="7"
|
Grid.Row="8"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Width="200"
|
Width="200"
|
||||||
Margin="{StaticResource Margin4}" />
|
Margin="{StaticResource Margin4}" />
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,7 @@ public partial class OptionSettingWindow : WindowBase<OptionSettingViewModel>
|
||||||
cmbCoreType4.ItemsSource = Global.CoreTypes;
|
cmbCoreType4.ItemsSource = Global.CoreTypes;
|
||||||
cmbCoreType5.ItemsSource = Global.CoreTypes;
|
cmbCoreType5.ItemsSource = Global.CoreTypes;
|
||||||
cmbCoreType6.ItemsSource = Global.CoreTypes;
|
cmbCoreType6.ItemsSource = Global.CoreTypes;
|
||||||
|
cmbCoreType7.ItemsSource = Global.CoreTypes;
|
||||||
cmbCoreType9.ItemsSource = Global.CoreTypes;
|
cmbCoreType9.ItemsSource = Global.CoreTypes;
|
||||||
|
|
||||||
cmbMixedConcurrencyCount.ItemsSource = Enumerable.Range(2, 7).ToList();
|
cmbMixedConcurrencyCount.ItemsSource = Enumerable.Range(2, 7).ToList();
|
||||||
|
|
@ -122,6 +123,7 @@ public partial class OptionSettingWindow : WindowBase<OptionSettingViewModel>
|
||||||
this.Bind(ViewModel, vm => vm.CoreType4, v => v.cmbCoreType4.SelectedValue).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.CoreType4, v => v.cmbCoreType4.SelectedValue).DisposeWith(disposables);
|
||||||
this.Bind(ViewModel, vm => vm.CoreType5, v => v.cmbCoreType5.SelectedValue).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.CoreType5, v => v.cmbCoreType5.SelectedValue).DisposeWith(disposables);
|
||||||
this.Bind(ViewModel, vm => vm.CoreType6, v => v.cmbCoreType6.SelectedValue).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.CoreType6, v => v.cmbCoreType6.SelectedValue).DisposeWith(disposables);
|
||||||
|
this.Bind(ViewModel, vm => vm.CoreType7, v => v.cmbCoreType7.SelectedValue).DisposeWith(disposables);
|
||||||
this.Bind(ViewModel, vm => vm.CoreType9, v => v.cmbCoreType9.SelectedValue).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.CoreType9, v => v.cmbCoreType9.SelectedValue).DisposeWith(disposables);
|
||||||
|
|
||||||
this.BindCommand(ViewModel, vm => vm.SaveCmd, v => v.btnSave).DisposeWith(disposables);
|
this.BindCommand(ViewModel, vm => vm.SaveCmd, v => v.btnSave).DisposeWith(disposables);
|
||||||
|
|
|
||||||
|
|
@ -1138,6 +1138,7 @@
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
|
|
@ -1239,10 +1240,25 @@
|
||||||
Margin="{StaticResource Margin8}"
|
Margin="{StaticResource Margin8}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Style="{StaticResource ToolbarTextBlock}"
|
Style="{StaticResource ToolbarTextBlock}"
|
||||||
|
Text="Hysteria2" />
|
||||||
|
<ComboBox
|
||||||
|
x:Name="cmbCoreType7"
|
||||||
|
Grid.Row="7"
|
||||||
|
Grid.Column="1"
|
||||||
|
Width="200"
|
||||||
|
Margin="{StaticResource Margin8}"
|
||||||
|
Style="{StaticResource DefComboBox}" />
|
||||||
|
|
||||||
|
<TextBlock
|
||||||
|
Grid.Row="8"
|
||||||
|
Grid.Column="0"
|
||||||
|
Margin="{StaticResource Margin8}"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Style="{StaticResource ToolbarTextBlock}"
|
||||||
Text="Wireguard" />
|
Text="Wireguard" />
|
||||||
<ComboBox
|
<ComboBox
|
||||||
x:Name="cmbCoreType9"
|
x:Name="cmbCoreType9"
|
||||||
Grid.Row="7"
|
Grid.Row="8"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Width="200"
|
Width="200"
|
||||||
Margin="{StaticResource Margin8}"
|
Margin="{StaticResource Margin8}"
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ public partial class OptionSettingWindow
|
||||||
cmbCoreType4.ItemsSource = Global.CoreTypes;
|
cmbCoreType4.ItemsSource = Global.CoreTypes;
|
||||||
cmbCoreType5.ItemsSource = Global.CoreTypes;
|
cmbCoreType5.ItemsSource = Global.CoreTypes;
|
||||||
cmbCoreType6.ItemsSource = Global.CoreTypes;
|
cmbCoreType6.ItemsSource = Global.CoreTypes;
|
||||||
|
cmbCoreType7.ItemsSource = Global.CoreTypes;
|
||||||
cmbCoreType9.ItemsSource = Global.CoreTypes;
|
cmbCoreType9.ItemsSource = Global.CoreTypes;
|
||||||
|
|
||||||
cmbMixedConcurrencyCount.ItemsSource = Enumerable.Range(2, 7).ToList();
|
cmbMixedConcurrencyCount.ItemsSource = Enumerable.Range(2, 7).ToList();
|
||||||
|
|
@ -127,6 +128,7 @@ public partial class OptionSettingWindow
|
||||||
this.Bind(ViewModel, vm => vm.CoreType4, v => v.cmbCoreType4.Text).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.CoreType4, v => v.cmbCoreType4.Text).DisposeWith(disposables);
|
||||||
this.Bind(ViewModel, vm => vm.CoreType5, v => v.cmbCoreType5.Text).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.CoreType5, v => v.cmbCoreType5.Text).DisposeWith(disposables);
|
||||||
this.Bind(ViewModel, vm => vm.CoreType6, v => v.cmbCoreType6.Text).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.CoreType6, v => v.cmbCoreType6.Text).DisposeWith(disposables);
|
||||||
|
this.Bind(ViewModel, vm => vm.CoreType7, v => v.cmbCoreType7.Text).DisposeWith(disposables);
|
||||||
this.Bind(ViewModel, vm => vm.CoreType9, v => v.cmbCoreType9.Text).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.CoreType9, v => v.cmbCoreType9.Text).DisposeWith(disposables);
|
||||||
|
|
||||||
this.BindCommand(ViewModel, vm => vm.SaveCmd, v => v.btnSave).DisposeWith(disposables);
|
this.BindCommand(ViewModel, vm => vm.SaveCmd, v => v.btnSave).DisposeWith(disposables);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue