Run this code for adding a new peer to your WireGuard server.
First, you need to install "QRencode".
sudo apt-get install qrencode
Then, use the git to clone this repository.
git clone https://github.com/Mahyar24/wg-automation && cd wg-automation;
FIRST, FILL THE PLACEHOLDERS IN THE main.py:23:0
FILE FOR CUSTOMIZING YOUR URI AND PORT! then,
sudo python3.9 main.py
This command will ask you for the peer's name, and after that, it will make a directory with the same name, which includes both the .conf
file and QR-code picture.
P.S: You must have superuser access to run this program. Compatible with python3.9+.
Pull requests are welcome. Please open an issue first to discuss what you would like to change for significant changes.
Contact me: [email protected] :)