http-server icon indicating copy to clipboard operation
http-server copied to clipboard

Add support for DuckDNS

Open coreybruce opened this issue 2 years ago • 7 comments

Hi I would love if this had a way to connect to my duckdns domain so I can have a instant working domain and SSL HTTPS, DuckDNS has a your domain you created and a required token you generate to work so if that could be added than that would add a great easy way to get a web server up. :)

coreybruce avatar Dec 18 '21 06:12 coreybruce

What is needed to support DuckDNS? Could you better detail how you'd use http-server for this and what's missing?

thornjad avatar Dec 20 '21 18:12 thornjad

Sure so if you go to duckdns.org you will see you can login via GitHub, Google etc. Once you've done that (I logged in via Github) you can create a domain, if you could add support for DuckDNS like Nextcloudpi has and point to your domain and have a secure way to give it your security token that would make it so easy to add a secure Https domain to a http-sever instant.

coreybruce avatar Dec 21 '21 02:12 coreybruce

Would this be possible?

coreybruce avatar Dec 27 '21 14:12 coreybruce

This could be done by a script with the Duck DNS REST API as a scheduled task I am sure there are plenty of scripts and compatible tools out there.

If not a simple curl to the url

https://www.duckdns.org/update?domains={YOURVALUE}&token={YOURVALUE}[&ip={YOURVALUE}][&ipv6={YOURVALUE}][&verbose=true][&clear=true]

I am not sure it needs a feature in http-server which is a simple HTTP(S) server and not intended to be used on the public Internet as such. You would also need to set up port forwarding on your router if on a private machine and network.

it's up to you what you do with it, usually the IP address is for your router, most people login to their router and configure certain ports to be forwarded to other computers running that are connected to the router

However, would something like ngrok be better?
its easy, fast, can fire up as and when needed and doesn’t require port forwarding etc.

andrewcrook avatar Mar 04 '22 13:03 andrewcrook

I agree this may not be something in the scope of http-server but I'd welcome a PR showing how it can be done!

thornjad avatar May 31 '22 21:05 thornjad

Not 100% sure on the technicals but I'd say do it the same way nextcloud does by entering the domain name and your token which would register to the domain.

coreybruce avatar Jun 01 '22 01:06 coreybruce

This issue has been inactive for 180 days

github-actions[bot] avatar Nov 28 '22 12:11 github-actions[bot]