Open AshkanRafiee opened 9 months ago
The problem still exists.. I hope the necessary follow-up will be done next update
I faced the same issue using Hiddify Next on Ubuntu. At first, I thought it was related to the power management of my LapTop that puts my WiFi network adapter into standby mode, and then relatively the VPN goes dead, but even after turning off the power management on my WiFi network adapter, the VPN issue remains. I have to disconnect the VPN, disconnect my WiFi, reconnect the WiFi, and reconnect the VPN every time. It's strange because when I'm listening to Spotify it gets disconnected too, it should be downloading some data to play the music, so it's not related to idling, right?
Search first
What Happened?
The app's VPN connection automatically dies after a few minutes of inactivity. Users must manually disable and re-enable the VPN to restore connectivity. This issue affects the user experience by requiring frequent manual intervention to maintain a stable VPN connection.
Reproduce the Bug
Expected Behavior
The VPN connection should remain active and stable, even during periods of inactivity, until the user decides to disconnect manually.
Version
v0.15.4
Platform/OS
Android
Additional Context
To address the issue of the VPN connection dying after minutes of not using it, you might need to implement or adjust several aspects of your application. Here are some suggestions based on the potential areas identified:
1. Enhancing VPN Service Persistence
2. Improving Network Monitoring and Handling
3. Service Binding Robustness
4. Adapting to Power Management
val intent = Intent(Settings.ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS) startActivity(intent)
5. Settings and Configuration Management
Code Changes
Here are some code snippets to illustrate the changes:
Foreground Service Notification Setup in VPNService.kt
Network Change Handling in DefaultNetworkMonitor.kt
Implementing these changes should help in making the VPN service more resilient to disconnections and system interventions.
Relevant log output
No response
Are you willing to submit a PR? If you know how to fix the bug.