-
Notifications
You must be signed in to change notification settings - Fork 46
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
Temporary network connectivity problems cause permanent disconnects for OpenVPN #236
Comments
Hmm, I think the best option would be to set the default to 3 or so (or the value in the .ovpn config), so it doesn't get stuck forever in other circumstances, and then add an argument so it can be set by the user. And also check when the process has died to restart as you mention (and report a warning). I'm not sure about killing the user's process as it'd be a pain if you have something that needs to save progress, etc. - as long as the killswitch works it won't have network connectivity when it drops anyway. This means we need another thread to check that openvpn is still running or not, but this is not a bad thing since we will need this anyway to support the port forwarding in ProtonVPN (for natpmpc) - https://protonvpn.com/support/port-forwarding-manual-setup/ One hassle might be if it connects to a different remote the second time, so the killswitch firewall rules have to be updated. |
To make sure I understand what you mean, let me summarize the behavior:
And as for the ovpn process death:
|
Yeah, it looks good, it might be better to check the PID status rather than tailing the log, but it depends a bit on how OpenVPN terminates exactly. |
Was anything implemented for this? Checking the status of openvpn after my internet had a wobble in order to reconnect the vpn would be wonderful |
Nope, I'm still running a local fork of vopono that removes the hardcoded argument, and haven't had time to implement the above proposal. You're welcome to try and implement it if you have time :) |
Hi! Thanks for maintaining vopono, it's incredibly simple to get working and super useful.
I've been having an issue where after a temporary connectivity loss to an OpenVPN server resolves, applications remain disconnected.
What appears to happen is that OpenVPN hits the connect-retry-max hardcoded to 1 by vopono and then gives up retrying. The
openvpn
process then exits, and is left "defunct" while vopono waits for the exec'd process to finish. The exec'd process is tolerant of connectivity loss and stays running, but will never be able to reconnect because theopenvpn
process isn't alive to carry traffic. I have to resolve this state manually by noticing the disconnect and stopping the exec'd process before using vopono to start it again.I tried to work around the issue by changing the
.ovpn
to add aconnect-retry-max
value, but it appears that the command-line argument takes precedence. Maybe there's a way around it; I found some documentation online that made the precedence sound complicated but I wasn't able to get it to work.I confirmed that removing the hardcoded command-line argument fixed my problem by building vopono from source, so that is the workaround i'll be using for the time being. Thank you for the
install.sh
which works perfectly on the first try!I'm not sure how best to fix this, but i'll float a few ideas:
--enable-infinite-retries
to vopono which removes the--connect-retry-max
command-line argument from the openvpn invocation--connect-retry-max
if there is no explicitconnect-retry-max
in the.ovpn
.openvpn
process to exit and restart it with the same settingsopenvpn
process to exit and then signal the exec'd process to shut down cleanly--connect-retry-max
) and a second time for the actual run (without--connect-retry-max
).I'd be willing to contribute one of these fixes if you give me some indication of which is best for the tool overall. Thanks!
The text was updated successfully, but these errors were encountered: