diff --git a/app/Protocols/SingBox.php b/app/Protocols/SingBox.php index 97cd66a..c2d2ccd 100644 --- a/app/Protocols/SingBox.php +++ b/app/Protocols/SingBox.php @@ -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 = [