No description
  • C 90.5%
  • Shell 8.4%
  • Makefile 1.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-08-24 14:16:35 +08:00
.github/workflows docs: update readme 2026-08-24 14:16:35 +08:00
ext perf: use boringssl for chacha20poly1305 on x86_64/aarch64 2026-08-22 15:15:41 +08:00
src perf: use boringssl for chacha20poly1305 on x86_64/aarch64 2026-08-22 15:15:41 +08:00
.clang-format feat: init 2026-08-08 10:45:32 +08:00
.gitignore feat: init 2026-08-08 10:45:32 +08:00
.gitmodules perf: use boringssl for chacha20poly1305 on x86_64/aarch64 2026-08-22 15:15:41 +08:00
install.sh docs: update readme 2026-08-24 14:16:35 +08:00
LICENSE perf: use boringssl for chacha20poly1305 on x86_64/aarch64 2026-08-22 15:15:41 +08:00
Makefile perf: use boringssl for chacha20poly1305 on x86_64/aarch64 2026-08-22 15:15:41 +08:00
README.md docs: update readme 2026-08-24 14:16:35 +08:00

cwg

A userspace implementation of AmneziaWG and WireGuard

Quick Start

curl -fsSL https://raw.githubusercontent.com/undef-i/cwg/master/install.sh | bash

To run it in a non-interactive terminal:

curl -fsSL https://raw.githubusercontent.com/undef-i/cwg/master/install.sh |
  bash -s -- --non-interactive [--install-tools/--skip-tools] \
  [--prebuilt/--source] [--link/--no-link]

To uninstall:

curl -fsSL https://raw.githubusercontent.com/undef-i/cwg/master/install.sh | bash -s -- --uninstall

Install

Use prebuilt binary

curl -fsSL "https://github.com/undef-i/cwg/releases/latest/download/cwg-linux-$(uname -m).tar.gz" |
  tar -xz -C /usr/local/bin
ln -sf cwg /usr/local/bin/wireguard-go
ln -sf cwg /usr/local/bin/amneziawg-go

Build from source

git clone --recurse-submodules https://github.com/undef-i/cwg
cd cwg && make
install -m 0755 build/cwg /usr/local/bin/cwg
ln -sf cwg /usr/local/bin/wireguard-go
ln -sf cwg /usr/local/bin/amneziawg-go

Usage

Run directly with a mode:

cwg --wg wg0
cwg --awg awg0

With the installed links you can also run them directly as wireguard-go or amneziawg-go:

sudo wireguard-go wg0
sudo amneziawg-go awg0

cwg --wg or wireguard-go serves the WireGuard UAPI at /var/run/wireguard/wg0.sock. cwg --awg or amneziawg-go serves the AmneziaWG UAPI at /var/run/amneziawg/awg0.sock.

Pass -f or --foreground to run directly without forking.

License

GNU General Public License, version 3.