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

VPN getting disconnected and OpenVPNService getting ended after sometime #1778

Open
saadaq79 opened this issue Dec 23, 2024 · 3 comments
Open

Comments

@saadaq79
Copy link

I want to keep the vpn and service running for more than days. Boot up is handled by the open vpn service but after one day vpn service gets terminated. I have written work manager to periodically monitor OpenVPNService but it doesnt restarts. It starts but some how management thread is null and then it ends service.
Note that I have not written any server side pinging mechanism. So I want to stick with android solution. Let me know if im going or thinking in right direction. Also provide solutions to keep vpn connected no matter what and if gets terminated by OS then it should open again and make vpn connected. Thanks

@schwabe
Copy link
Owner

schwabe commented Dec 23, 2024

The app already has mechansim to ensure that it stays connected. What the log of the app sya?

@saadaq79
Copy link
Author

saadaq79 commented Dec 24, 2024

According to our logs, the service restarted by work manager but it didn't survive and ended up immediately. So the vpn stayed disconnected and the service ended as well. What we are trying is to revive the service of OpenVPN by monitoring with work manager periodically. Work manager r
uns according to logs, service also starts and it shows notification OpenVPN along with no process running but it gets in the management thread check which is always null and eventually service ends. For reference im attaching vpn logs here and notification reference image here
logcache.txt
vpn_disconnect

@saadaq79
Copy link
Author

Can we achieve always on feature without navigating to Android System UI? It works for always on feature but we need to enable it by default for open vpn app.

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

No branches or pull requests

2 participants