Repository navigation
desktop: wifi-login opens hotspot login pages, quiet while the internet works another way - #5
Merged
Merged
Conversation
…the internet works another way The watcher (started from hypr-user.lua, Super+Shift+W to check again) finds the captive portal of the WiFi you joined and opens its login page. It used to judge each WiFi on its own, so a campus WiFi that wanted a login kept opening its page and sending notifications even while USB tethering already had internet. Each default route is now checked through its own interface; while one is online, a WiFi that wants a login or does not answer is left alone with no page and no notification, and the login page opens once that connection goes away.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
bin/wifi-login, the hotspot (captive portal) watcher, to thedesktoppart.hypr-user.luastartswifi-login --watchand binds Super+Shift+W to check again (which always opens the login page if there is one).desktop.shlinks it to~/.local/bin/wifi-login; uninstall removes it through the manifest like every other link.curl --interface), so the result is right when tethering, LAN or Tailscale owns the default route or DNS.Fix included: the watcher used to judge each WiFi on its own, so a campus WiFi that wanted a login kept opening its page and sending "wants a login" / "no answer" notifications while USB tethering already had internet. Now every default route is probed through its own interface once per round. While one of them is online, a WiFi that wants a login or does not answer is left alone (no page, no notification); the login page opens once that connection goes away.
Tested
tests/wifi-login.py(new, in CI): watcher decisions, uplink lookup, login URL parsing.