From 021e64e20bc2e3b4462c89d18df371077f32b295 Mon Sep 17 00:00:00 2001 From: DHR60 Date: Sat, 18 Apr 2026 07:23:42 +0000 Subject: [PATCH] Fix (#9141) --- v2rayN/ServiceLib/Global.cs | 2 +- v2rayN/ServiceLib/Models/ConfigItems.cs | 2 +- v2rayN/ServiceLib/ViewModels/AddServerViewModel.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/v2rayN/ServiceLib/Global.cs b/v2rayN/ServiceLib/Global.cs index 267ec60a..7c0f98d8 100644 --- a/v2rayN/ServiceLib/Global.cs +++ b/v2rayN/ServiceLib/Global.cs @@ -94,7 +94,7 @@ public class Global public const string SingboxHostsDNSTag = "hosts_dns"; public const string SingboxFakeDNSTag = "fake_dns"; - public const int Hysteria2DefaultHopInt = 10; + public const int Hysteria2DefaultHopInt = 30; public const string PolicyGroupExcludeKeywords = @"剩余|过期|到期|重置|[Rr]emaining|[Ee]xpir|[Rr]eset"; diff --git a/v2rayN/ServiceLib/Models/ConfigItems.cs b/v2rayN/ServiceLib/Models/ConfigItems.cs index fa766f0d..d47d2876 100644 --- a/v2rayN/ServiceLib/Models/ConfigItems.cs +++ b/v2rayN/ServiceLib/Models/ConfigItems.cs @@ -197,7 +197,7 @@ public class HysteriaItem { public int UpMbps { get; set; } public int DownMbps { get; set; } - public int HopInterval { get; set; } = 30; + public int HopInterval { get; set; } = Global.Hysteria2DefaultHopInt; } [Serializable] diff --git a/v2rayN/ServiceLib/ViewModels/AddServerViewModel.cs b/v2rayN/ServiceLib/ViewModels/AddServerViewModel.cs index 9fbb6125..0264bc1f 100644 --- a/v2rayN/ServiceLib/ViewModels/AddServerViewModel.cs +++ b/v2rayN/ServiceLib/ViewModels/AddServerViewModel.cs @@ -292,7 +292,7 @@ public class AddServerViewModel : MyReactiveObject SalamanderPass = protocolExtra?.SalamanderPass ?? string.Empty; UpMbps = protocolExtra?.UpMbps; DownMbps = protocolExtra?.DownMbps; - HopInterval = protocolExtra?.HopInterval.IsNullOrEmpty() ?? true ? Global.Hysteria2DefaultHopInt.ToString() : protocolExtra.HopInterval; + HopInterval = protocolExtra?.HopInterval ?? string.Empty; VmessSecurity = protocolExtra?.VmessSecurity?.IsNullOrEmpty() == false ? protocolExtra.VmessSecurity : Global.DefaultSecurity; VlessEncryption = protocolExtra?.VlessEncryption.IsNullOrEmpty() == false ? protocolExtra.VlessEncryption : Global.None; SsMethod = protocolExtra?.SsMethod ?? string.Empty;