gluetun icon indicating copy to clipboard operation
gluetun copied to clipboard

Feature request: usage of multiple credentials

Open byteofwood opened this issue 3 years ago • 1 comments

What's the feature :monocle_face:

In the event that one account cannot be logged into, it would be nice to be able to use credentials of other alternative accounts. gluetun should try logging in with one account ~5 times and if OpenVPN returns an AUTH_FAILED error every time, it could try the next set of credentials.

Extra information and references

Maybe credentials could be passed through as comma separated environment variables:

[email protected],[email protected],[email protected]
OPENVPN_PASSWORD=password1,password2,password3

Or they could be put into a json file:

[
  {
    "username": "[email protected]",
    "password": "password1"
  },
  {
    "username": "[email protected]",
    "password": "password2"
  },
  {
    "username": "[email protected]",
    "password": "password3"
  }
]

Or CSV might make more sense for something as simple as usernames and passwords:

username,password
[email protected],password1
[email protected],password2
[email protected],password3

byteofwood avatar May 19 '22 22:05 byteofwood

Note to future myself:

  1. Add a yml configuration source
  2. Allow multiple yml files with suffix 1.yml, 2.yml, etc. to rotate on failure

That way you could even rotate with VPN providers, regions, credentials etc. instead of just credentials which seems rather limited.

That's probably gonna take a few weeks/months, since I'm quite behind on more urgent issues, but I'm not forgetting it!

qdm12 avatar May 26 '22 14:05 qdm12