openwrt / openwrt/packages

<ddns-scripts> Cloudflare DDNS Updater script

Open
#23,385 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Makefile
Stars
4.6k
Forks
4k
Avg merge
3d 12h
Merged PRs (30d)
134

Description

On the following Description, new information needs to be added https://github.com/openwrt/packages/blob/fa69fdc2b081abb57fc05c8d16356b16bdfdec5c/net/ddns-scripts/Makefile#L88

If possible, adding it to the lUCI configuration editing dialog to avoid having to edit the /etc/config/ddns file directly.

  • The API need to be generated on the Cloudflare Dashboard at https://dash.cloudflare.com/profile/api-tokens` and should be a Zone DNS with Edit Abilities
  • Username needs to be Bearer
  • Password needs to be the created above Token
  • In /etc/config/ddns, two options need to be added and set to the Zone ID as shown on the Domain Page (right side)
    • option id
    • option zone-id
  • Script doesn't account for proxy support, which is now supported by the API.

Example API from https://developers.cloudflare.com/api/operations/dns-records-for-a-zone-update-dns-record,

curl --request PUT \
  --url https://api.cloudflare.com/client/v4/zones/zone_id/dns_records/dns_record_id \
  --header 'Content-Type: application/json' \
  --header 'X-Auth-Email: ' \
  --data '{
  "content": "198.51.100.4",
  "name": "example.com",
  "proxied": false,
  "type": "A",
  "comment": "Domain verification record",
  "tags": [
    "owner:dns-team"
  ],
  "ttl": 3600
}'

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the ddns-scripts Makefile description and inspecting how /etc/config/ddns is exposed through the LuCI configuration editing dialog. Compare the current Cloudflare behavior with the linked API example; done means the required token and zone settings are documented and configurable, with proxy support accounted for.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
devops, documentation, networking
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.