heathcliff26/cloudflare-dyndns

By heathcliff26

Updated 6 days ago

dyndns client/relay for cloudflare

Image
Networking
Web servers
0

6.3K

heathcliff26/cloudflare-dyndns repository overview

cloudflare-dyndns

Implements the API from Fritz!Box DynDNS Script for Cloudflare, but can also be used as a standalone client.

Additionally to consuming less resources and being a smaller image, it also implements POST in addition to GET requests, meaning no longer does the token need to be included in the url.

The client package can also be used as a golang API, should you want to build your application with included cloudflare dyndns capabilities.

Table of Contents

Container Images

Image location
Container RegistryImage
Github Containerghcr.io/heathcliff26/cloudflare-dyndns
Docker Hubdocker.io/heathcliff26/cloudflare-dyndns
Tags

There are different flavors of the image:

Tag(s)Describtion
latest, slimContains only the golang binary
phpDeprecated: Contains the original php script from Fritz!Box DynDNS Script for Cloudflare and is based on php:apache-bookworm

Usage

The binary can be run either as a server, a standalone client or in relay mode where it will call a server.

The main use case for relay mode would be when you want to restrict your cloudflare API key to a static IP.

Output of cloudflare-dyndns -h

Usage of cloudflare-dyndns:
  -config string
        Path to config file, can be empty when running in mode server
  -env
        Used together with -config, when set will expand enviroment variables in config
  -mode string
        Set what mode to run, options are "server", "client" and "relay" (default "server")

An example config can be found here.

API (Server Mode)

ParameterDescription
token (cf_key)Token needed for accessing cloudflare api
domains (domain)The domain to update, parsed from comma (,) separated string, needs at least 1
ipv4IPv4 Address, optional, when IPv6 set
ipv6IPv6 Address, optional, when IPv4 set
proxyIndicate if domain should be proxied, defaults to true
Examples

Here is an example GET request:

https://dyndns.example.com/?token=testtoken&domains=foo.example.net,bar.example.org,example.net&ipv4=100.100.100.100&ipv6=fd00::dead&proxy=true

or alternatively in the format Fritz!Box DynDNS Script for Cloudflare from :

http://example.org/?cf_key=testtoken&domain=foo.example.net&ipv4=100.100.100.100&ipv6=fd00::dead&proxy=true

When using POST the format is:

{
  "token": "",
  "domains": [
    "foo.example.org",
    "bar.example.net"
  ],
  "ipv4": "100.100.100.100",
  "ipv6": "fd00::dead",
  "proxy": true
}

Tag summary

Content type

Image

Digest

sha256:4ff5308e2

Size

524 Bytes

Last updated

6 days ago

docker pull heathcliff26/cloudflare-dyndns:sha256-5cfbf6fb274d2a2e283fc61cca1d1318d5069a20dc99dfc2adc233555a815c82.sig