fix: 修复vless 使用Tls时sni不下发的问题

This commit is contained in:
xboard 2024-01-17 17:54:33 +08:00
parent 3a4efcc1f8
commit 9939f2c2e1
7 changed files with 14 additions and 14 deletions

View File

@ -199,8 +199,8 @@ class ClashMeta
$tlsSettings = $server['tls_settings'];
if (isset($tlsSettings['allowInsecure']) && !empty($tlsSettings['allowInsecure']))
$array['skip-cert-verify'] = ($tlsSettings['allowInsecure'] ? true : false);
if (isset($tlsSettings['serverName']) && !empty($tlsSettings['serverName']))
$array['servername'] = $tlsSettings['serverName'];
if (isset($tlsSettings['server_name']) && !empty($tlsSettings['server_name']))
$array['servername'] = $tlsSettings['server_name'];
}
break;
case 2: //开启reality

View File

@ -126,8 +126,8 @@ class General
case 1:
if ($server['tls_settings']) {
$tlsSettings = $server['tls_settings'];
if (isset($tlsSettings['serverName']) && !empty($tlsSettings['serverName']))
$config['sni'] = $tlsSettings['serverName'];
if (isset($tlsSettings['server_name']) && !empty($tlsSettings['server_name']))
$config['sni'] = $tlsSettings['server_name'];
$config['security'] = "tls";
}
break;

View File

@ -114,8 +114,8 @@ class Passwall
case 1:
if ($server['tls_settings']) {
$tlsSettings = $server['tls_settings'];
if (isset($tlsSettings['serverName']) && !empty($tlsSettings['serverName']))
$config['sni'] = $tlsSettings['serverName'];
if (isset($tlsSettings['server_name']) && !empty($tlsSettings['server_name']))
$config['sni'] = $tlsSettings['server_name'];
$config['security'] = "tls";
}
break;

View File

@ -102,8 +102,8 @@ class SSRPlus
case 1:
if ($server['tls_settings']) {
$tlsSettings = $server['tls_settings'];
if (isset($tlsSettings['serverName']) && !empty($tlsSettings['serverName']))
$config['sni'] = $tlsSettings['serverName'];
if (isset($tlsSettings['server_name']) && !empty($tlsSettings['server_name']))
$config['sni'] = $tlsSettings['server_name'];
$config['security'] = "tls";
}
break;

View File

@ -158,8 +158,8 @@ class Shadowrocket
$tlsSettings = $server['tls_settings'];
if (isset($tlsSettings['allowInsecure']) && !empty($tlsSettings['allowInsecure']))
$config['allowInsecure'] = (int)$tlsSettings['allowInsecure'];
if (isset($tlsSettings['serverName']) && !empty($tlsSettings['serverName']))
$config['peer'] = $tlsSettings['serverName'];
if (isset($tlsSettings['server_name']) && !empty($tlsSettings['server_name']))
$config['peer'] = $tlsSettings['server_name'];
}
break;
case 2:

View File

@ -130,8 +130,8 @@ class V2rayN
case 1:
if ($server['tls_settings']) {
$tlsSettings = $server['tls_settings'];
if (isset($tlsSettings['serverName']) && !empty($tlsSettings['serverName']))
$config['sni'] = $tlsSettings['serverName'];
if (isset($tlsSettings['server_name']) && !empty($tlsSettings['server_name']))
$config['sni'] = $tlsSettings['server_name'];
$config['security'] = "tls";
}
break;

View File

@ -114,8 +114,8 @@ class V2rayNG
case 1:
if ($server['tls_settings']) {
$tlsSettings = $server['tls_settings'];
if (isset($tlsSettings['serverName']) && !empty($tlsSettings['serverName']))
$config['sni'] = $tlsSettings['serverName'];
if (isset($tlsSettings['server_name']) && !empty($tlsSettings['server_name']))
$config['sni'] = $tlsSettings['server_name'];
$config['security'] = "tls";
}
break;