Wg Config Save

a simple wireguard vpn user management script

Project README

This is a simple wireguard VPN user management script using on VPN server. Client config file and qrcode are generated.

dependency

  • wireguard
  • qrencode

config

The wireguard default config directory is /etc/wireguard.

The script config file is wg.def, create and edit it according to wg.def.sample.

Copy client.conf.tpl.sample to client.conf.tpl and copy server.conf.tpl.sample to server.conf.tpl.

Edit tpl if you want to change some config.

You can generate the public key and private key with command wg genkey | tee prikey | wg pubkey > pubkey.

usage

Running as root.

init wireguard server

./user.sh -i

add a user

./user.sh -a alice

This will generate a client conf and qrcode in users directory which name is alice and add alice to the wg server config.

This will disable default route change. Route traffic Manually.

./user.sh -a alice -r

client will route all traffic to server.

delete a user

./user.sh -d alice

This will delete the alice directory and delete alice from the wg server config.

clear all

./user.sh -c

Delete all users before clear.

Open Source Agenda is not affiliated with "Wg Config" Project. README Source: faicker/wg-config
Stars
66
Open Issues
1
Last Commit
4 years ago
Repository

Open Source Agenda Badge

Open Source Agenda Rating