• This repository has been archived on 25/Apr/2023
  • Stars
    star
    1,468
  • Rank 32,033 (Top 0.7 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created over 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

WireGuard Web UI for self-serve client configurations, with optional auth.

WG UI

Build Status Embark Contributor Covenant

A basic, self-contained management service for WireGuard with a self-serve web UI.
Current stable release: v1.3.0

Features

  • Self-serve and web based
  • QR-Code for convenient mobile client configuration
  • Optional multi-user support behind an authenticating proxy
  • Simple authentication support
  • Zero external dependencies - just a single binary using the wireguard kernel module
  • Binary and container deployment

Screenshot

Running

The easiest way to run wg-ui is using the container image. To test it, run:

docker run --rm -it --privileged --entrypoint "/wireguard-ui" -v /tmp/wireguard-ui:/data -p 8080:8080 embarkstudios/wireguard-ui:latest --data-dir=/data --log-level=debug

When running in production, we recommend using the latest release as opposed to latest.

Important to know is that you need to have WireGuard installed on the machine in order for this to work, as this is 'just' a UI to manage WireGuard configs.

Configuration

You can configure wg-ui using commandline flags or environment variables. To see all available flags run:

docker run --rm -it embarkstudios/wireguard-ui:latest -h
./wireguard-ui -h

You can alternatively specify each flag through an environment variable of the form WIREGUARD_UI_<FLAG_NAME>, where <FLAG_NAME> is replaced with the flag name transformed to CONSTANT_CASE, e.g.

docker run --rm -it embarkstudios/wireguard-ui:latest --log-level=debug

and

docker run --rm -it -e WIREGUARD_UI_LOG_LEVEL=debug embarkstudios/wireguard-ui:latest

are the same.

Authentication

You can configure basic authentication using the flags/environment variables --auth-basic-user=<user> and --auth-basic-pass=<bcrypt hash> The password is a bcrypt hash that you can generate yourself using the docker container:

$ docker run -it embarkstudios/wireguard-ui:latest passwd mySecretPass
INFO[0001] Password Hash: $2a$14$D2jsPnpJixC0U0lyaGUd0OatV7QGzQ08yKV.gsmITVZgNevfZXj36

Docker images

There are two ways to run wg-ui today, you can run it with kernel module installed on your host which is the best way to do it if you want performance.

docker pull embarkstudios/wireguard-ui:latest

If you however do not have the possibility or interest in having kernel module loaded on your host, there is now a solution for that using a docker image based on wireguard-go. Keep in mind that this runs in userspace and not in kernel module.

docker pull embarkstudios/wireguard-ui:userspace

Both images are built for linux/amd64, linux/arm64 and linux/arm/v7. If you would need it for any other platform you can build wg-ui binaries with help from the documentation.

Install without Docker

You need to have WireGuard installed on the machine running wg-ui.

Unless you use the userspace version with docker you're required to have WireGuard installed on your host machine.

A few installation guides:
Ubuntu 20.04 LTS
CentOS 8
Debian 10

Go installation (Debian)

Install latest version of Go from (https://golang.org/dl/)

sudo tar -C /usr/local -xzf go$VERSION.$OS-$ARCH.tar.gz

Setup environment

Bash: ~/.bash_profile
ZSH: ~/.zshrc

export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
export GOPATH=$HOME/go

Install LTS version of nodejs for frontend.

sudo apt-get install curl software-properties-common
curl -sL https://deb.nodesource.com/setup_12.x | sudo bash -
sudo apt-get install nodejs

Fetch wg-ui

git clone https://github.com/EmbarkStudios/wg-ui.git && cd wg-ui

Build binary with ui

make build

Crosscompiling

make build-amd64
make build-armv5
make build-armv6
make build-armv7

Build step by step

make ui
make build

Developing

Start frontend server

npm install --prefix=ui
npm run --prefix=ui dev

Use frontend server when running the server

make build
sudo ./bin/wireguard-ui --log-level=debug --dev-ui-server http://localhost:5000

Contributing

We welcome community contributions to this project.

Please read our Contributor Guide for more information on how to get started.

License

Licensed under either of

at your option.

More Repositories

1

rust-gpu

πŸ‰ Making Rust a first-class language and ecosystem for GPU shaders 🚧
Rust
6,796
star
2

kajiya

πŸ’‘ Experimental real-time global illumination renderer πŸ¦€
Rust
4,753
star
3

cargo-deny

❌ Cargo plugin for linting your dependencies πŸ¦€
Rust
1,254
star
4

puffin

🐦 Friendly little instrumentation profiler for Rust πŸ¦€
Rust
973
star
5

rust-ecosystem

Rust wants & tracking for Embark πŸ¦€
Rust
843
star
6

physx-rs

🎳 Rust binding for NVIDIA PhysX πŸ¦€
Rust
646
star
7

blender-tools

🐡 Embark Addon for Blender
Python
411
star
8

cargo-about

πŸ“œ Cargo plugin to generate list of all licenses for a crate πŸ¦€
Rust
320
star
9

tryhard

πŸ’« Easily retry futures πŸ¦€
Rust
200
star
10

presser

A crate to help you copy things into raw buffers without invoking spooky action at a distance (undefined behavior).
Rust
157
star
11

crash-handling

Collection of crates to deal with crashes
Rust
135
star
12

poll-promise

A Rust promise for games and immediate mode GUIs
Rust
127
star
13

rpmalloc-rs

🐏 rpmalloc global memory allocator for Rust πŸ¦€
Rust
126
star
14

discord-sdk

An open implementation of the Discord Game SDK in Rust
Rust
108
star
15

skyhook

Simple Python communication system for DCC's and Game Engines
Python
104
star
16

spirt

SPIR-πŸ‡Ή: shader-focused IR to target, transform and translate from πŸ¦€
Rust
103
star
17

superluminal-perf-rs

πŸ”† Superluminal Performance profiler Rust API πŸ¦€
Rust
94
star
18

ash-molten

πŸŒ‹ Statically linked MoltenVK for Vulkan on Mac using Ash πŸ¦€
Rust
91
star
19

cargo-deny-action

❌ GitHub Action for cargo-deny πŸ¦€
Shell
89
star
20

cargo-fetcher

🎁 cargo plugin for quickly fetching dependencies πŸ¦€
Rust
83
star
21

mirror-mirror

πŸͺž Powerful reflection library for Rust
Rust
79
star
22

relnotes

Automatic GitHub Release Notes
Rust
77
star
23

opensource-template

🌻 Template for creating new repositories
74
star
24

tame-oauth

πŸ” Small OAuth crate that follows the sans-io approach πŸ¦€
Rust
68
star
25

tiny-bench

A tiny benchmarking library
Rust
59
star
26

k8s-buildkite-plugin

Run any buildkite build step as a Kubernetes Job
Jsonnet
49
star
27

krates

πŸ“¦ Creates graphs of crates from cargo metadata πŸ¦€
Rust
45
star
28

opensource

Open source processes, policies, and info
Rust
42
star
29

cervo

Utility wrappers for tract
Rust
40
star
30

tracing-logfmt

A logfmt formatter for tracing subscriber logs
Rust
38
star
31

tame-gcs

πŸ“‚ A small library with a limited set of Google Cloud Storage operations πŸ¦€
Rust
37
star
32

octobors

Rust program for automerging PRs based on a few rules
Rust
35
star
33

server-framework

Framework for running network services, opinions included
Rust
35
star
34

nfd2

OS native dialogs for Windows, MacOS, and Linux
Rust
32
star
35

cfg-expr

A parser and evaluator for Rust cfg() expressions. Targets as of Rust 1.58.0 are supported.
Rust
32
star
36

pdm-plugin-torch

A tool for managing torch-variants with PDM.
Python
31
star
37

opa-policies

Contains OPA Policies for Dockerfiles, Kubernetes YAMLs, Terraform, etc
Open Policy Agent
29
star
38

gsutil

Minimal gsutil replacement
Rust
27
star
39

spdx

πŸ†” Helper crate for SPDX expressions. πŸ¦€
Rust
27
star
40

tame-index

Small crate for interacting with cargo registry indices
Rust
23
star
41

fsr-rs

Rust bindings for AMD FidelityFXβ„’ Super Resolution
C
22
star
42

opensource-website

🌐 Hub for Embark's open source efforts
HTML
22
star
43

buildkite-jobify

πŸ‘· Kubekite, but in Rust, using configuration from your repos πŸ¦€
Rust
21
star
44

spirv-tools-rs

πŸ›  Wrapper crate for SPIRV-Tools πŸ¦€
C++
20
star
45

emote

Reinforcement learning library from Embark Studios
Python
19
star
46

proto-gen

A protobuf generation runner/cli using tonic build
Rust
18
star
47

rymder

Unofficial agones client SDK
Rust
17
star
48

sentry-contrib-rust

Integrates crashdump reporting with Sentry
Rust
15
star
49

tame-oidc

🧬 Small OAuth crate that follows the sans-io approach πŸ¦€
Rust
11
star
50

tame-webpurify

πŸ’© Small HTTP client for the Webpurify API following the sans-io approach πŸ¦€
Rust
9
star
51

cloud-dns

A wrapper for the Google Cloud DNS API (https://cloud.google.com/dns)
Rust
7
star
52

boh

Rust
5
star
53

tracing-ext-ffi-subscriber

Simple subscriber for forwarding tracing spans to a C or C++ profiling API.
Rust
4
star
54

server-code-exciser

A program that contains grammars and functionality to remove server only code from code bases.
C#
4
star
55

gke-accelerated-xorg-example

Example project for running remote rendering on GKE
Dockerfile
3
star
56

helix-oidc

🧬 Helix Perforce OIDC validator
Go
3
star
57

cassini

Topology-aware distributed cache
Go
2
star
58

minwin

Rust
2
star
59

container-packer-qemu

πŸ“¦ Dockerized packer with qemu
Dockerfile
1
star
60

rustc-compile-time-regress

Rust
1
star
61

missing-symbols

Rust
1
star
62

.github

Default community health files for GitHub (https://help.github.com/en/github/building-a-strong-community/creating-a-default-community-health-file-for-your-organization)
1
star
63

toml-span

Span preserving toml deserializer
Rust
1
star