godynamicdns

command module
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

README

godynamicdns

A Dynamic DNS Updater in Go.

It fits my very narrow use case, hopefully it's useful to someone else too.

Supported Providers

  • Google Domains (Not Google Cloud DNS)

Supported Platforms

OS 386 amd64 arm6 arm64
Linux
Windows
MacOS

Building

Requirements:
  • GoLang 1.16+
  • Goreleaser (optional, to build linux packages)
Build instructions
goreleaser release --rm-dist --snapshot

Milestones

MTP
  • 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 ✅
MVP
  • systemd unit / pid file ✅
  • deb/rpm packages ✅
  • Configuration file ✅
  • Retry logic ✅
  • Debug logging flag ✅
MVP+
  • 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 ✅

Example configuration

/etc/godynamicdns/config.toml

debug = true

[[domain]]
username = "Bruce.Wayne"
password = "iamb@man"
hostname = "batcave.wayneindustries.com"
frequency = "60m"

Dependencies

Buildtime
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
Runtime
  • Working CA Certificate store (see here) to build a secure connection to Google
  • Systemd is recommended, but you can absolutely run it without.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL