A simple Python script to generate a QR code from an existing Wireguard configuration file using the qrcode Python library.
Install the qrcode Python library using pip:
pip install qrcodePipe your Wireguard configuration file to the Python script wgqr.py using cat:
cat wg.conf | python ./wgqr.pyThe QR code will be displayed in the terminal using ASCII characters. You can use this QR code to quickly import the tunnel into the Wireguard mobile app.
You can use the provided example.conf file in this repository to test the import:
cat example.conf | python ./wgqr.pyThis is only a sample file and does not serve any other purpose.