wstunnel: exclude TLS arguments when enableHTTPS is false

This commit is contained in:
Raymond Douglas 2024-09-16 14:27:42 -07:00
parent d33b553400
commit e868bfa5b1
No known key found for this signature in database

View File

@ -318,10 +318,21 @@ let
lib.cli.toGNUCommandLineShell { } (
lib.recursiveUpdate {
restrict-to = map hostPortToString restrictTo;
tls-certificate =
if useACMEHost != null then "${certConfig.directory}/fullchain.pem" else "${tlsCertificate}";
tls-private-key = if useACMEHost != null then "${certConfig.directory}/key.pem" else "${tlsKey}";
websocket-ping-frequency-sec = websocketPingInterval;
tls-certificate =
if !enableHTTPS then
null
else if useACMEHost != null then
"${certConfig.directory}/fullchain.pem"
else
"${tlsCertificate}";
tls-private-key =
if !enableHTTPS then
null
else if useACMEHost != null then
"${certConfig.directory}/key.pem"
else
"${tlsKey}";
} extraArgs
)
} \
@ -475,6 +486,7 @@ in
meta.maintainers = with lib.maintainers; [
alyaeanyx
raylas
rvdp
neverbehave
];