Merge pull request #638 from zytakeshi/fix/singbox-sni-domain-issue

fix: correct SNI domain configuration paths in SingBox protocol
This commit is contained in:
Xboard
2025-08-21 18:07:53 +08:00
committed by GitHub

View File

@@ -204,10 +204,10 @@ class SingBox extends AbstractProtocol
}
$transport = match ($protocol_settings['network']) {
'tcp' => [
'tcp' => data_get($protocol_settings, 'network_settings.header.type', 'none') !== 'none' ? [
'type' => 'http',
'path' => Arr::random(data_get($protocol_settings, 'network_settings.header.request.path', ['/']))
],
] : null,
'ws' => [
'type' => 'ws',
'path' => data_get($protocol_settings, 'network_settings.path'),
@@ -321,7 +321,7 @@ class SingBox extends AbstractProtocol
'insecure' => (bool) data_get($protocol_settings, 'allow_insecure', false),
]
];
if ($serverName = data_get($protocol_settings, 'tls_settings.server_name')) {
if ($serverName = data_get($protocol_settings, 'server_name')) {
$array['tls']['server_name'] = $serverName;
}
$transport = match (data_get($protocol_settings, 'network')) {
@@ -364,7 +364,7 @@ class SingBox extends AbstractProtocol
}
}
if ($serverName = data_get($protocol_settings, 'tls_settings.server_name')) {
if ($serverName = data_get($protocol_settings, 'tls.server_name')) {
$baseConfig['tls']['server_name'] = $serverName;
}
$speedConfig = [