Giter Site home page Giter Site logo

dyndns's Introduction

dyndns

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

Why

Some (most ?) providers (Orange for example) don't provide you a fix IP address: they give you a dynamic IP that changes over time. This makes it hard to self-host softwares and share them publicly via a domain because you have to constantly change the IP your domain is pointing to.

This program aims to solve that. It's intended to run on a always-on computer in your home (such as Raspberry Pi).

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 work 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"

Check out the example contrib/deploy.sh script.

Development

Run the app

go run main.go

Run the tests

go test ./...

dyndns's People

Contributors

mlcdf avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.