fix: stop sending VLESS decryption when encryption is disabled

This commit is contained in:
xboard 2026-04-08 11:03:09 +08:00
parent 7af8d3be47
commit f7118ab0bd

View File

@ -183,7 +183,10 @@ class ServerService
...$baseConfig,
'tls' => (int) $protocolSettings['tls'],
'flow' => $protocolSettings['flow'],
'decryption' => data_get($protocolSettings, 'encryption.decryption'),
'decryption' => match (data_get($protocolSettings, 'encryption.enabled')) {
true => data_get($protocolSettings, 'encryption.decryption'),
default => null,
},
'tls_settings' => match ((int) $protocolSettings['tls']) {
2 => $protocolSettings['reality_settings'],
default => $protocolSettings['tls_settings'],