mirror of
https://github.com/2dust/v2rayN.git
synced 2025-04-19 13:42:24 +00:00
Update CoreConfigSingboxService.cs
This commit is contained in:
parent
8dcf5c5b90
commit
cdc5d72cfa
1 changed files with 3 additions and 8 deletions
|
@ -733,15 +733,10 @@ namespace ServiceLib.Services.CoreConfig
|
|||
if (node.Ports.IsNotEmpty())
|
||||
{
|
||||
outbound.server_port = null;
|
||||
outbound.server_ports = new List<string>();
|
||||
var ports = node.Ports.Split(',')
|
||||
.Select(p => p.Trim())
|
||||
.Where(p => !string.IsNullOrEmpty(p))
|
||||
outbound.server_ports = node.Ports.Split(',')
|
||||
.Where(p => p.Trim().IsNotEmpty())
|
||||
.Select(p => p.Replace('-', ':'))
|
||||
.ToList();
|
||||
foreach (var it in ports)
|
||||
{
|
||||
outbound.server_ports.Add(it.Contains('-') ? it.Replace('-', ':') : it);
|
||||
}
|
||||
outbound.hop_interval = _config.HysteriaItem.HopInterval > 0 ? $"{_config.HysteriaItem.HopInterval}s" : null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue