balena-os / wifi-connect

Easy WiFi setup for Linux devices from your mobile phone or laptop
Apache License 2.0
1.27k stars 354 forks source link

Block captive portal #311

Open dmckminard opened 5 years ago

dmckminard commented 5 years ago

Hello, I need to block the automatic opening of the captive portal from a mobile phone. Is there a way to do that ?

Thanks !

majorz commented 5 years ago

Not very easily, but it is possible. Can you please let me know more about your use-case? I can give you some pointers.

dmckminard commented 5 years ago

I have an app that can connect to the Wifi Hotspot created by wifi-connect, but the hotspot also open the portal. I'd like to manage this directly in my app, so I want to disable to opening of the captive portal, and tell my app to connect to 10.0.0.1

majorz commented 5 years ago

Please check the similar discussion for this issue: https://github.com/balena-io/wifi-connect/issues/207

The current solution is to wrap WiFi Connect in a web application similarly to how it is done in this example project: https://github.com/balena-io-playground/wifi-connect-api/

The captive portal requests coming from the phone OS need to be handled in the app.

Ultimately I would like this to be implemented in WiFi Connect itself and added as a command line argument, but there are no short term plans for this.

Please let me know if you have any questions.

dmckminard commented 5 years ago

Ok, thank you!