mirror of
https://github.com/cedar2025/Xboard.git
synced 2025-01-22 18:48:14 -05:00
fix: 修复vless 使用Tls时sni不下发的问题
This commit is contained in:
parent
3a4efcc1f8
commit
9939f2c2e1
@ -199,8 +199,8 @@ class ClashMeta
|
|||||||
$tlsSettings = $server['tls_settings'];
|
$tlsSettings = $server['tls_settings'];
|
||||||
if (isset($tlsSettings['allowInsecure']) && !empty($tlsSettings['allowInsecure']))
|
if (isset($tlsSettings['allowInsecure']) && !empty($tlsSettings['allowInsecure']))
|
||||||
$array['skip-cert-verify'] = ($tlsSettings['allowInsecure'] ? true : false);
|
$array['skip-cert-verify'] = ($tlsSettings['allowInsecure'] ? true : false);
|
||||||
if (isset($tlsSettings['serverName']) && !empty($tlsSettings['serverName']))
|
if (isset($tlsSettings['server_name']) && !empty($tlsSettings['server_name']))
|
||||||
$array['servername'] = $tlsSettings['serverName'];
|
$array['servername'] = $tlsSettings['server_name'];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2: //开启reality
|
case 2: //开启reality
|
||||||
|
@ -126,8 +126,8 @@ class General
|
|||||||
case 1:
|
case 1:
|
||||||
if ($server['tls_settings']) {
|
if ($server['tls_settings']) {
|
||||||
$tlsSettings = $server['tls_settings'];
|
$tlsSettings = $server['tls_settings'];
|
||||||
if (isset($tlsSettings['serverName']) && !empty($tlsSettings['serverName']))
|
if (isset($tlsSettings['server_name']) && !empty($tlsSettings['server_name']))
|
||||||
$config['sni'] = $tlsSettings['serverName'];
|
$config['sni'] = $tlsSettings['server_name'];
|
||||||
$config['security'] = "tls";
|
$config['security'] = "tls";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -114,8 +114,8 @@ class Passwall
|
|||||||
case 1:
|
case 1:
|
||||||
if ($server['tls_settings']) {
|
if ($server['tls_settings']) {
|
||||||
$tlsSettings = $server['tls_settings'];
|
$tlsSettings = $server['tls_settings'];
|
||||||
if (isset($tlsSettings['serverName']) && !empty($tlsSettings['serverName']))
|
if (isset($tlsSettings['server_name']) && !empty($tlsSettings['server_name']))
|
||||||
$config['sni'] = $tlsSettings['serverName'];
|
$config['sni'] = $tlsSettings['server_name'];
|
||||||
$config['security'] = "tls";
|
$config['security'] = "tls";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -102,8 +102,8 @@ class SSRPlus
|
|||||||
case 1:
|
case 1:
|
||||||
if ($server['tls_settings']) {
|
if ($server['tls_settings']) {
|
||||||
$tlsSettings = $server['tls_settings'];
|
$tlsSettings = $server['tls_settings'];
|
||||||
if (isset($tlsSettings['serverName']) && !empty($tlsSettings['serverName']))
|
if (isset($tlsSettings['server_name']) && !empty($tlsSettings['server_name']))
|
||||||
$config['sni'] = $tlsSettings['serverName'];
|
$config['sni'] = $tlsSettings['server_name'];
|
||||||
$config['security'] = "tls";
|
$config['security'] = "tls";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -158,8 +158,8 @@ class Shadowrocket
|
|||||||
$tlsSettings = $server['tls_settings'];
|
$tlsSettings = $server['tls_settings'];
|
||||||
if (isset($tlsSettings['allowInsecure']) && !empty($tlsSettings['allowInsecure']))
|
if (isset($tlsSettings['allowInsecure']) && !empty($tlsSettings['allowInsecure']))
|
||||||
$config['allowInsecure'] = (int)$tlsSettings['allowInsecure'];
|
$config['allowInsecure'] = (int)$tlsSettings['allowInsecure'];
|
||||||
if (isset($tlsSettings['serverName']) && !empty($tlsSettings['serverName']))
|
if (isset($tlsSettings['server_name']) && !empty($tlsSettings['server_name']))
|
||||||
$config['peer'] = $tlsSettings['serverName'];
|
$config['peer'] = $tlsSettings['server_name'];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
@ -130,8 +130,8 @@ class V2rayN
|
|||||||
case 1:
|
case 1:
|
||||||
if ($server['tls_settings']) {
|
if ($server['tls_settings']) {
|
||||||
$tlsSettings = $server['tls_settings'];
|
$tlsSettings = $server['tls_settings'];
|
||||||
if (isset($tlsSettings['serverName']) && !empty($tlsSettings['serverName']))
|
if (isset($tlsSettings['server_name']) && !empty($tlsSettings['server_name']))
|
||||||
$config['sni'] = $tlsSettings['serverName'];
|
$config['sni'] = $tlsSettings['server_name'];
|
||||||
$config['security'] = "tls";
|
$config['security'] = "tls";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -114,8 +114,8 @@ class V2rayNG
|
|||||||
case 1:
|
case 1:
|
||||||
if ($server['tls_settings']) {
|
if ($server['tls_settings']) {
|
||||||
$tlsSettings = $server['tls_settings'];
|
$tlsSettings = $server['tls_settings'];
|
||||||
if (isset($tlsSettings['serverName']) && !empty($tlsSettings['serverName']))
|
if (isset($tlsSettings['server_name']) && !empty($tlsSettings['server_name']))
|
||||||
$config['sni'] = $tlsSettings['serverName'];
|
$config['sni'] = $tlsSettings['server_name'];
|
||||||
$config['security'] = "tls";
|
$config['security'] = "tls";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user