mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-03 10:30:51 +08:00
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:
@@ -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 = [
|
||||
|
||||
Reference in New Issue
Block a user