A ddns client and server GitHub
- Base on atreugo Web Server Framework.
- Use HTTP API to sync IP and DNS.
- Use time.Ticker to call Server sync API.
- NONE(Just record IP, Provide Domain end with .internal)
- Aliyun
- Tencent
- Godaddy
- GoogleDomain(Not Google Cloud DNS, with Dynamic DNS, not test for ipv6)
- Cloudflare
Note
- Google have no api to query DNS, use net.LookupIP instead.
- Google use Dynamic DNS which has HTTP API.
- golang
- make
make all
make image VERSION=[GIT TAG]
make image-apline VERSION=[GIT TAG]
Usage:
server startup:
dyip-server [-c config file]
server startup in background:
nohup dyip-server [-c config file] &
generate demo config file:
dyip-server -g [-c config file]
print usage:
dyip-server -h
Options:
-c string
config file path, default server.conf (default "server.conf")
-g generate config, default server.conf
-h print usage
Usage:
client startup:
dyip-client [-c config file]
client startup in background:
nohup dyip-client [-c config file] &
generate demo config file:
dyip-client -g [-c config file]
print usage:
dyip-client -h
Options:
-c string
config file path, default client.conf (default "client.conf")
-g generate config, default client.conf
docker run -d -p 8080:8080 --name dyip-server -v ./:/etc/dyip zliea/dyip-server:latest
docker run -d --name dyip-client -v ./:/etc/dyip zliea/dyip-client:latest
address: 127.0.0.1 # Listen address
port: 8080 # Listen port
realip: x-real-ip # IP to sync from header, use remote address if empty
token: your-token-abcde12345 # Client and server auth token
ips:
- provider: your-provider # Support Provider (NONE/TENCENT/ALIYUN/GODADDY/GOOGLE)
ak: abcde12345 # Provider ak (USERNAME/AccessKey ID ...)
sk: abcde12345 # Provider sk (PASSWORD/AccessKey Secret ...)
domain: your-doamin # Domain
subdomain: your-subdomain # Subdomain
auth: your-doamin-token-abce12345 # Client and server domain auth token
protocol: IPV4 # IPV4/IPV6 protocol
server: http://127.0.0.1:8080/ # Server url [Format http(s)://ip:port/prefix/]
token: your-token-abcde12345 # Client and server auth token
domain: your-subdomain.your-doamin # Full domain
auth: your-doamin-token-abce12345 # Client and server domain auth token
interval: 300 # Sync interval (second)
protocol: IPV4 # IPV4/IPV6 protocol