OpenShock / Firmware

Espressif Firmware for OpenShock, Controlling shock collars via Reverse engineered proprietary Sub-1 GHz Protocols.
GNU Affero General Public License v3.0
26 stars 6 forks source link

[Feature] Captive Portal: DNS Server + Redirects (triggers login popup on devices) #166

Closed nullstalgia closed 6 months ago

nullstalgia commented 6 months ago

Our captive portal was more just a portal than a captive one. :P

This follows the expectation that we answer to a device's DNS and HTTP connection tests in a way that it prompts the user for further action. (By redirecting all of those tests to ourselves.)

Further reading, if we decide to react to each test instead of the catch-all "404 Not Found" adjustment:

https://github.com/CDFER/Captive-Portal-ESP32/blob/main/src/main.cpp#L89

darkfader commented 5 months ago

Just a small note that it will need to accept a certain HTTP header size for some phones. On esp-idf, sdkconfig needs CONFIG_HTTPD_MAX_REQ_HDR_LEN=1024 or something.

hhvrc commented 5 months ago

Right... There's a bunch of these I would like to configure but I'm unsure if we can atm, these would be specifically set in the esp-idf config files but since we are still on the Arduino framework we can only set compile time definitions which I'm not sure will work with this.