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 17629096e4 adding brewfile and update instructions on use 4 years ago
bin pass env vars when sudoing 4 years ago
src tightening up naming conventions and template content - beefing up home page 4 years ago
static add wg logo and tweak css 4 years ago
templates tightening up naming conventions and template content - beefing up home page 4 years ago
util add new env vars to service 4 years ago
.gitignore adding brewfile and update instructions on use 4 years ago
Brewfile adding brewfile and update instructions on use 4 years ago
Cargo.toml remove cli args and use env vars 4 years ago
LICENSE Initial commit 4 years ago
README.md adding brewfile and update instructions on use 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_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>