Categorygithub.com/sollie/cloudflare-dyndns
modulepackage
0.2.2
Repository: https://github.com/sollie/cloudflare-dyndns.git
Documentation: pkg.go.dev

# README

cloudflare-dyndns

WIP

Set the IP for a hostname to your current WAN ip on a domain hosted on Cloudflare DNS.

This program looks up "myip.opendns.com" on resolver1.opendns.com to get your WAN ip and uses this to update the configured hostnames using the Cloudflare API.

Installation

Install using go get github.com/sollie/cloudflare-dyndns or fetch a prebuilt release.

Configuration

We look for cloudflare-dyndns.yaml in one of the following locations:

  • /etc/cloudflare-dyndns/
  • $HOME/.cloudflare-dyndns
  • $PWD

Copy cloudflare-dyndns.yaml.dist to cloudflare-dyndns.yaml in your desired location and edit to your liking.

auth-email: [email protected]
auth-key: Global API Key from CF profile
zones:
  domain.tld:
    - myhost.domain.tld
    - anotherhost.domain.tld
  otherdomain.tld:
    - site.otherdomain.tld

# Structs

ChgResponse Output from CF API change.
Errors Contains errors from CF response.
GetResponse Output from CF API lookup.
NSRecord Contains output from getIP.
Result Contains result in CF response.
ResultInfo Contains info from CF response.
ZneResponse Used to fetch zoneid.