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,
'tls' => (int) $protocolSettings['tls'],
'flow' => $protocolSettings['flow'],
'tls_settings' => [
...((int) $protocolSettings['tls'] === 1
? ($protocolSettings['tls_settings'] ?? [])
: ($protocolSettings['reality_settings'] ?? []))
]
'tls_settings' =>
match ((int) $protocolSettings['tls']) {
2 => $protocolSettings['reality_settings'],
default => $protocolSettings['tls_settings']
}
],
'hysteria' => [
'server_port' => (int) $serverPort,