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

Handle Wifi Captive Portals #59

Open
ignoramous opened this issue Aug 30, 2020 · 3 comments
Open

Handle Wifi Captive Portals #59

ignoramous opened this issue Aug 30, 2020 · 3 comments
Assignees

Comments

@ignoramous
Copy link
Collaborator

How do we handle restrictive networks like captive portals? Nebulo has a "pause when Captive Portal is detected".

Intranet DNS can be handled through DNS proxy setting #45

@Ch4t4r
Copy link
Contributor

Ch4t4r commented Aug 31, 2020

Nebulo does it by regularily doing a connectivitycheck (for example by checking whether http://connectivitycheck.gstatic.com/generate_204 returns 204 or something else). If a captive portal is detected (which would return 4xx or 200) it sends DNS queries to the networks DNS server unencrypted.

https://git.frostnerd.com/AndroidUtils/dnstunnelproxy/-/blob/master/library/src/main/java/com/frostnerd/dnstunnelproxy/CaptivePortalDnsHandle.kt

@ignoramous
Copy link
Collaborator Author

That's great defence in depth! No wonder Nebulo is as smooth as it is.

Android 11 has this: Captive Portal for Access points but won't be of use for app developers in its current form.

@yoshimo
Copy link

yoshimo commented Apr 24, 2023

Apart from domains by Mozilla, Microsoft Apple, Amazon & Google to test for Captive Portals there is also https://datatracker.ietf.org/doc/html/rfc8952 to find these.
I think the first and only requests when joining a WiFi network should be a captive portal test. Everything else should be held back until we know there is no pending captive portal "login".

The next step could be recording login scripts for certain captive portals. Sometimes it is a fixed password&username that works across the entire network of the provider, sometimes it is a simple password like "password" or the name of the WiFi itself.
Sometimes you just need to mark a checkbox and click "I accept the terms of use" .

Depends on your definition of "handle"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants