Compare commits

..

2 commits

Author SHA1 Message Date
DHR60
fcc9cd3f9a
Merge d0031ad0bb into ef5fee9975 2026-03-08 14:33:32 +00:00
DHR60
d0031ad0bb Fix 2026-03-08 22:33:21 +08:00
3 changed files with 8 additions and 9 deletions

View file

@ -463,7 +463,7 @@ public class HysteriaSettings4Ray
public class UdpHop4Ray
{
public string? ports { get; set; }
public string? port { get; set; }
public string? interval { get; set; }
}
@ -490,7 +490,7 @@ public class QuicParams4Ray
public string? congestion { get; set; }
public string? brutalUp { get; set; }
public string? brutalDown { get; set; }
public UdpHop4Ray? udpHop { get; set; }
public UdpHop4Ray? udphop { get; set; }
}
public class AccountsItem4Ray

View file

@ -223,14 +223,13 @@ public partial class CoreConfigSingboxService
password = protocolExtra.SalamanderPass.TrimEx(),
};
}
int? upMbps = protocolExtra?.UpMbps is { } su and >= 0
outbound.up_mbps = protocolExtra?.UpMbps is { } su and >= 0
? su
: _config.HysteriaItem.UpMbps;
int? downMbps = protocolExtra?.DownMbps is { } sd and >= 0
outbound.down_mbps = protocolExtra?.DownMbps is { } sd and >= 0
? sd
: _config.HysteriaItem.UpMbps;
outbound.up_mbps = upMbps > 0 ? upMbps : null;
outbound.down_mbps = downMbps > 0 ? downMbps : null;
: _config.HysteriaItem.DownMbps;
var ports = protocolExtra?.Ports?.IsNullOrEmpty() == false ? protocolExtra.Ports : null;
if ((!ports.IsNullOrEmpty()) && (ports.Contains(':') || ports.Contains('-') || ports.Contains(',')))
{

View file

@ -605,10 +605,10 @@ public partial class CoreConfigV2rayService
{
var udpHop = new UdpHop4Ray
{
ports = ports.Replace(':', '-'),
port = ports.Replace(':', '-'),
interval = hopInterval,
};
quicParams.udpHop = udpHop;
quicParams.udphop = udpHop;
}
if (upMbps > 0 || downMbps > 0)
{