From f86dd89cdd2064ccf117060cfff94cbdc4f3647d Mon Sep 17 00:00:00 2001 From: Takeshi Matsumoto Date: Sat, 16 Aug 2025 02:44:17 +0900 Subject: [PATCH] fix: correct SNI domain configuration paths in SingBox protocol - Fix Trojan protocol to use 'server_name' instead of 'tls_settings.server_name' - Fix Hysteria protocol to use 'tls.server_name' instead of 'tls_settings.server_name' - Align with Server model configuration and General protocol implementation - Resolves missing SNI domains in sing-box configuration generation This fixes the inconsistency where SNI domains were missing for certain protocols while working correctly in General protocol handler. --- app/Protocols/SingBox.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Protocols/SingBox.php b/app/Protocols/SingBox.php index ae0a4e9..b50e66d 100644 --- a/app/Protocols/SingBox.php +++ b/app/Protocols/SingBox.php @@ -310,7 +310,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')) { @@ -353,7 +353,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 = [