mirror of
https://github.com/2dust/v2rayN.git
synced 2026-11-04 11:35:02 +03:00
Refactor Utils
This commit is contained in:
@@ -678,8 +678,8 @@ namespace ServiceLib.Services.CoreConfig
|
||||
{
|
||||
outbound.private_key = node.id;
|
||||
outbound.peer_public_key = node.publicKey;
|
||||
outbound.reserved = Utils.String2List(node.path).Select(int.Parse).ToArray();
|
||||
outbound.local_address = [.. Utils.String2List(node.requestHost)];
|
||||
outbound.reserved = Utils.String2List(node.path)?.Select(int.Parse).ToList();
|
||||
outbound.local_address = Utils.String2List(node.requestHost);
|
||||
outbound.mtu = Utils.ToInt(node.shortId.IsNullOrEmpty() ? Global.TunMtus.FirstOrDefault() : node.shortId);
|
||||
break;
|
||||
}
|
||||
@@ -732,7 +732,7 @@ namespace ServiceLib.Services.CoreConfig
|
||||
}
|
||||
else if (Utils.IsNotEmpty(node.requestHost))
|
||||
{
|
||||
server_name = Utils.String2List(node.requestHost)[0];
|
||||
server_name = Utils.String2List(node.requestHost)?.First();
|
||||
}
|
||||
var tls = new Tls4Sbox()
|
||||
{
|
||||
|
||||
@@ -829,7 +829,7 @@ namespace ServiceLib.Services.CoreConfig
|
||||
}
|
||||
else if (Utils.IsNotEmpty(host))
|
||||
{
|
||||
tlsSettings.serverName = Utils.String2List(host)[0];
|
||||
tlsSettings.serverName = Utils.String2List(host)?.First();
|
||||
}
|
||||
streamSettings.tlsSettings = tlsSettings;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user