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

Allow custom client options. #67

Closed
wants to merge 1 commit into from
Closed

Conversation

ypid
Copy link
Contributor

@ypid ypid commented Aug 28, 2015

In case you want to add or change certain client options you can use the third parameter to specify them. This can for example be used in a multi-server setup to write all remotes in the client’s configuration and have clients choose which server to connect to. The following command can be used to achieve this:

docker run --rm -it --volumes-from $OVPN_DATA --volume /tmp/openvpn_clients:/etc/openvpn/clients kylemanna/openvpn ovpn_getclient $cn combined-save "remote vpn.example.com;remote vpn.example.net;remote-random"

Note that by specifying one or more remote parameter manually, the default remote entry is omitted. This was done to allow you to choose a order for the remotes because OpenVPN will try the remotes in the specified order unless the "remote-random" option set.

In case you want to add or change certain client options you can use the third parameter to specify them. This can for example be used in a multi-server setup to write all remotes in the client’s configuration and have them choose which server to connect to. The following command can be used to achieve this:

    docker run --rm -it --volumes-from $OVPN_DATA --volume /tmp/openvpn_clients:/etc/openvpn/clients kylemanna/openvpn ovpn_getclient $cn combined-save "remote vpn.example.com;remote vpn.example.net;remote-random"

Note that by specifying one or more remote parameter manually, the default remote entry is omitted. This was done to allow you to choose a order for the remotes because OpenVPN will try the remotes in the specified order unless the "remote-random" option set.
@kylemanna
Copy link
Owner

This doesn't scale well (scaling with more and more long tail tweaks) and complicates the scripts when the for the vast majority of users don't use these features. Perhaps there needs to be a path for more advanced config that uses another script?

@ypid
Copy link
Contributor Author

ypid commented Sep 8, 2015

Duplicating the ovpn_getclient would also make maintenance more difficult. Not sure if this is the way to go. I tired to keep this feature as generic as possible so that users can do with this what they need to configure. The normal user does not need to care about this. Just omit the parameter and use it as before.

@kylemanna kylemanna closed this Sep 29, 2015
@ypid
Copy link
Contributor Author

ypid commented Sep 29, 2015

Maybe leave the PR open so that others can still find it if needed? I think it has it’s use cases …

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

Successfully merging this pull request may close these issues.

None yet

2 participants