Support for wireguard device name configuration in wg-ui userspace (#146)

* added wireguard device name configuration for both wireguard and wireguard-go

* fixed entrypoint to be /wg-go-ui.sh, fixed client ip range for ipaddr parsing

Co-authored-by: phil535 <loibl2@hotmail.com>
This commit is contained in:
phil535
2021-10-11 16:26:57 +02:00
committed by GitHub
parent 3f6d2407e3
commit 94013adb1d
3 changed files with 23 additions and 1 deletions
+21
View File
@@ -0,0 +1,21 @@
version: "3.7"
services:
app:
image: embarkstudios/wireguard-ui:userspace
privileged: true
network_mode: "host"
volumes:
- /opt/wireguard-ui:/data
environment:
- WIREGUARD_UI_LISTEN_ADDRESS=:8080
- WIREGUARD_UI_LOG_LEVEL=debug
- WIREGUARD_UI_DATA_DIR=/data
- WIREGUARD_UI_WG_ENDPOINT=your-andpoint-address:51820
- WIREGUARD_UI_CLIENT_IP_RANGE=192.168.10.1/24
# - WIREGUARD_UI_WG_DNS=192.168.10.1
- WIREGUARD_UI_NAT=true
- WIREGUARD_UI_NAT_DEVICE=eth0
# - WIREGUARD_UI_WG_DEVICE_NAME=wg1
restart: always
+1
View File
@@ -17,5 +17,6 @@ services:
# - WIREGUARD_UI_WG_DNS=192.168.10.0
- WIREGUARD_UI_NAT=true
- WIREGUARD_UI_NAT_DEVICE=eth0
# - WIREGUARD_UI_WG_DEVICE_NAME=wg0
restart: always
+1 -1
View File
@@ -8,7 +8,7 @@ TUNFILE=/dev/net/tun
[ ! -c $TUNFILE ] && mknod $TUNFILE c 10 200
# Start the first process
./wireguard-go wg0
./wireguard-go ${WIREGUARD_UI_WG_DEVICE_NAME:-wg0}
status=$?
if [ $status -ne 0 ]; then
echo "Failed to start wireguard-go: $status"