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

FR: Improve by checking for WLAN SSID before requesting #1

Closed
Zocker1999NET opened this issue Aug 22, 2022 · 2 comments · Fixed by #2
Closed

FR: Improve by checking for WLAN SSID before requesting #1

Zocker1999NET opened this issue Aug 22, 2022 · 2 comments · Fixed by #2
Labels
enhancement New feature or request

Comments

@Zocker1999NET
Copy link

Zocker1999NET commented Aug 22, 2022

Hey, great script you implemented here for waybar. Here's a little feature I thought about adding to this little script:

I think checking the WLAN SSID before sending requests to the server could improve this little script even more. This should decrease resource usage for most of the time (e.g. when not using an ICE) and would also increase privacy because not all users would send requests to the public DB server (see here when not using an IC/ICE, it shows "Your device cannot reach the portal" and explains how to fix this.).

I would implement this by adding another flag (to make this optional) and check NetworkManager (using D-Bus) for the both common WLAN SSIDs the ICE WiFi is using "WIFIonICE" or "WIFI@DB". Based on the check, the script could also interpret if a VPN is blocking the access to the ICE Portal and could inform the user based on this.

If you or anyone else is faster than me to implement this on their own, please do so. If not, I hopefully will find some time to implement it on my own (this issue shall be a reminder to myself as well).

@e1mo
Copy link
Owner

e1mo commented Aug 23, 2022

Hey, I'm pleasantly surprised that people find this useful! Thanks for your FR, the WiFi detection has also been on my mind for some time. Just to collect some requirements(ish) / Ideas:

I'd prefer if it works with both wpa_supplicant and iwd. It would also be nice to have it configurable via an CLI flag. So at least enabling / disabling the wifi checks or even adding custom networks that are also considered IC(E) (e.g. if you use your phone / a portable hotspot as a uplink which itself connects to the IC(E) wifi).

I do have some time on my hand right now to dive into it and give it a try (however I'm unable to try it in an ICE right now).

@e1mo e1mo added the enhancement New feature or request label Aug 23, 2022
e1mo added a commit that referenced this issue Aug 23, 2022
@e1mo
Copy link
Owner

e1mo commented Aug 23, 2022

Please feel free to test the code in #2 and see if that works for you.

Regarding the VPN detection: Depending on how dirty we want to do it, it could be like an extra 2 lines in that PR. Or we could take the really fancy route and detect if the iceportals IP would be routed via the interface connected to WIFI@DB / WIFIonICE. And only if that would not be the case, assume a VPN is messing with our connection.

@e1mo e1mo closed this as completed in 13b297c Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants