Giter Site home page Giter Site logo

layreboi / cloudflare-dns-updater Goto Github PK

View Code? Open in Web Editor NEW

This project forked from n1ko23/cloudflare-dns-updater

0.0 0.0 0.0 42 KB

Automatically updates your Cloudflare DNS records for specific zones. Especially useful if you have dynamic IP address

License: MIT License

Rust 100.00%

cloudflare-dns-updater's Introduction

Cloudflare DNS updater

What does it do?

Cloudflare DNS updater updates specified dns records for specified zones effortlessly and automatically. It was originally created to help me hosting my services under dynamic public IP address. Feel free to fork and reuse the code.

How to use

You can compile the updater from source or download the binary. To compile the program by yourself, you need to have the rustc and cargo installed.

Create your config.json that matches the example

{
  "UpdateThreshold": 120,
  "Keys": [
    {
      "AuthKey": "nice key bro",
      "Zones": [
        {
          "ZoneId": "dfhmordntv8t4vb8snittvbies7nct7s47v",
          "ARecords": ["test2.domain.moe", "test.domain.moe", "tast.domain.moe"],
          "AaaaRecords": ["test2.domain.moe", "test.domain.moe", "tast.domain.moe"]
        }
      ]
    },
    {
      "AuthKey": "another pog key",
      "Zones": [
        {
          "ZoneId": "esyigod5tihdvtudn5gitvnecrasdadg",
          "ARecords": ["error.bababooey.com", "backend.bababooey.com", "bababooey.com"],
          "AaaaRecords": ["error.bababooey.com"]
        }
      ]
    }
  ]
}

Field values

  • UpdateThreshold: Interval in seconds how often to check current IP and update the records if they don't match the IP
  • AuthKey: Your private key to authenticate into Cloudflare
  • ZoneId: ID of the zone to be edited
  • ARecords: List of A-Records to be updated inside the zone, IPv4
  • AaaaRecords: List of AAAA-Records to be updated inside the zone, IPv6

You can add more different keys and zones to those keys, as well as A and AAAA records to your needs, as long as your config follows the same structure

Important

You have to generate your authentication key in cloudflare with necessary permissions to view and edit the specified zones and their dns records, detailed instruction can be found here

Known bugs

None yet, you tell me

cloudflare-dns-updater's People

Contributors

geoxor avatar n1ko23 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.