Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script to rename config files and generate QR configs #23

Open
MikealSouth opened this issue Aug 1, 2024 · 2 comments
Open

Script to rename config files and generate QR configs #23

MikealSouth opened this issue Aug 1, 2024 · 2 comments

Comments

@MikealSouth
Copy link

MikealSouth commented Aug 1, 2024

/Hi, I couldn't use the configfiles that this script produces as the filenames are longer then the 16 characters that wireguard supports out off the bag.
So I wrote/hacked-up this script that will rename the configs. Someone might find it useful.

#!/bin/bash
# pia-wg config file as parameter

file=$1
ip=`grep Endpoint $file | cut -d"=" -f2 | cut -d ":" -f1 | xargs `
#echo "ip:"$ip
hex=`gethostip -x $ip | tr '[:upper:]' '[:lower:]'`
#echo "hex:"$hex
mv $file "pia_"$hex".conf"
qrencode -t "png" -o "pia_"$hex".png" -r "pia_"$hex".conf"


@1aTa
Copy link

1aTa commented Aug 1, 2024

Would suggest using this fork which has this feature plus a few more: https://github.com/kchiem/pia-wg

@MikealSouth
Copy link
Author

Would suggest using this fork which has this feature plus a few more: https://github.com/kchiem/pia-wg

This is fantastic, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants