Skip to content

Commit

Permalink
Update entrypoint.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
thebalaa authored Jun 11, 2024
1 parent e3efd35 commit 0aa41f1
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/client-link/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ ip link set link0 up
ip link set link0 mtu $LINK_MTU

wg set link0 peer $GATEWAY_LINK_WG_PUBKEY allowed-ips 10.0.0.1/32 persistent-keepalive 30 endpoint $GATEWAY_ENDPOINT
export EXPOSE=$(cat <<-END
EXPOSE=$(cat <<-END
$EXPOSE {
header_up X-Forwarded-Proto {scheme}
}
header_up X-Forwarded-Proto {scheme}
}
END
)
if [ -z ${FORWARD_ONLY+x} ]; then
Expand All @@ -26,7 +26,7 @@ if [ -z ${FORWARD_ONLY+x} ]; then
echo "Configure Caddy for use with TLS backend"
if [ ! -z ${CADDY_TLS_INSECURE+x} ]; then # if CADDY_TLS_INSECURE
echo "Skip TLS verification"
export EXPOSE=$(cat <<-END
EXPOSE=$(cat <<-END
$EXPOSE {
transport http {
tls
Expand All @@ -38,7 +38,7 @@ END
)

else # CADDY_TLS_INSECURE is false
export EXPOSE=$(cat <<-END
EXPOSE=$(cat <<-END
$EXPOSE {
transport http {
tls
Expand Down Expand Up @@ -77,6 +77,7 @@ END
END
)
fi
export EXPOSE
export TLS_INTERNAL_CONFIG
envsubst < /etc/Caddyfile.template > $CADDYFILE
caddy run --config $CADDYFILE
Expand Down

0 comments on commit 0aa41f1

Please sign in to comment.