mirror of
https://github.com/2dust/v2rayN.git
synced 2026-04-17 04:55:45 +00:00
Fix
This commit is contained in:
parent
ecf8b8f939
commit
4a10a862eb
2 changed files with 6 additions and 5 deletions
|
|
@ -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(',')))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -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