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

Better error message when Wireguard authentication fails (e.g. expired user) #76

Open
jamesmcm opened this issue Apr 15, 2021 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@jamesmcm
Copy link
Owner

For OpenVPN we'll usually get an actual authentication error, but Wireguard just silently fails to connect (with Mullvad)

@jamesmcm jamesmcm added enhancement New feature or request good first issue Good for newcomers labels Apr 15, 2021
@hasanhaja
Copy link

Hi, I'm new to the code base and I don't have any experience contributing to open source but I want to start and offer my help. Would you be able to give me some pointers on how I can get familiar with the code base to tackle this issue?

@jamesmcm
Copy link
Owner Author

Thanks, there are two approaches, and it'd be best to implement both eventually.

The main one would be to check if wireguard-tools throws any error if we fail to authenticate correctly (i.e. using an expired Mullvad account but with valid keys, this might also depend on the VPN provider too). I.e. when we run wg setconf here: https://github.com/jamesmcm/vopono/blob/master/src/wireguard.rs#L85-L87

Does that ever return any additional information we can use? I'd check it by running it manually once and seeing what output we get (error messages or exit code). Unfortunately I just renewed my Mullvad account so I can't do it right now.

Then the other approach would be to just check that our connection is working once we finish all the steps, e.g. here - https://github.com/jamesmcm/vopono/blob/master/src/exec.rs#L371 after running the PostUp script. This is basically issue #25 - it's not quite as useful in this case since a failed connection could also be due to firewall issues, etc. but at least it would serve as some sort of warning.

@hasanhaja
Copy link

Sorry for taking so long to get back to you with any update, but I won't be able to actively work on this issue at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants