-
-
Notifications
You must be signed in to change notification settings - Fork 437
Allow to specify a list of names as PEERS and add ALLOWEDIPS environment variable #59
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
Conversation
|
It seems that the greeting github action is failing and it is a known problem. To fix that, the trigger has to be changed to |
|
This is fixed in master. If you rebase or merge from our master it should pass. |
|
@cristiangauma Thanks for the PR and the detailed description. At first glance, it looks good. But we'll have to do quite a bit of testing before merge since the PR touches on a lot of moving parts. |
|
@cristiangauma I just dug a little deeper. My only concern is the way peer IPs are assigned. When using a single number for PEERS, it is pretty much hardcoded where peer X has last octet set to "peer X +1" and that never changes. But when PEERS is set to an array, peer X has last octet set to "array[X] + 2" and unfortunately, if the user adds a new entry to the beginning of the array, it will change the peer IP for all existing peers, shifting them up by one, and will invalidate all peer confs currently used, breaking existing client connections. It would require the user to update the peer/client confs on all devices. |
|
@aptalca it should be fixed now. Now each time a Peer is added, then it will iterate within this range I've tested moving peers between the list, deleting configs so the IP is reused, adding peers anywhere... and as far as I've been testing it, we won't have any problem with the IP assignment. |
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
Thanks so much for this PR. It seems to work great (except for the |
We welcome all PR’s though this doesn’t guarantee it will be accepted.
Description:
This PR add the next features to this image:
PEERSenvironment variable while keeping compatibility with the old way of defining peers with a simple integer. Also, if someone is using an old peer but wants to start to use the list of strings feature, it can be added to the list too. For instance:PEERS=myPC,myPhone,myTablet,2ALLOWEDIPSenvironment variable so the peers configuration will be limited to the values passed to that variable. The default value is the one that already existed before in thepeers.conftemplate.[Peer]sections inwg0.conf, so it will be easier to understant which peers are configured and where.Benefits of this PR and context:
ALLOWEDIPSenvironment variables.How Has This Been Tested?
The following tests were done manually (and worked as expected) in my local environment:
PEERSvariable directly.PEERSenvironment variable.PEERSand the new way. For instance:PEERS=myPC,myPhone,myTablet,2ALLOWEDIPSenvironment variable.Breaking changes
One template has to be deleted in order to create the new peers if the user start to use a list of strings in the
PEERSenvironment variable. The file that has to be deleted is:/config/templates/peer.confSource / References: