Skip to content

GIDINET: Auto-suggest nameservers and add premium DNS helper#4203

Open
zupolgec wants to merge 1 commit intoDNSControl:mainfrom
zupolgec:gidinet-get-nameservers
Open

GIDINET: Auto-suggest nameservers and add premium DNS helper#4203
zupolgec wants to merge 1 commit intoDNSControl:mainfrom
zupolgec:gidinet-get-nameservers

Conversation

@zupolgec
Copy link
Copy Markdown
Contributor

Summary

  • GetNameservers now returns the static free-tier Gidinet nameservers (dnsl1/dnsl2.gidinet.com). Previously it returned nil, nil, which meant DNSControl could not derive registrar delegation from the DNS provider for Gidinet-hosted zones. With this change, zones declared as D(..., REG_GIDINET, DnsProvider(DSP_GIDINET), ...) get correct NS suggestions automatically, matching the behavior of providers like Cloudflare or netcup.
  • New GIDINET_PREMIUM_NS() JS helper that emits NAMESERVER("dns1..dns5.gidinet.com.") for zones on Gidinet's premium DNS tier. Intended to be paired with DnsProvider(DSP_GIDINET, 0) so the free-tier defaults from GetNameservers are skipped and only the five premium nameservers drive the delegation.
  • filterApexNS now drops apex NS records silently when they were synthesized from dc.Nameservers (either auto-injected by GetNameservers or declared via NAMESERVER()), since AddNSRecords adds those to dc.Records automatically. Previously it warned on every preview once GetNameservers began returning values. Truly unexpected apex NS targets (e.g. a stray NS("@", "something-else.")) still emit a warning because the Gidinet DNS API cannot honor them.
  • Documentation updated to describe both tiers and the GIDINET_PREMIUM_NS() usage pattern.

Motivation

Before this change, a zone served by Gidinet DNS required a redundant NS_GIDINET()-style block of explicit NAMESERVER() calls just so REG_GIDINET could propose the correct delegation. Users hit a no-op/warning loop where the registrar had nothing to compare against and/or where apex NS records raised spurious warnings. Gidinet's nameservers are static per-tier, so returning them from GetNameservers is safe and matches the convention used by other providers.

Test plan

  • go test ./...
  • go vet ./...
  • gofmt -l providers/gidinet/ pkg/js/
  • dnscontrol check on a real Gidinet-hosted configuration
  • dnscontrol preview on a free-tier zone: registrar correctly proposes dnsl1/dnsl2.gidinet.com delegation without explicit NAMESERVER() in the zone file; no spurious apex-NS warnings.
  • dnscontrol preview on a premium-tier zone using DnsProvider(DSP_GIDINET, 0) + GIDINET_PREMIUM_NS() (pending availability of a premium zone for the author to validate end-to-end).
  • IR inspection (print-ir) on a synthetic premium-tier config confirms the helper expands to the five NAMESERVER("dns1..5.gidinet.com.") entries.

Notes

  • No interface or API changes.
  • Backwards compatible: zones that already include explicit NAMESERVER("dnsl1/dnsl2…") records still work (the registrar-side dedup already handles duplicates).

- GetNameservers now returns the static free-tier nameservers
  (dnsl1/dnsl2.gidinet.com) so DNSControl can derive registrar
  delegation without requiring an explicit NAMESERVER() in the
  zone file (previously returned nil, nil).
- Add GIDINET_PREMIUM_NS() JS helper that emits the five premium
  nameserver records (dns1..dns5.gidinet.com). Use it together
  with DnsProvider(DSP_GIDINET, 0) to opt out of the free-tier
  defaults for zones on Gidinet's premium DNS tier.
- filterApexNS now drops apex NS records synthesized from
  dc.Nameservers silently (previously warned on every preview
  once GetNameservers started returning values); still warns on
  truly unexpected apex NS targets.
- Document both tiers, with examples for each.
@zupolgec zupolgec force-pushed the gidinet-get-nameservers branch from 8137e74 to 1c29159 Compare April 22, 2026 20:30
@zupolgec zupolgec changed the title GIDINET: Suggest nameservers via GetNameservers; add premium NS helper GIDINET: Auto-suggest nameservers and add premium DNS helper Apr 22, 2026
@zupolgec zupolgec marked this pull request as ready for review April 22, 2026 20:32
@TomOnTime
Copy link
Copy Markdown
Collaborator

Thank you for sending this!

Right now the project is in transition but I hope to be able to address this once we've moved to our new git org.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants