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