fix: resolve array spread operator syntax in VLESS tls_settings again

This commit is contained in:
xboard 2025-01-19 21:12:32 +08:00
parent 9ca5d96048
commit ff259aee44

View File

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