dstapp / docker-ddns

Easy-to-deploy dynamic DNS with Docker, Go and Bind9
MIT License
654 stars 156 forks source link

new REST api port and curl feature #51

Open OkenKhuman opened 4 years ago

OkenKhuman commented 4 years ago

I tried this server running on a droplet and with this command

http://<mydomain>:8080/update?secret=hellotest&domain=node1

on my local machine's browser it returns

{"Success":true,"Message":"Updated A record for node1 to IP address 157.40.255.20","Domain":"node1","Domains":["node1"],"Address":"157.40.255.20","AddrType":"A"}

but by using curl on another droplet it returns

{"Success":false,"Message":"Domain not set","Domain":"","Domains":[""],"Address":"","AddrType":""}

what could be the problem?

and also please guide me on how to change the default port 8080 to something like 9010 if possibe.

dstapp commented 4 years ago

Hey, did you put the url in quotes using curl? Seems like domain is not part of the query string which is normal if you don‘t quote it because & is used to detach processes in bash :) port can be changed directly as a docker port mapping.

OkenKhuman commented 4 years ago

Yes I quote it... it works when I curl from my local machine but not from another Droplet. I Even forcely done by mentioning my droplet ip but I am not able resolve the dns.

I just want to setup a droplet based ddns server that provide ddns to other droplets.