mirror of
https://github.com/2dust/v2rayN.git
synced 2025-05-03 05:38:51 +00:00
Fill sing-box server_name
This commit is contained in:
parent
82dea829f1
commit
9433213fe5
1 changed files with 10 additions and 1 deletions
|
@ -315,10 +315,19 @@ namespace v2rayN.Handler
|
||||||
{
|
{
|
||||||
if (node.streamSecurity == Global.StreamSecurityReality || node.streamSecurity == Global.StreamSecurity)
|
if (node.streamSecurity == Global.StreamSecurityReality || node.streamSecurity == Global.StreamSecurity)
|
||||||
{
|
{
|
||||||
|
var server_name = string.Empty;
|
||||||
|
if (!string.IsNullOrWhiteSpace(node.sni))
|
||||||
|
{
|
||||||
|
server_name = node.sni;
|
||||||
|
}
|
||||||
|
else if (!string.IsNullOrWhiteSpace(node.requestHost))
|
||||||
|
{
|
||||||
|
server_name = Utils.String2List(node.requestHost)[0];
|
||||||
|
}
|
||||||
var tls = new Tls4Sbox()
|
var tls = new Tls4Sbox()
|
||||||
{
|
{
|
||||||
enabled = true,
|
enabled = true,
|
||||||
server_name = node.sni,
|
server_name = server_name,
|
||||||
insecure = Utils.ToBool(node.allowInsecure.IsNullOrEmpty() ? _config.coreBasicItem.defAllowInsecure.ToString().ToLower() : node.allowInsecure),
|
insecure = Utils.ToBool(node.allowInsecure.IsNullOrEmpty() ? _config.coreBasicItem.defAllowInsecure.ToString().ToLower() : node.allowInsecure),
|
||||||
alpn = node.GetAlpn(),
|
alpn = node.GetAlpn(),
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue