mirror of
https://github.com/vx3r/wg-gen-web.git
synced 2024-11-23 02:42:07 +01:00
Documentation correction pull from github
This commit is contained in:
parent
28c3c405c7
commit
c9fb3c2e29
33
README.md
33
README.md
@ -13,18 +13,18 @@ Simple Web based configuration generator for [WireGuard](https://wireguard.com).
|
|||||||
![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/vx3r/wg-gen-web)
|
![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/vx3r/wg-gen-web)
|
||||||
![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/vx3r/wg-gen-web)
|
![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/vx3r/wg-gen-web)
|
||||||
|
|
||||||
## Whay another one ?
|
## Why another one ?
|
||||||
|
|
||||||
All WireGuard UI implementations are trying to manage the service by applying configurations and creating network rules.
|
All WireGuard UI implementations are trying to manage the service by applying configurations and creating network rules.
|
||||||
This implementation only generate configuration and its up to you to create network rules and apply configuration to WireGuard.
|
This implementation only generates configuration and its up to you to create network rules and apply configuration to WireGuard.
|
||||||
For example by monituring generated directory with [inotifywait](https://github.com/inotify-tools/inotify-tools/wiki).
|
For example by monitoring generated directory with [inotifywait](https://github.com/inotify-tools/inotify-tools/wiki).
|
||||||
|
|
||||||
The goal is to run Wg Gen Web in a container and WireGuard on host system.
|
The goal is to run Wg Gen Web in a container and WireGuard on host system.
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
* Self-serve and web based
|
* Self-hosted and web based
|
||||||
* Automatically select IP from networks chosen for client
|
* Automatically select IP from the netowrk pool assigned to client
|
||||||
* QR-Code for convenient mobile client configuration
|
* QR-Code for convenient mobile client configuration
|
||||||
* Enable / Disable client
|
* Enable / Disable client
|
||||||
* Generation of `wg0.conf` after any modification
|
* Generation of `wg0.conf` after any modification
|
||||||
@ -38,7 +38,7 @@ The easiest way to run Wg Gen Web is using the container image
|
|||||||
```
|
```
|
||||||
docker run --rm -it -v /tmp/wireguard:/data -p 8080:8080 -e "WG_CONF_DIR=/data" vx3r/wg-gen-web:latest
|
docker run --rm -it -v /tmp/wireguard:/data -p 8080:8080 -e "WG_CONF_DIR=/data" vx3r/wg-gen-web:latest
|
||||||
```
|
```
|
||||||
Docker compose snipped
|
Docker compose snippet
|
||||||
```
|
```
|
||||||
version: '3.6'
|
version: '3.6'
|
||||||
services:
|
services:
|
||||||
@ -52,16 +52,13 @@ services:
|
|||||||
- WG_CONF_DIR=/data
|
- WG_CONF_DIR=/data
|
||||||
- WG_INTERFACE_NAME=wg0.conf
|
- WG_INTERFACE_NAME=wg0.conf
|
||||||
volumes:
|
volumes:
|
||||||
- /mnt/raid-lv-data/docker-persistent-data/wg-gen-web:/data
|
- /etc/wireguard:/data
|
||||||
```
|
```
|
||||||
## How to trigger WireGuard on host
|
Please note that mapping ```/etc/wireguard``` to ```/data``` inside the docker, will erase your host's current configuration.
|
||||||
|
If needed, please make sure to backup your files from ```/etc/wireguard```.
|
||||||
|
|
||||||
Before going further create a symlink from docker mounted volume to `/etc/wireguard`
|
A workaround would be to change the ```WG_INTERFACE_NAME``` to something different, as it will create a new interface (```wg-auto.conf``` for example), note that if you do so, you will have to adapt your daemon accordingly.
|
||||||
```
|
### Automatically apply changes using ```systemd```
|
||||||
ln -s /mnt/raid-lv-data/docker-persistent-data/wg-gen-web /etc/wireguard
|
|
||||||
```
|
|
||||||
|
|
||||||
### Example with ```systemd```
|
|
||||||
Using `systemd.path` monitor for directory changes see [systemd doc](https://www.freedesktop.org/software/systemd/man/systemd.path.html)
|
Using `systemd.path` monitor for directory changes see [systemd doc](https://www.freedesktop.org/software/systemd/man/systemd.path.html)
|
||||||
```
|
```
|
||||||
# /etc/systemd/system/wg-gen-web.path
|
# /etc/systemd/system/wg-gen-web.path
|
||||||
@ -90,8 +87,8 @@ WantedBy=multi-user.target
|
|||||||
```
|
```
|
||||||
Which will restart WireGuard service
|
Which will restart WireGuard service
|
||||||
|
|
||||||
### Example with ```inotifywait```
|
### Automatically apply changes using ```inotifywait```
|
||||||
Using whatever init system create a daemon running this script
|
For any other init system, create a daemon running this script
|
||||||
```
|
```
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
while inotifywait -e modify -e create /etc/wireguard; do
|
while inotifywait -e modify -e create /etc/wireguard; do
|
||||||
@ -102,9 +99,9 @@ done
|
|||||||
|
|
||||||
## How to use with existing WireGuard configuration
|
## How to use with existing WireGuard configuration
|
||||||
|
|
||||||
After first run Wg Gen Web will create `server.json` in data directory with alla server informations.
|
After first run Wg Gen Web will create `server.json` in data directory with all server informations.
|
||||||
|
|
||||||
Fill free to modify this file in order to use your existing keys
|
Feel free to modify this file in order to use your existing keys
|
||||||
|
|
||||||
## What is out of scope
|
## What is out of scope
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user