diff --git a/gate-traefik/templates/etc/traefik/traefik.yaml b/gate-traefik/templates/etc/traefik/traefik.yaml index d6e6ac9..ade73e2 100644 --- a/gate-traefik/templates/etc/traefik/traefik.yaml +++ b/gate-traefik/templates/etc/traefik/traefik.yaml @@ -34,7 +34,7 @@ entryPoints: address: ':443' traefik: - address: ':8080' + address: '${GATE_ADMIN_IPn}:8080' api: diff --git a/wireguard/make.sh b/wireguard/make.sh index a6a52ff..09887b8 100755 --- a/wireguard/make.sh +++ b/wireguard/make.sh @@ -38,6 +38,7 @@ LAN_GATE=SKIP REBOOT=${REBOOT:=1} + # Wireguard config... DFL_ENDPOINT=${DFL_ENDPOINT:=$(\ which dig > /dev/null 2>&1 \ @@ -59,6 +60,7 @@ xread "Local network DNS:" DNS xreadYes "Show profile as QRcode when done?" QRCODE QRCODE=${QRCODE:-0} + readVars @@ -94,7 +96,8 @@ echo "# Creating CT..." pctCreateAlpine $ID "${OPTS_STAGE_1}" "$PASS" echo "# Installing dependencies..." -@ lxc-attach $ID apk add iptables wireguard-tools-wg-quick make bind-tools libqrencode logrotate +@ lxc-attach $ID apk add \ + iptables wireguard-tools-wg-quick make bind-tools libqrencode logrotate echo "# Copying assets..." @ pct-push-r $ID ./assets / @@ -104,10 +107,6 @@ echo "# Setup: wireguard server and client profile..." @ lxc-attach $ID -- bash -c "cd /root \ && QRCODE=${QRCODE} make server default.client" -#echo "# client config:" -#@ mkdir -p clients -#@ pct pull $ID /etc/wireguard/clients/default.wg clients/default.conf - echo "# Post config..." pctSet $ID "${OPTS_STAGE_2}" $REBOOT diff --git a/wireguard/templates/root/Makefile b/wireguard/templates/root/Makefile index 3f306f1..25e9550 100644 --- a/wireguard/templates/root/Makefile +++ b/wireguard/templates/root/Makefile @@ -42,6 +42,7 @@ ALLOWED_IPS ?= ${ALLOWED_IPS} # NOTE: the first letter of each pattern is quoted to prevent it from # being substituted when generating this Makefile from template. +# XXX build this from client files... $(SERVER_CONF): $(SERVER_TPL) $(SERVER_KEY) cat $< \ | sed \