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

comment in client's config file and custom path to store config files , maybe ? #20

Open
changchichung opened this issue Aug 12, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@changchichung
Copy link

now the script will generate the first client's config file like wg0-client-2.conf in root's home.
in my sceranio , I would like to rename the file to match user's name and devices
like wg0-client-eric-iphone8.conf
but if I do the rename , then next time when I generate another client , the script will not be able to determine client's ip address and then create wg0-client-2.conf again.
so if I want to use the script to keep generating config without modify client's ip address , then I will not be able to rename the config file.
then , how about add a "comment" in script's interactive process , and just add the comment into config file , so at least I can use grep to find out user's config ?

and also I think that is not proper to store config files in root's home directory , maybe it should be a customize variable ?

@rajannpatel
Copy link
Owner

You can rename wg0-client-2-conf to wg0-client*, where * can be whatever you want. Subsequent client generations will have their config filenames incrementally increased. Line 15 of setup.sh is responsible for this:

WG_CLIENT_COUNT=`expr $(ls -1q wg0-client* 2>/dev/null | wc -l) + 2`

I can look into the comment capabilities. Storing config elsewhere could be possible, but it becomes a breaking change for users, if they upgrade. It also opens up the possibility that people may scatter the config files around their system. A suitable option would be to drop them into a new directory under /etc/wireguard/clients?

@changchichung
Copy link
Author

/etc/wireguard/clients whould be great !

@rajannpatel rajannpatel added the enhancement New feature or request label Aug 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants