Skip to content

feat: add namecom protocol for Name.com DNS#935

Open
beadon wants to merge 2 commits into
ddclient:mainfrom
beadon:feature/namecom-protocol
Open

feat: add namecom protocol for Name.com DNS#935
beadon wants to merge 2 commits into
ddclient:mainfrom
beadon:feature/namecom-protocol

Conversation

@beadon

@beadon beadon commented May 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a new namecom protocol for updating DNS A/AAAA records via the Name.com API v4.

  • Auth: HTTP Basic (login = Name.com username, password = API token)
  • Flow: GET /v4/domains/{zone}/records to list, then PUT (update existing) or POST (create new)
  • Features: IPv4/IPv6, apex domain support (empty host string), configurable TTL (default 300)
  • Error handling: HTTP 4xx/5xx returns message field from JSON body
  • namecom added to @needs_json in init_config
  • 13 test cases covering: create, update, IPv6, dual-stack, custom TTL, apex, Basic auth, 401, 404, POST failure, zone mismatch, no-op, and record matching by fqdn+type

Files changed

  • ddclient.in%protocols entry, @needs_json, nic_namecom_examples(), nic_namecom_update(), _namecom_call()
  • t/protocol_namecom.pl — 13 subtests
  • Makefile.am — test added to handwritten_tests
  • README.md — Name.com listed alphabetically
  • ddclient.conf.in — example config block
  • ChangeLog.md — entry under ## v4.0.1-rc.2 (unreleased work-in-progress)

Test plan

  • make check TESTS=t/protocol_namecom.pl VERBOSE=1 — all 13 subtests pass
  • make check — full suite passes (895 pass, 2 skip)
  • Verify namecom appears alphabetically in %protocols (between namecheap and nfsn)
  • Verify namecom in @needs_json (between hetzner and nfsn)

🤖 Generated with Claude Code

@beadon beadon self-assigned this May 27, 2026
@beadon beadon requested a review from indrajitr May 27, 2026 23:25
@indrajitr indrajitr added the packaging Related to Distro packaging label May 28, 2026
Adds a new 'namecom' protocol for updating DNS records via the Name.com
API v4, with HTTP Basic auth, GET-then-PUT/POST logic, IPv4/IPv6 support,
apex domain handling, and 13 test cases covering success, update, error, and
no-op scenarios.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@beadon beadon force-pushed the feature/namecom-protocol branch from 3987ce6 to 88cde09 Compare May 28, 2026 06:36
@beadon

beadon commented May 28, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto current main. Conflicts resolved (ChangeLog, Makefile, ddclient.conf.in, ddclient.in @needs_json). Ready to merge.

Bare FQDN server defaults send requests over plain HTTP without ssl=1;
the API requires HTTPS and rejects plain HTTP with 401.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

packaging Related to Distro packaging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants