dyndns

command module
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2021 License: MIT Imports: 10 Imported by: 0

README

dyndns

Update Gandi LiveDNS based on the current (dynamic) ip.

Highlights

  • Supports both IPv4 and IPv6.
  • Reports failures and successful updates on a Discord channel. /!\ This is not optional (by design).
  • A faster IP finder is available if you have a Livebox v4 (may works on other models).

Install

  • From GitHub releases: download the binary corresponding to your OS and architecture.
  • From source (make sure $GOPATH/bin is in your $PATH):
go get go.mlcdf.fr/dyndns

Setup

dyndns requires the following environment variables to be set:

name description
DISCORD_WEBHOOK_URL your Discord channel webhook
GANDI_TOKEN your Gandi API Key

Usage

Usage:
    dyndns --domain [DOMAIN] --record [RECORD]

Options:
    --livebox            Query the Livebox (router) to find the IP instead of api.ipify.org
    --ttl                Time to live in seconds. Defaults to 3600
    -V, --version        Print version

Examples:
    export DISCORD_WEBHOOK_URL='https://discord.com/api/webhooks/xxx'
    export GANDI_TOKEN='foobar'
    dyndns --domain example.com --record "*.pi"

Setup as a cron job

crontab -e
# Run every 10 minutes
*/10 * * * * /path/to/dyndns --domain example.com --record "*.pi"

Checkout the example contrib/deploy.sh script.

Development

Run the app

go run main.go

Run the tests

go test ./...

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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