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

redirect devices to specific website #26

Open
AlphaArslan opened this issue Sep 28, 2019 · 5 comments
Open

redirect devices to specific website #26

AlphaArslan opened this issue Sep 28, 2019 · 5 comments

Comments

@AlphaArslan
Copy link

I understand that there is some routing happening on the ESP.
what I want to do now is to always route the devices connected to the ESP NAT to a specific website.

how can this be achieved ?

@martin-ger
Copy link
Owner

This can be done ba manipulating DNS or by rewriting addresses of HTTP requests. The challenge is, to switch off this redirect selectivley, once authentication is done.

I did an example with Arduino that does IP address-rewrite and switches the MAC addresses, once "authentication" has been done: You can find the code here: https://github.com/martin-ger/lwip_nat_arduino

@AlphaArslan
Copy link
Author

DNS manipulation can be bypassed if the client chooses to use another DNS or access sites by IP. right ?
so, rewriting HTTP requests would be better I think.
I will study your code and keep you updated
thanks dude

@AlphaArslan
Copy link
Author

In CaptiveHotspot.ino, the hostspot doesn't have any internet access, does it ?

@AlphaArslan
Copy link
Author

but wait, there is actually no source ( C ) files in esp_wifi_repeater
I have been looking for source files to learn from them but can't find them anywhere

@martin-ger
Copy link
Owner

There are all sources in the user subdir.

In CaptiveHotspot.ino the ESP's STA side should be connected to the internet (the captive hotspot will work without, but then you get nothing once switched through).

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

2 participants