# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
steps:
- name:Checkout repository
uses:actions/checkout@v3
# Initializes the CodeQL tools for scanning.
- name:Initialize CodeQL
uses:github/codeql-action/init@v2
with:
languages:${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name:Autobuild
uses:github/codeql-action/autobuild@v2
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
You have found the easiest way to install & manage WireGuard on any Linux host!
This is a security and hardening divergent fork of [wg-easy](https://github.com/Gyarbij/wireui) The easiest way to run [WireGuard](https://github.com/WireGuard). This takes care of the configurations steps for novices while still allowing customizability for more experienced users, and comes packed with a UI, so you're not fiddling with .conf files and scp.
<palign="center">
<palign="center">
<imgsrc="./assets/screenshot.png"width="802"/>
<imgsrc="./assets/screenshot.png"width="802"/>
@ -27,13 +21,21 @@ You have found the easiest way to install & manage WireGuard on any Linux host!
## Requirements
## Requirements
* A host with a kernel that supports WireGuard (all modern kernels).
* A host with a kernel that supports WireGuard (all modern kernels).
* A host with Docker installed.
* A docker installation on the host.
* The ability to open a port in your router/FW.
## Installation
## Installation
### 1. Install Docker
### 1. Install Docker
If you haven't installed Docker yet, install it by running:
If there is no present installation of Docker, you should install it using:
[Docker Desktop](https://docs.docker.com/get-docker/) for Desktop
or
[Docker Engine](https://docs.docker.com/engine/install/) for Servers/Headless
Alternatively, you can install it by running the convenience script below. _The convenience script is not recommended for production environments, but can be used as an example to create a provisioning script that is tailored to your needs_:
```bash
```bash
$ curl -sSL https://get.docker.com | sh
$ curl -sSL https://get.docker.com | sh
@ -43,16 +45,16 @@ $ exit
And log in again.
And log in again.
### 2. Run WireGuard Easy
### 2. Run WireUI
To automatically install & run wg-easy, simply run:
To automatically install & run wireui, simply run:
<pre>
<pre>
$ docker run -d \
$ docker run -d \
--name=wg-easy \
--name=wireui \
-e WG_HOST=<b>🚨YOUR_SERVER_IP</b> \
-e WG_HOST=<b>🚨YOUR_SERVER_IP</b> \
-e PASSWORD=<b>🚨YOUR_ADMIN_PASSWORD</b> \
-e PASSWORD=<b>🚨YOUR_ADMIN_PASSWORD</b> \
-v ~/.wg-easy:/etc/wireguard \
-v ~/.wireui:/etc/wireguard \
-p 51820:51820/udp \
-p 51820:51820/udp \
-p 51821:51821/tcp \
-p 51821:51821/tcp \
--cap-add=NET_ADMIN \
--cap-add=NET_ADMIN \
@ -60,7 +62,7 @@ $ docker run -d \
--sysctl="net.ipv4.conf.all.src_valid_mark=1" \
--sysctl="net.ipv4.conf.all.src_valid_mark=1" \
--sysctl="net.ipv4.ip_forward=1" \
--sysctl="net.ipv4.ip_forward=1" \
--restart unless-stopped \
--restart unless-stopped \
weejewel/wg-easy
gyarbij/wireui
</pre>
</pre>
> 💡 Replace `YOUR_SERVER_IP` with your WAN IP, or a Dynamic DNS hostname.
> 💡 Replace `YOUR_SERVER_IP` with your WAN IP, or a Dynamic DNS hostname.
@ -69,11 +71,8 @@ $ docker run -d \
The Web UI will now be available on `http://0.0.0.0:51821`.
The Web UI will now be available on `http://0.0.0.0:51821`.
> 💡 Your configuration files will be saved in `~/.wg-easy`
> 💡 Your configuration files will be saved in `~/.wireui`
### 3. Sponsor
Are you enjoying this project? [Buy me a beer!](https://github.com/sponsors/WeeJeWel) 🍻
## Options
## Options
@ -81,18 +80,18 @@ These options can be configured by setting environment variables using `-e KEY="
| Env | Default | Example | Description |
| Env | Default | Example | Description |
| - | - | - | - |
| - | - | - | - |
| `PASSWORD` | - | `foobar123` | When set, requires a password when logging in to the Web UI. |
| `PASSWORD` | - | `ChangeMe@69` | When set, requires a password when logging in to the Web UI. |
| `WG_HOST` | - | `vpn.myserver.com` | The public hostname of your VPN server. |
| `WG_HOST` | - | `vpn.example.com` | The public hostname of your VPN server. |
| `WG_PORT` | `51820` | `12345` | The public UDP port of your VPN server. WireGuard will always listen on `51820` inside the Docker container. |
| `WG_PORT` | `51820` | `12345` | The public UDP port of your VPN server. WireGuard will always listen on `51820` inside the Docker container. |
| `WG_MTU` | `null` | `1420` | The MTU the clients will use. Server uses default WG MTU. |
| `WG_MTU` | `null` | `1420` | The MTU the clients will use. Server uses default WG MTU. |
| `WG_PERSISTENT_KEEPALIVE` | `0` | `25` | Value in seconds to keep the "connection" open. If this value is 0, then connections won't be kept alive. |
| `WG_PERSISTENT_KEEPALIVE` | `0` | `25` | Value in seconds to keep the "connection" open. |
| `WG_PRE_UP` | `...` | - | See [config.js](https://github.com/WeeJeWel/wg-easy/blob/master/src/config.js#L19) for the default value. |
| `WG_PRE_UP` | `...` | - | See [config.js](https://github.com/Gyarbij/wireui/blob/master/src/config.js#L19) for the default value. |
| `WG_POST_UP` | `...` | `iptables ...` | See [config.js](https://github.com/WeeJeWel/wg-easy/blob/master/src/config.js#L20) for the default value. |
| `WG_POST_UP` | `...` | `iptables ...` | See [config.js](https://github.com/Gyarbij/wireui/blob/master/src/config.js#L20) for the default value. |
| `WG_PRE_DOWN` | `...` | - | See [config.js](https://github.com/WeeJeWel/wg-easy/blob/master/src/config.js#L27) for the default value. |
| `WG_PRE_DOWN` | `...` | - | See [config.js](https://github.com/Gyarbij/wireui/blob/master/src/config.js#L27) for the default value. |
| `WG_POST_DOWN` | `...` | `iptables ...` | See [config.js](https://github.com/WeeJeWel/wg-easy/blob/master/src/config.js#L28) for the default value. |
| `WG_POST_DOWN` | `...` | `iptables ...` | See [config.js](https://github.com/Gyarbij/wireui/blob/master/src/config.js#L28) for the default value. |
> If you change `WG_PORT`, make sure to also change the exposed port.
> If you change `WG_PORT`, make sure to also change the exposed port.
@ -101,9 +100,9 @@ These options can be configured by setting environment variables using `-e KEY="
To update to the latest version, simply run:
To update to the latest version, simply run:
```bash
```bash
docker stop wg-easy
docker stop wireui
docker rm wg-easy
docker rm wireui
docker pull weejewel/wg-easy
docker pull gyarbij/wireui
```
```
And then run the `docker run -d \ ...` command above again.
And then run the `docker run -d \ ...` command above again.