fix: resolve array spread operator syntax in VLESS tls_settings

This commit is contained in:
xboard 2025-01-19 19:02:17 +08:00
parent c9c72cc847
commit 9ca5d96048

View File

@ -116,9 +116,11 @@ class UniProxyController extends Controller
...$baseConfig, ...$baseConfig,
'tls' => (int) $protocolSettings['tls'], 'tls' => (int) $protocolSettings['tls'],
'flow' => $protocolSettings['flow'], 'flow' => $protocolSettings['flow'],
'tls_settings' => [...(int) $protocolSettings['tls'] === 1 'tls_settings' => [
? $protocolSettings['tls_settings'] ...((int) $protocolSettings['tls'] === 1
: $protocolSettings['reality_settings']] ? ($protocolSettings['tls_settings'] ?? [])
: ($protocolSettings['reality_settings'] ?? []))
]
], ],
'hysteria' => [ 'hysteria' => [
'server_port' => (int) $serverPort, 'server_port' => (int) $serverPort,