Skip to content

Commit 58ef46f

Browse files
author
xboard
committed
fix: stop sending VLESS decryption when encryption is disabled
1 parent ec49ba3 commit 58ef46f

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

app/Services/ServerService.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,10 @@ public static function buildNodeConfig(Server $node): array
183183
...$baseConfig,
184184
'tls' => (int) $protocolSettings['tls'],
185185
'flow' => $protocolSettings['flow'],
186-
'decryption' => data_get($protocolSettings, 'encryption.decryption'),
186+
'decryption' => match (data_get($protocolSettings, 'encryption.enabled')) {
187+
true => data_get($protocolSettings, 'encryption.decryption'),
188+
default => null,
189+
},
187190
'tls_settings' => match ((int) $protocolSettings['tls']) {
188191
2 => $protocolSettings['reality_settings'],
189192
default => $protocolSettings['tls_settings'],

0 commit comments

Comments
 (0)