1
0
mirror of https://github.com/faicker/wg-config.git synced 2020-11-18 19:53:49 -08:00
faicker.mo b7f9d6e309 Initial commit
Signed-off-by: faicker.mo <faicker.mo@gmail.com>
2018-12-04 18:35:32 +08:00
2018-12-04 18:35:32 +08:00
2018-12-04 18:35:32 +08:00
2018-12-04 18:35:32 +08:00
2018-12-04 18:35:32 +08:00
2018-12-04 18:35:32 +08:00

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. You can generate the public key and private key with command wg genkey | tee > prikey | wg pubkey > pubkey.

usage

Running as root.

start wireguard

wg-quick up wg0

add a user

./user.sh -a alice

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

delete a user

./user.sh -d alice

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

clear all

./user.sh -c
Description
No description provided
Readme 58 KiB
Languages
Shell 100%