mirror of
https://github.com/Threnklyn/wg-ui.git
synced 2026-05-18 12:53:30 +02:00
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:
@@ -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
|
||||
@@ -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
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user