Skip to content
This repository has been archived by the owner on Aug 19, 2021. It is now read-only.

henry40408/cdu

Repository files navigation

cdu

GitHub Workflow GitHub

Cloudflare DNS record Update

Features

  • A standalone daemon to update DNS records on Cloudflare with cron
  • A CLI to update DNS records once
  • Cache zone and DNS record identifier for designated time span

Usage

Run as Docker container:

$ make build-docker-image
$ docker run -it \
  -e CLOUDFLARE_TOKEN=[your Cloudflare token] \
  -e CLOUDFLARE_ZONE=[name of your zone on Cloudflare] \
  -e CLOUDFLARE_RECORDS=[name of DNS records on Cloudflare, separated by comma] \
  henry40408/cdu \
  /cdu

Run as daemon:

CLOUDFLARE_TOKEN=[your Cloudflare token] \
CLOUDFLARE_ZONE=[name of your zone on Cloudflare] \
CLOUDFLARE_RECORDS=[name of DNS records on Cloudflare, separated by comma] \
cargo run -- --daemon true

Run as CLI:

CLOUDFLARE_TOKEN=[your Cloudflare token] \
CLOUDFLARE_ZONE=[name of your zone on Cloudflare] \
CLOUDFLARE_RECORDS=[name of DNS records on Cloudflare, separated by comma] \
cargo run

For help:

cargo run -- -h

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT