Simple WireGuard Access Server
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
lalanza808 493e7309f7 use "w" instead of "uptime" 4 years ago
bin fix var default 4 years ago
etc add fancy js and qr generation instead of rust 4 years ago
src use "w" instead of "uptime" 4 years ago
static update static and javascript 4 years ago
templates use "w" instead of "uptime" 4 years ago
util updating systemctl service 4 years ago
.gitignore add fancy js and qr generation instead of rust 4 years ago
Brewfile adding brewfile and update instructions on use 4 years ago
Cargo.toml +serde, -qrcode-generator 4 years ago
LICENSE Initial commit 4 years ago
README.md update static and javascript 4 years ago

README.md

wgas-rs

Simple WireGuard Access Server

Installation

The application depends on the WireGuard package for the wg and wg-quick command line tools:

# Ubuntu
sudo add-apt-repository ppa:wireguard/wireguard -y
sudo apt install wireguard -y

# macOS
brew bundle

This is a Rust application so install via rustup:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Install the repo:

git clone https://github.com/lalanza808/wgas-rs && cd wgas-rs
rustup override set nightly
cargo run

From there set environment variables:

export WGAS_ENDPOINT=127.0.0.1
export WGAS_SUDO=false  # set to true if deploying on live VPN instance
export WGAS_DNS=1.1.1.1 # set to dns you control if possible
export WGAS_ROUTE=0.0.0.0/0
export WGAS_INTERFACE=wg0
export WGAS_NETWORK=10.66.66.1/24
export WGAS_PORT=51820
export WGAS_PUBKEY=$(wg genkey | wg pubkey)

and use cargo to run the dev server or build production release binaries:

cargo run
cargo build --release # outputs to ./target/release/<package_name>