From e4b2fc15b6f4251b60ade38d5a0a61e6a4fed744 Mon Sep 17 00:00:00 2001 From: Paolo Asperti Date: Wed, 22 Jun 2022 20:56:01 +0200 Subject: [PATCH] added ENV forcing only encrypted connections --- docker/Dockerfile | 1 + docker/rootfs/etc/s6-overlay/s6-rc.d/hbbs/run | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 0da0e34..c68677b 100755 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -11,6 +11,7 @@ RUN \ COPY rootfs / ENV RELAY relay.example.com +ENV ENCRYPTED_ONLY 0 EXPOSE 21115 21116 21116/udp 21117 21118 21119 diff --git a/docker/rootfs/etc/s6-overlay/s6-rc.d/hbbs/run b/docker/rootfs/etc/s6-overlay/s6-rc.d/hbbs/run index ae3b02a..383f7ce 100755 --- a/docker/rootfs/etc/s6-overlay/s6-rc.d/hbbs/run +++ b/docker/rootfs/etc/s6-overlay/s6-rc.d/hbbs/run @@ -1,3 +1,5 @@ -#!/command/execlineb -P -posix-cd /data -/usr/bin/hbbs -r $RELAY +#!/command/with-contenv sh +cd /data +PARAMS= +[ "${ENCRYPTED_ONLY}" = "1" ] && PARAMS="-k _" +/usr/bin/hbbs -r $RELAY $PARAMS