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

How do i set a domain name #341

Open
jcmojj opened this issue Mar 30, 2017 · 1 comment
Open

How do i set a domain name #341

jcmojj opened this issue Mar 30, 2017 · 1 comment
Labels
enhancement Feature Request

Comments

@jcmojj
Copy link

jcmojj commented Mar 30, 2017

I wish to use a domain name like "www.example.com" other than http://192.168.4.1/
I tried the library example DNSServer where they used dnsServer.start(DNS_PORT, "www.example.com", apIP); and it worked pretty well. I just had to type at the browser http://www.example.com and it finds it ip that was 192.168.1.1. When I used other names other than the correct one at the captive example that you used to inspire your own code the pages shown at the browser was created by webServer.onNotFound method.
It looks simple to solve, so i entered your code lib and change the line dnsServer->start(DNS_PORT, "*", WiFi.softAPIP()); to dnsServer->start(DNS_PORT, "www.example.com", WiFi.softAPIP());, but it doesn't work. How can I do it? I think that a real DNSServer should lets us type server name other than server ip, after all it is why DNSServer was created.
Thank you for your lib. For the first time one lib really delivers what promisses with a very fast implementation.

@tzapu
Copy link
Owner

tzapu commented Mar 30, 2017

hi, thanks for the appreciation,

i think the redirect code might need to check for domain exceptions as well... currently it tries to redirect everything to the ip, have not checked if all of that works as it should for a long while...

look in ken taylor s branch, he did some stuff to handle a specific domain i believe

good luck

@tablatronix tablatronix added the enhancement Feature Request label Aug 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature Request
Projects
None yet
Development

No branches or pull requests

3 participants