-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
[BUG] - Excessive auto-tunnel location checks on Wi-Fi #557
Comments
Same for me, without wildcard. |
Same with me, I must get a location check every minute or so. |
Hello! I've done all I can to optimize this so we only query the wifi name when we detect that the wifi network has changed. Despite these changes, this location checking persists. Unfortunately, I don't think there is much else I can do at this point to reduce this. The old way of doing this type of network change monitoring via broadcast receiver is deprecated. Android's APIs really are a mess. :( We can continue this conversation, but I'll mark this as closed for now. Unfortunately, I don't think there is anything actionable for this issue. I'll reopen if we come up with something. One note: If your device is rooted, we have a feature that bypasses the need for this location permissions and we get the wifi name via shell. |
Thanks for considering this, @zaneschepke. I think I'll need to forego the trusted-Wi-Fi feature, then. Excluding local IP ranges from the tunnel already avoids the issue of connecting to local resources, but as I also use a VPN on my home network, it was nice to avoid double-stacking the home + phone VPNs. (Greatly appreciate your work on this app! I don't fully understand the brouhaha with the official WG app in F-Droid, but I'm glad that a well-maintained alternative is available) |
I don't have a suggestion or a workaround but chiming in to say that I am also seeing the "an app is using the location permission" green notification every minute or so on GrapheneOS which isn't rooted. I hope we can eventually find a way that doesn't require the location permission. This app is otherwise fantastic AND open source, great work. Thanks. |
Please excuse if I'm missing something (I'm not an Android programmer), but are you talking about If so I think it'd be perfectly acceptable to use the current location service path to get the SSID in response to that broadcast. Then the green indicator would only show up when the wifi state changes. |
As a workaround for now on grapheneOS, I chose to hide the location indicator system-wide on my phone. It has no use to me personally. I don't give location permissions to any app that doesn't strictly need it anyway, which at the moment is literally just two FOSS apps. Having it constantly pop up (not just by wg-tunnel) makes it pretty useless either way as you become used to just ignoring it. You can always check the Location section in Settings to see which apps have used your location and how long ago. Rumor has it that the setting resets itself occasionally though, so I guess we'll see. For anyone that feels the same, it can be toggled in Developer options. Just know that you will no longer get notified any time an app uses your location, so you won't know if a stalker or malware has started tracking you. Expand for instructions.
If you don't see the location indicator toggle you may have to make it visible from a computer with android tools installed.
Now you should see the Status bar location indicator toggle in Developer options (you may have to leave the page and go back). |
So, I looked a lot into this and the broadcast receiver still works but it no longer passes the wifi ssid in the extras, no matter what permissions you have accepted. It is a bit slow as well. I found a different solution where I use the new network callback api, but then (instead of passing the required flag to include the wifi information which constantly queries location) I query the old wifiManager api to get the ssid synchronously. This is also deprecated, but still works (for now). It is likely this will not work in future version of android (possibly Android 16), but we can run with this for now. These changes will be available soon in the nightly version to test. I'll share a link soon. |
Please give this a shot and see if it helps: https://github.com/zaneschepke/wgtunnel/releases/tag/nightly Also, please help me make sure it works reliably as this was a pretty fundamental change. Thanks! |
After re-enabling the system location indicator the nightly doesn't appear to help. It still shows up every 10-20 seconds. |
Describe the bug
I am using auto-tunneling on Wi-Fi and mobile data, with a trusted Wi-Fi SSID.
When I am on a Wi-Fi connection (home or foreign) and using an application that accesses the network, the green location-services indicator at the top-right of the screen pops up repeatedly despite the Wi-Fi connection remaining stable. This is especially noticeable when I browse the catalog in the official F-Droid app.
Smartphone
To Reproduce
(see description)
Expected behavior
The location check occurs only when a Wi-Fi connection is initiated.
Additional context
The trusted SSID is matched using a wildcard.
The text was updated successfully, but these errors were encountered: