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

[BUG] - Excessive auto-tunnel location checks on Wi-Fi #557

Open
iskunk opened this issue Jan 21, 2025 · 6 comments
Open

[BUG] - Excessive auto-tunnel location checks on Wi-Fi #557

iskunk opened this issue Jan 21, 2025 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@iskunk
Copy link

iskunk commented Jan 21, 2025

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

  • Device: Motorola
  • Android Version: 13
  • App Version 3.6.6
  • Backend: Userspace

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.

@iskunk iskunk added the bug Something isn't working label Jan 21, 2025
@schafskopf
Copy link

Same for me, without wildcard.

@i7andy
Copy link

i7andy commented Jan 22, 2025

Same with me, I must get a location check every minute or so.

@zaneschepke
Copy link
Owner

zaneschepke commented Jan 22, 2025

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.

@iskunk
Copy link
Author

iskunk commented Jan 22, 2025

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)

@dmsimard
Copy link

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.

Image

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.

@rhoot
Copy link

rhoot commented Feb 15, 2025

The old way of doing this type of network change monitoring via broadcast receiver is deprecated.

Please excuse if I'm missing something (I'm not an Android programmer), but are you talking about SUPPLICANT_CONNECTION_CHANGE_ACTION being deprecated? If so, WIFI_STATE_CHANGED_ACTION does not appear to be deprecated. Would that not work?

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.

@zaneschepke zaneschepke reopened this Feb 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants