mirror of
https://github.com/2dust/v2rayN.git
synced 2026-05-01 11:55:54 +00:00
Compare commits
2 commits
d0031ad0bb
...
5414bae069
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5414bae069 | ||
|
|
4a10a862eb |
3 changed files with 10 additions and 9 deletions
|
|
@ -463,7 +463,7 @@ public class HysteriaSettings4Ray
|
||||||
|
|
||||||
public class UdpHop4Ray
|
public class UdpHop4Ray
|
||||||
{
|
{
|
||||||
public string? port { get; set; }
|
public string? ports { get; set; }
|
||||||
public string? interval { get; set; }
|
public string? interval { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -490,7 +490,7 @@ public class QuicParams4Ray
|
||||||
public string? congestion { get; set; }
|
public string? congestion { get; set; }
|
||||||
public string? brutalUp { get; set; }
|
public string? brutalUp { get; set; }
|
||||||
public string? brutalDown { get; set; }
|
public string? brutalDown { get; set; }
|
||||||
public UdpHop4Ray? udphop { get; set; }
|
public UdpHop4Ray? udpHop { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class AccountsItem4Ray
|
public class AccountsItem4Ray
|
||||||
|
|
|
||||||
|
|
@ -223,13 +223,14 @@ public partial class CoreConfigSingboxService
|
||||||
password = protocolExtra.SalamanderPass.TrimEx(),
|
password = protocolExtra.SalamanderPass.TrimEx(),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
int? upMbps = protocolExtra?.UpMbps is { } su and >= 0
|
||||||
outbound.up_mbps = protocolExtra?.UpMbps is { } su and >= 0
|
|
||||||
? su
|
? su
|
||||||
: _config.HysteriaItem.UpMbps;
|
: _config.HysteriaItem.UpMbps;
|
||||||
outbound.down_mbps = protocolExtra?.DownMbps is { } sd and >= 0
|
int? downMbps = protocolExtra?.DownMbps is { } sd and >= 0
|
||||||
? sd
|
? sd
|
||||||
: _config.HysteriaItem.DownMbps;
|
: _config.HysteriaItem.UpMbps;
|
||||||
|
outbound.up_mbps = upMbps > 0 ? upMbps : null;
|
||||||
|
outbound.down_mbps = downMbps > 0 ? downMbps : null;
|
||||||
var ports = protocolExtra?.Ports?.IsNullOrEmpty() == false ? protocolExtra.Ports : null;
|
var ports = protocolExtra?.Ports?.IsNullOrEmpty() == false ? protocolExtra.Ports : null;
|
||||||
if ((!ports.IsNullOrEmpty()) && (ports.Contains(':') || ports.Contains('-') || ports.Contains(',')))
|
if ((!ports.IsNullOrEmpty()) && (ports.Contains(':') || ports.Contains('-') || ports.Contains(',')))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -605,10 +605,10 @@ public partial class CoreConfigV2rayService
|
||||||
{
|
{
|
||||||
var udpHop = new UdpHop4Ray
|
var udpHop = new UdpHop4Ray
|
||||||
{
|
{
|
||||||
port = ports.Replace(':', '-'),
|
ports = ports.Replace(':', '-'),
|
||||||
interval = hopInterval,
|
interval = hopInterval,
|
||||||
};
|
};
|
||||||
quicParams.udphop = udpHop;
|
quicParams.udpHop = udpHop;
|
||||||
}
|
}
|
||||||
if (upMbps > 0 || downMbps > 0)
|
if (upMbps > 0 || downMbps > 0)
|
||||||
{
|
{
|
||||||
|
|
@ -675,7 +675,7 @@ public partial class CoreConfigV2rayService
|
||||||
|
|
||||||
if (!_node.Finalmask.IsNullOrEmpty())
|
if (!_node.Finalmask.IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
streamSettings.finalmask = JsonUtils.Deserialize<object>(_node.Finalmask);
|
streamSettings.finalmask = JsonUtils.ParseJson(_node.Finalmask);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue