mirror of
https://github.com/2dust/v2rayN.git
synced 2026-05-17 20:54:36 +03:00
Fix (#9224)
This commit is contained in:
@@ -705,10 +705,12 @@ public static class ConfigHandler
|
||||
public static async Task<int> AddHysteria2Server(Config config, ProfileItem profileItem, bool toFile = true)
|
||||
{
|
||||
profileItem.ConfigType = EConfigType.Hysteria2;
|
||||
//profileItem.CoreType = ECoreType.sing_box;
|
||||
|
||||
profileItem.Address = profileItem.Address.TrimEx();
|
||||
profileItem.Password = profileItem.Password.TrimEx();
|
||||
profileItem.Fingerprint = string.Empty;
|
||||
profileItem.Alpn = string.Empty;
|
||||
//profileItem.Alpn = "h3";
|
||||
profileItem.Network = string.Empty;
|
||||
|
||||
if (profileItem.StreamSecurity.IsNullOrEmpty())
|
||||
@@ -748,6 +750,7 @@ public static class ConfigHandler
|
||||
profileItem.Username = profileItem.Username.TrimEx();
|
||||
profileItem.Password = profileItem.Password.TrimEx();
|
||||
profileItem.Network = string.Empty;
|
||||
profileItem.Fingerprint = string.Empty;
|
||||
|
||||
var congestionControl = profileItem.GetProtocolExtra().CongestionControl;
|
||||
if (!Global.TuicCongestionControls.Contains(congestionControl))
|
||||
@@ -851,8 +854,10 @@ public static class ConfigHandler
|
||||
profileItem.Address = profileItem.Address.TrimEx();
|
||||
profileItem.Username = profileItem.Username.TrimEx();
|
||||
profileItem.Password = profileItem.Password.TrimEx();
|
||||
profileItem.Fingerprint = string.Empty;
|
||||
profileItem.Alpn = string.Empty;
|
||||
profileItem.Network = string.Empty;
|
||||
profileItem.AllowInsecure = "false";
|
||||
if (profileItem.StreamSecurity.IsNullOrEmpty())
|
||||
{
|
||||
profileItem.StreamSecurity = Global.StreamSecurity;
|
||||
|
||||
@@ -76,7 +76,7 @@ public partial class AddServerWindow : WindowBase<AddServerViewModel>
|
||||
sepa2.IsVisible = false;
|
||||
gridTransport.IsVisible = false;
|
||||
cmbFingerprint.IsEnabled = false;
|
||||
cmbFingerprint.SelectedValue = string.Empty;
|
||||
cmbAlpn.IsEnabled = false;
|
||||
break;
|
||||
|
||||
case EConfigType.TUIC:
|
||||
@@ -85,7 +85,6 @@ public partial class AddServerWindow : WindowBase<AddServerViewModel>
|
||||
gridTransport.IsVisible = false;
|
||||
cmbCoreType.IsEnabled = false;
|
||||
cmbFingerprint.IsEnabled = false;
|
||||
cmbFingerprint.SelectedValue = string.Empty;
|
||||
gridFinalmask.IsVisible = false;
|
||||
|
||||
cmbCongestionControl8.ItemsSource = Global.TuicCongestionControls;
|
||||
@@ -116,11 +115,8 @@ public partial class AddServerWindow : WindowBase<AddServerViewModel>
|
||||
cmbCoreType.IsEnabled = false;
|
||||
gridFinalmask.IsVisible = false;
|
||||
cmbFingerprint.IsEnabled = false;
|
||||
cmbFingerprint.SelectedValue = string.Empty;
|
||||
cmbAlpn.IsEnabled = false;
|
||||
cmbAlpn.SelectedValue = string.Empty;
|
||||
cmbAllowInsecure.IsEnabled = false;
|
||||
cmbAllowInsecure.SelectedValue = string.Empty;
|
||||
|
||||
cmbCongestionControl12.ItemsSource = Global.NaiveCongestionControls;
|
||||
break;
|
||||
|
||||
@@ -75,7 +75,7 @@ public partial class AddServerWindow
|
||||
sepa2.Visibility = Visibility.Collapsed;
|
||||
gridTransport.Visibility = Visibility.Collapsed;
|
||||
cmbFingerprint.IsEnabled = false;
|
||||
cmbFingerprint.Text = string.Empty;
|
||||
cmbAlpn.IsEnabled = false;
|
||||
break;
|
||||
|
||||
case EConfigType.TUIC:
|
||||
@@ -84,7 +84,6 @@ public partial class AddServerWindow
|
||||
gridTransport.Visibility = Visibility.Collapsed;
|
||||
cmbCoreType.IsEnabled = false;
|
||||
cmbFingerprint.IsEnabled = false;
|
||||
cmbFingerprint.Text = string.Empty;
|
||||
gridFinalmask.Visibility = Visibility.Collapsed;
|
||||
|
||||
cmbCongestionControl8.ItemsSource = Global.TuicCongestionControls;
|
||||
@@ -115,11 +114,8 @@ public partial class AddServerWindow
|
||||
cmbCoreType.IsEnabled = false;
|
||||
gridFinalmask.Visibility = Visibility.Collapsed;
|
||||
cmbFingerprint.IsEnabled = false;
|
||||
cmbFingerprint.Text = string.Empty;
|
||||
cmbAlpn.IsEnabled = false;
|
||||
cmbAlpn.Text = string.Empty;
|
||||
cmbAllowInsecure.IsEnabled = false;
|
||||
cmbAllowInsecure.Text = string.Empty;
|
||||
|
||||
cmbCongestionControl12.ItemsSource = Global.NaiveCongestionControls;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user