prampec / IotWebConf

ESP8266/ESP32 non-blocking WiFi/AP web configuration Arduino library
MIT License
534 stars 140 forks source link

How to disable Captive portal redirection #84

Open rick-pit opened 5 years ago

rick-pit commented 5 years ago

Hi, can you tell me how to disable redirections to the Captive portal like wifimanager (development version) does.

WifiManager method //if false, disable captive portal redirection void setCaptivePortalEnable(boolean enabled);

prampec commented 4 years ago

What is the point of disabling the captive portal redirection?

TheKelmore commented 4 years ago

For Security reasons i think, if you are creating a thing that your are putting in a company's network, or in a house, we could disabling the captive portal. I know that is needed the user and the password, but if someone intercepts this data, the thing will be vulnerable.

prampec commented 4 years ago

Captive portal comes up only when the Thing is in AP mode and one was connected to the network provided by the Thing. That cannot be done without knowing the password of the network. As far as I know currently there is no way to grab network traffic without having connection to that network. So AP mode is the most secure way to configure your Thing, where captive portal is now the default.

What I can imagine tho, is that AP mode is the regular use of the Thing, e.g. with published password. Now, IotWebConf is not designed to handle this scenario.