A Dynamic DNS Updater in Go.
It fits my very narrow use case, hopefully it's useful to someone else too.
- Google Domains (Not Google Cloud DNS)
OS | 386 | amd64 | arm6 | arm64 |
---|---|---|---|---|
Linux | ✅ | ✅ | ✅ | |
Windows | ||||
MacOS |
- GoLang 1.16+
- Goreleaser (optional, to build linux packages)
goreleaser release --rm-dist --snapshot
- Configuration file ✅
- Make the HTTP POST to update the ip, not providing any IP and letting the server sort it out ✅
- Do so on a 60 minute loop ✅
- systemd unit / pid file ✅
- deb/rpm packages ✅
- Configuration file ✅
- Retry logic ✅
- Debug logging flag ✅
- Config file in
/etc/godynamicdns/config.toml
✅ - Get Public IP (and lease expiration) via UPnP
- Schedule IP updates based off of lease expiration
- Schedule IP updates when UPnP indicates that the public IP has changed
- Dry run
- Documentation
- SIGHUP for configuration reload
- version numbers in build ✅
/etc/godynamicdns/config.toml
debug = true
[[domain]]
username = "Bruce.Wayne"
password = "iamb@man"
hostname = "batcave.wayneindustries.com"
frequency = "60m"
Library | License | Purpose |
---|---|---|
Sirupsen/Logrus | MIT | Pretty Logging |
BurntSushi/toml | MIT | Config File Parsing |
urfave/cli | MIT | Command line parameter management |
NebulousLabs/go-upnp | MIT | Discovering external IP |
- Working CA Certificate store (see here) to build a secure connection to Google
- Systemd is recommended, but you can absolutely run it without.