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

feat: Enhance offline connection handling #423

Closed
wants to merge 1 commit into from

Conversation

ShadowZagrosDev
Copy link
Contributor

Improve connection handling when user goes offline

  • Enable disconnect option when user is offline but VPN is connected
  • Add commented code for automatic disconnect on connection loss

Currently, the connection switch is disabled when offline, even if the VPN is connected. This change allows users to disconnect manually when they lose internet connection while the VPN is active.

A commented line for auto-disconnect on connection loss is currently disabled to avoid kill-switch-like behavior. When enabled, it automatically disconnects the VPN, which won't reconnect when internet is restored. Consider implementing this as a configurable option in the app settings, allowing users to choose whether they want automatic disconnection or to stay connected for when internet returns.

@ShadowZagrosDev
Copy link
Contributor Author

ShadowZagrosDev commented Jul 20, 2024

I've implemented the optional automatic disconnection feature as discussed. Here's a screenshot of the new setting in the app:

Screenshot 1403-04-30 at 09 14 11

This addition allows users to choose whether they want the VPN to automatically disconnect when internet connection is lost.

If you'd prefer, I can submit these changes as a new commit. Let me know if you'd like me to proceed with that or if you have any other feedback or suggestions.

@ircfspace
Copy link
Collaborator

Thank you for your contribution.

When a user is using mobile data via Hotspot, their internet connection may frequently disconnect and reconnect momentarily. However, the Warp-plus connection remains stable without the need to reconnect. This also applies when the OS is in Sleep mode for extended periods, and the connection generally does not drop. The connection only actually disconnects when Warp-plus notifies Oblivion Desktop that the connection has been lost, triggering the wp-end method.
Therefore, unfortunately, this feature is not useful.

However, we recommend that you participate in the following issue related to the kill switch, if you are interested: #176

@ircfspace ircfspace closed this Jul 21, 2024
@ShadowZagrosDev
Copy link
Contributor Author

@ircfspace
Thank you for your feedback. I understand your concerns about connection drops and potential IP leaks. While I appreciate the current kill-switch-like behavior, there's an issue I'd like to address: When the app is running and connected, but internet connection is lost, I can't turn it off using the switch. Closing the app leaves the SOCKS proxy active, requiring manual deactivation in system settings. That's why I added the !isConnected condition - to allow disconnection via the switch when internet is lost.
Regarding wp-end triggering, as shown in my previous screenshot, I made this an optional user setting. I didn't send the code initially to discuss the concept first. Ultimately, the decision is yours.
On another note, I noticed "SpeedTest" in your roadmap. If you're considering something like speedtest.net, I've developed a component that performs tests via Cloudflare. I've attached a screenshot of the component (showing test results, with some post-screenshot improvements). If this aligns with your plans, I'd be happy to submit it as a new PR.
Screenshot-speedtest

Thank you for your efforts in promoting free internet access.

@ircfspace
Copy link
Collaborator

ircfspace commented Jul 21, 2024

@ShadowZagrosDev Do you mean that when you are connected and go offline, it's not possible to disconnect either from the System Tray or from the main app page? If that's what you're referring to, we can review and fix this issue in pages/Landing.

Regarding SpeedTest, yes, we have something similar to what you've shown in the screenshot in mind, but is the data from your feature as reliable as SpeedTest?
Of course, we don't want this feature to be in the form of an iFrame.

Additionally, can it include issue #132 to display details alongside the IP and ping (after connection)?

@ShadowZagrosDev
Copy link
Contributor Author

@ircfspace I hadn't checked the System Tray option before, but I've verified now that disconnection is possible there. I had only tested the switch, though it would be beneficial if disconnection could be done through that as well.
Regarding SpeedTest reliability, as mentioned, it uses Cloudflare. You can see an example at speed.cloudflare.com. To clarify, this isn't an iFrame embedding the site's test page. It's a custom component specifically for the application.
Concerning your last point (issue #132), does this refer to displaying real-time speed and other specifications? If so, that's not the current functionality. This component has a test initiated by a 'start' button, which then displays the results shown in the screenshot after completion. It's similar to Cloudflare's speed test(or speedtest.net) and can be performed at any time, whether the application is connected or not.

@ircfspace
Copy link
Collaborator

@ShadowZagrosDev
Regarding fixing the switch issue, I've assigned myself a task and will try to resolve it soon.

Yes, the intention was to display real-time speed.
However, the feature you mentioned could also be useful and could be linked in the Navigation drawer.
If possible, please create a PR and send it to me, so I can review and make any necessary UI adjustments.

Thanks in advance.

@ShadowZagrosDev
Copy link
Contributor Author

@ircfspace
Regarding the switch issue, you can simply add !isConnected to the existing condition in the onChange method, as shown in the commit within this PR(https://github.com/bepass-org/oblivion-desktop/pull/423/files). This should resolve the problem without requiring additional work.
As for the SpeedTest component, I've already included access to it in the drawer. I'll submit the final version in a new PR for your review and any necessary adjustments.
Thank you for taking the time to engage in this discussion. Your feedback and collaboration are much appreciated.

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

Successfully merging this pull request may close these issues.

2 participants