zaneschepke / wgtunnel

An alternative Android client app for WireGuard VPN

Home Page:https://zaneschepke.com/wgtunnel-docs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[FEATURE] - Improve handling of location services changes while auto-tunnel is enabled

zaneschepke opened this issue · comments

Context
In my opinion that is not enough. What about users that disable location services in Android settings after enabling auto-tunneling with (trusted) wifi? Without any hint, the wifi filter stops working then, which is unexpected and you will get reports/issues again. ;)
I think that this scenario is not that rare. Users temporarily disable location services and sometimes they even forget to enable it again. As auto-tunnel is a core feature of wgtunnel and users rely on that feature, they better get informed about unexpected situations.

I think the following steps would help usability-wise:

Add a hint to the "Add trusted wifi name" input, for example: "Disabling the tunnel for trusted wifi connections only works while location services are enabled in the Android settings. The tunnel stays active otherwise and you have to disable the tunnel manually for trusted wifi connections."
Optionally add a status info (for example "Location services are currently enabled" + green light / "Locations services are currently disabled" + red light).
While auto-tunneling (with wifi) is enabled, listen for MODE_CHANGED_ACTION. When location services get disabled, inform the user on every wifi connection with a notification that wgtunnel enables the tunnel regardless of entered trusted wifis because it can't access wifi information with location services disabled.
Add an option "Disable the tunnel for the current wifi connection" to the notification, so that the user can easily disable the tunnel if the current wifi is actually trusted. Enable the tunnel again when onCapabilitiesChanged gets called.
This way, users stay informed about the current situation and are enabled to correct the behaviour of wgtunnel. They can even suppress the notifications if they don't fit to their personal user-case.