Giter VIP home page Giter VIP logo

dnsupdater's Introduction

dnsupdater

Build GitHub release (latest by date) Total download

中文版

This app allows you updating your DNS records with your current external IP address.

It is recommended to run this program in your home server, or in your router。

You should NEVER run this program behind a proxy or a VPN. Running it behind a proxy is an unconsidered and untested scenario.

How-to

  • Download the latest release for your target

  • Extract the archive.

  • Rename config.yaml.template to config.yaml.

  • Finish your configuration in the config.yaml

  • Upload dnsupdater and config.yaml to the device you want this app to run. These 2 files must be under the same directory.

  • Set up a cron job like

0 0,12 * * * /home/yourname/dnsupdater/dnsupdater > /var/log/update-dns.log 2>&1 &

Important notes in configuration

  • The APIKey for your CloudFlare records should be a dedicated API token. You can generate one here with template Edit zone DNS.

  • Do not modify the property RegionID for your Aliyun DNS records. cn-hangzhou is the only accepted value for now.

  • About JSON path

Here's a list of operators used in JSON path:

Operator Description
$ The root element to query. This starts all path expressions.
@ The current node being processed by a filter predicate.
* Wildcard. Available anywhere a name or numeric are required.
.. Deep scan. Available anywhere a name is required.
.<name> Dot-notated child
['<name>' (, '<name>')] Bracket-notated child or children
[<number> (, <number>)] Array index or indexes
[start:end] Array slice operator
[?(<expression>)] Filter expression. Expression must evaluate to a boolean value.

So if you have a JSON like this:

{
  "ip": "103.156.184.21",
  "tz": "Asia/Taipei"
}

You can use $.ip to obtain the value in the field ip.

Build for other platforms

You can check for all preset targets by running the scripts in the scripts folder.

For Windows users:

build.bat /?

For *NIX users:

make help

Or you can specify your own GOARCH and GOOS (and maybe GOMIPS) with go build command to build the executable for your platform as long as Go provides support to it.

License

Licensed under MIT license.

dnsupdater's People

Contributors

boris1993 avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

dnsupdater's Issues

build for mipsle?

this is a very useful tool! But my router is on mipsle, which is not supported by dnsupdater.
So I'm wondering if any chance to release a mipsle version?

IPv6 entries: updating AAAA records

Is there a way to update AAAA records using dnsupdater?

By default, dnsupdater tries to set my IPv4 address, failing at it, because in CloudFlare I have no A record. This is due to my ISP only providing IPv6 (common in Germany). More precisely, my IPv4 address is that of my ISP, shared with thousands of other people through DS-Lite.

INFO[0000] Loading configuration from C:\caddy\dnsupdater\config.yaml
INFO[0000] Checking current IP address...
INFO[0006] Current IP address is: 185.221.135.135
INFO[0006] 1 CloudFlare DNS record(s) found.
INFO[0006] Processing my.domain.ext
INFO[0006] Fetching the IP address of domain my.domain.ext
ERROR[0006] 404 Not Found
INFO[0006] Updating the IP address of record ID my.domain.ext to 185.221.135.135
ERROR[0006] invalid character '<' looking for beginning of value
INFO[0006] 0 Aliyun DNS record(s) found.

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.