EmbarkStudios / wg-ui

WireGuard Web UI for self-serve client configurations, with optional auth.
Apache License 2.0
1.5k stars 129 forks source link

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

Closed phil535 closed 3 years ago

phil535 commented 3 years ago

This feature adds the support to configure the wireguard device name in the wg-ui userspace build. This configuration should already work in the wg-ui:latest build using the kernel version of wireguard (see server.go) and was therefore not tested here.

The main change was done in wg-go-ui.sh parsing the environmental variable WIREGUARD_UI_WG_DEVICE_NAME. The default value is still wg0.

In addition to this change a docker-compose file for userspace was added. This docker-compose file is just a copy of the kernel version with some minor adjustments.

The build process as well as the docker execution was tested with the device name wg1 in userspace mode and works as expected.

I think it would be better to not list the environmental variable WIREGUARD_UI_WG_DEVICE_NAME in the docker-compose files at all and add a parameter description in the configuration section of the readme.