Domain providers

Connect registrar and DNS-host API keys, import domains, manage external DNS, nameservers, DS records and expiry.

Available providers version 1.0.1 Part of Cloudflare security

Actions

65 actions, callable from the panel, the command palette and the API as POST /api/v1/a/<id>. Internal actions used between modules are not listed.

ActionWhat it doesRiskPreview
providers.catalog.list List supported providers (read) low No dry run
providers.keyguide.get How to get a provider's API key (read) low No dry run
providers.connection.create Connect a provider medium
providers.connection.update Edit a connection medium
providers.connection.get Get a connection (read) low No dry run
providers.connection.list List connections (read) low No dry run
providers.connection.for Connections that can do something (read) low No dry run
providers.connection.delete Remove a connection high
providers.connection.test Test a connection low No dry run
providers.custom.validate Validate a custom provider definition (read) low No dry run
providers.custom.save Save a custom provider medium
providers.custom.list List custom providers (read) low No dry run
providers.custom.get Get a custom provider (read) low No dry run
providers.custom.delete Delete a custom provider high
providers.domains.list List the domains a connection holds (read) low No dry run
providers.domains.import Import domains from a connection medium
providers.link.list List linked domains (read) low No dry run
providers.link.get Get a domain link (read) low No dry run
providers.link.set Link a domain to a connection, or change its DNS mode medium
providers.link.unlink Unlink a domain medium
providers.external.status Where does a domain's DNS live (read) low No dry run
providers.external.list Domains whose DNS is at a provider (read) low No dry run
providers.dns.record.list List records at the provider (read) low No dry run
providers.zone.security.set Set the Cloudflare security level of a domain medium
providers.dns.record.set Set a record at the provider medium
providers.dns.record.unset Remove a record at the provider medium
providers.dns.sync Push the panel zone to the provider high
providers.nameservers.point Point the domain's nameservers to this server high
providers.zone.takeover Take over a zone from an outside DNS provider medium
providers.glue.check Check the name servers registered under a domain (read) low No dry run
providers.dnssec.publish_ds Publish the DNSSEC DS record at the registrar high
providers.registrar.status Expiry, auto-renew, lock and privacy low No dry run
providers.registrar.check Is this domain free, and what does it cost (read) low No dry run
providers.registrar.register Register a domain critical
providers.drift.report Compare provider records with the panel zone (read) low No dry run
providers.policy.get Which providers may an account connect (read) low No dry run
providers.policy.set Limit the providers an account may connect medium
providers.cf.overview Cloudflare overview of a domain (read) low No dry run
providers.cf.rules.list List Cloudflare rules (read) low No dry run
providers.cf.rules.preview Preview a Cloudflare rule (read) low No dry run
providers.cf.rules.save Add or change a Cloudflare rule medium
providers.cf.rules.delete Remove a Cloudflare rule medium
providers.cf.rules.reorder Move a Cloudflare rule low
providers.cf.managed.list Cloudflare managed rulesets (read) low No dry run
providers.cf.managed.set Turn a managed ruleset on or off medium
providers.cf.settings.get Cloudflare security settings (read) low No dry run
providers.cf.settings.set Change Cloudflare security settings medium
providers.cf.ssl.check Check Cloudflare SSL against the site (read) low No dry run
providers.cf.access.list List IP access rules (read) low No dry run
providers.cf.access.add Add an IP access rule medium
providers.cf.access.remove Remove an IP access rule medium
providers.cf.origin_cert.issue Issue a Cloudflare Origin CA certificate medium
providers.cf.origin_pulls.set Authenticated Origin Pulls high
providers.cf.site.get Cloudflare settings of a site (read) low No dry run
providers.cf.site.set Accept only Cloudflare traffic high
providers.cf.realip.get Visitor address from Cloudflare (servers) (read) low No dry run
providers.cf.realip.set Visitor address from Cloudflare medium
providers.cf.tunnel.list List Cloudflare tunnels (read) low No dry run
providers.cf.tunnel.create Create a Cloudflare tunnel medium
providers.cf.tunnel.run Run a tunnel on a server high
providers.cf.tunnel.stop Stop a tunnel on its server high
providers.cf.tunnel.status Status of a tunnel (read) low No dry run
providers.cf.tunnel.route Route a site's name through a tunnel high
providers.cf.tunnel.unroute Stop routing a name through a tunnel high
providers.cf.tunnel.delete Delete a tunnel high

Permissions and limits

Permissions

  • providers.view See the provider catalog
  • providers.connection.view View provider connections
  • providers.connection.manage Connect, edit, test and remove provider connections
  • providers.custom.manage Define custom providers
  • providers.domain.view View linked domains, registrar status and drift
  • providers.domain.manage Import domains and change nameservers, DS and DNS mode
  • providers.record.manage Change DNS records held at a provider
  • providers.cloudflare.view See Cloudflare security settings, rules, access rules and tunnels
  • providers.cloudflare.manage Change Cloudflare rules, settings, access rules and certificates of your own domains
  • providers.cloudflare.node.manage Let a server read visitor addresses from Cloudflare
  • providers.cloudflare.tunnel.manage Create and run Cloudflare tunnels on servers
  • providers.registrar.buy Register (buy) a domain through a connected registrar
  • providers.policy.manage Limit which providers an account may connect

Plan limits

  • providers.connections Provider connections

Engineering notes

Generated from modules/providers/docs.md at build 38156245. These are the notes the engineers keep next to the code: precise, technical, and honest about what is not done yet.

Customers (admin, reseller or hosting account) connect the API key of the place that holds their domain. The module then imports the domains, keeps DNS at the provider ("external mode") or moves it here, points nameservers at this server, publishes DNSSEC DS records, watches expiry and reports drift. It talks to provider APIs from the control plane only (no agent op).

Model

  • Connection (providers.connection.*): provider (catalog id or custom), non-secret config, secrets in the vault (conn/<id>, JSON of field -> value; the row keeps only ••••last4). Owner = "" (administrator), reseller id or hosting account id; a user sees only their own, an admin sees all. Saved only after a test call succeeds (save_untested overrides). Test = the adapter's cheapest read, classified ok | auth_failed | rate_limited | provider_error | rejected | unreachable | blocked, with the provider's message redacted. providers.connections.recheck retests the 20 least recently checked every 15 min and emits providers.connection.failed/recovered. Delete is refused while domains are linked. Limit providers.connections (default 5, not counted for admins). Per-account policy providers.policy.set {principal_id, allowed[]} (admin) plus setting default_allowed; plans map to accounts in the accounts module, so "per plan" = set it for the accounts of the plan (follow-up: package-level default).
  • Adapters (26 native: 4 hand-written below, 22 through libdns, see "libdns adapters"): Cloudflare (token), Hostinger (token; shapes from the owner's hpanel-dns client, validate before PUT, overwrite:true = RRset), GoDaddy (key+secret, environment production|ote; registrar info + nameservers), Porkbun (apikey+secretapikey in the POST body; registrar info, nameservers, DS). The 8 catalog providers without a libdns package or API client (dynadot, hover, openprovider, resellerclub, enom, constellix, ns1, hostinger-style gaps) stay custom_only: an admin defines them as a custom provider. Records are exchanged in the panel's canonical form (dnsx.Record: relative names, "quoted" TXT, 10 host. MX); each adapter converts to its wire format. SetRRset replaces all values of name+type, idempotently (id-based APIs: keep/update/delete/create).
  • Custom provider (providers.custom.save, admin): a JSON definition interpreted by the module, never code. base_url, auth (none | bearer | header | basic | query, values {cred.<key>} over the declared credentials), static headers, and ops domains, records, create, update?, delete, test? each with method, path, query, body (templates over {zone} {zone_id} {record_id} {name} {fqdn} {type} {value} {ttl} {priority}; an exact {ttl}/{priority} becomes a JSON number), items (dot path to the array), map (id, name, type, ttl, content, priority, expires), pagination (page | offset | cursor, max 200 pages). Options txt_quoted, keep_trailing_dots, name_format: relative|fqdn. Validation refuses unknown variables, credentials outside auth, ..////?/# in paths, forbidden headers (Host, Content-Length, Cookie, ...), a GET with a body, a non-https or private base_url, and definitions over 64 KB. A definition without update replaces by delete + create.
  • SSRF guard (ssrf.go, used by every outbound call): https only; no credentials in the URL; the host is resolved by the guard, EVERY address must be public (loopback, RFC 1918, link-local incl. 169.254.169.254, CGNAT, multicast, unspecified, IPv4-mapped / NAT64 / 6to4 forms judged by the embedded IPv4) and the connection is made to the checked address (no second lookup, so no DNS rebinding); redirects are re-checked, must stay https and may not leave the original host (custom headers would travel); max 3 redirects; no environment proxy; dial 5 s / TLS 10 s / headers 15 s / request 20 s; response capped at 4 MB. Admin-only settings allow_private_targets and allow_insecure_http relax this for a lab or a self-hosted API; both default off. Errors drop the request URL, and every secret value and key= style query parameter is replaced by ••••.
  • Links (domain_links): panel domain -> connection, mode: panel (DNS served here; the provider is only the registrar) or external (DNS served by the provider). Also cached registrar data (expiry, auto-renew, lock, privacy, nameservers) refreshed by providers.registrar.refresh_all every 6 h; providers.domain.expiring is sent once per threshold (setting expiry_warn_days, default 60/30/14/7/1; re-armed after a renewal).

Actions

catalog.list, connection.create|update|get|list|delete|test, custom.validate|save|list|get|delete, domains.list (what the provider holds, marked linked / on this server), domains.import (dry-run: per-domain plan), link.list|get|set|unlink, external.status, dns.record.list|set|unset, dns.sync (push panel zone to provider; prune), nameservers.point, dnssec.publish_ds, registrar.status, drift.report, policy.get|set, internal acme_challenge.set|clear. Every push has a dry-run Plan with real before/after values. Import order: the link is written before domains.create, so the dns module sees external when it reacts to domains.created; panel mode then hands the provider's records (apex NS and SOA left out) to dns.zone.import as a BIND file, waiting for the zone the dns module creates asynchronously.

Contract with the dns module (what dns must do for external mode; the dns module is not edited here)

  1. In dns.on_domain_created (and wherever it would create/apply a zone) call providers.external.status {domain}; when external: true do NOT create a zone on the node (the link already exists at that point).
  2. In dns.record.set|unset|list (and everything routed through them: mail SPF/DKIM/DMARC/MX, web A/AAAA), if the zone has no local zone but providers.external.status says external, call providers.dns.record.set|unset|list with the SAME params (and the same actor, dry-run flag included). Result shape matches: {zone, changed, applied, changes[], provider}; the list returns {zone, records[], provider}.
  3. dns.acme_challenge.set|clear {domain, value} (internal): when no local zone holds the name, call providers.acme_challenge.set|clear (same params; system actor). TXT TTL 60, several values coexist, *. stripped. Only the _acme-challenge TXT RRset changes (mutateRRset: values deduplicated, so a retry writes nothing; every other record is written back as it was). dns.acme_challenge.check {domain} calls the read-only providers.acme_challenge.check: the covering external link (longest suffix), the connection, then one read of the zone with its key, answering ok, not_linked, auth_failed, zone_not_visible, connection_error or provider_error, plus the provider's key-guide permissions (a token's right to edit records cannot be proved without writing one). Tests: cp/acme_provider_test.go (fake Cloudflare).
  4. Domain deletion: domains.deleted already unlinks (subscription providers.on_domain_deleted); provider records are left untouched.

Verified

Unit tests: SSRF refusals (blocked ranges incl. mapped/NAT64/6to4, URL forms, hostile DNS answer incl. one bad address among good ones, redirects to http / another host / loop, oversize body, timeout), key redaction, custom definition validation (19 bad definitions), custom adapter against a TLS mock with pagination, Cloudflare adapter against a mock, manifest contract. Lab run: see docs/tasks/w7/w7-02-providers-module.handover.md.

Not done / next

Native adapters for the other catalog providers (Namecheap XML with IP allow-list, Gandi, Name.com, Dynadot, Route 53 SigV4, ...); libdns/lego adapters (needs go.mod); provider-side DNSSEC for external zones; domain register/transfer/availability/pricing; web UI; sharing an admin or reseller connection with the accounts below it; per-plan default policy; Cloudflare batch endpoint for big imports.

libdns adapters (w7-03)

cp/libdns.go wraps any libdns provider (GetRecords + SetRecords + DeleteRecords, ListZones when it has one) as a DNSAdapter; cp/libdns_providers.go maps each provider's connection fields to its struct. Native via libdns (22): namecheap, namecom, namesilo, gandi, ovh, hetzner, digitalocean, route53, gcloud, azure, linode, ionos, dnsimple, desec, bunny, netlify, vercel, infomaniak, inwx, dynu, cloudns, he (TXT only). Records CRUD only: registrar features (nameservers, DS, expiry) exist only where hand-written (godaddy, porkbun). Notes:

  • Fields: required secrets, optional secrets (providerDef.Optional, e.g. INWX totp_secret) and plain settings are the catalog auth_fields that the libdns struct really uses; fields libdns has no use for (namecheap username, gandi sharing_id, vercel team_id, he hostname) are not accepted. Base-URL style fields of the libdns structs are never exposed.
  • Test-on-save: ListZones where it exists; otherwise a read of a zone that cannot exist (a rejected credential classifies as auth_failed, "zone not found" means the credential was accepted). Providers without ListZones cannot enumerate domains: import them by name (ZoneChecker.HasZone reads the zone). Google's service-account JSON is written to a 0600 temp file for the duration of one operation only.
  • SSRF: libdns packages build their own HTTP clients against fixed provider hosts. The plugin process replaces http.DefaultTransport with the guard's dial rules (public addresses only, no proxy); SDK-based packages (Route 53, Google, Azure, Linode) use their own transport and reach only their provider's hosts. Errors are redacted of every secret value.
  • Catalog: every provider carries tested {adapter, status, live}; nothing is live verified. Built-in four = mock-tested (adapters_test.go, adapters2_test.go: Cloudflare, Hostinger, GoDaddy incl. registrar calls); libdns ones = wrapper unit-tested over an in-memory libdns provider plus a build/field check against the catalog; the provider packages themselves are not run against mocks.

dns delegation (done in w7-03, the contract above is implemented)

dns.on_domain_created skips the node zone for external domains; dns.record.set|unset|list on a name with no local zone but an external link delegate to providers.dns.record.* (same actor and params); dns.acme_challenge.set|clear delegate to providers.acme_challenge.* when no local zone holds the name. Host.Call now carries the dry-run flag: a dry run of an external set/unset returns this module's own plan, computed against the provider's live records (DNS screens, 2026-10-27).

Capabilities on connections (w11-150, ADR 0024 decision 0)

A connection says what it can be used for in provides: dns, registrar, compute, load_balancer, kubernetes, cdn, storage, mail_relay, tunnel. The catalog declares provides and vendor for every entry (providers.catalog.list serves both); providers.connection.create accepts provides (a subset of what the vendor does here; left out = all of it) and migration 0002 derived it for existing connections from the adapter's capabilities (dns, registrar), so DNS and registrar connections keep working.

  • providers.connection.for {capability}: the connections the caller may use. Never returns a secret.
  • providers.connection.request (internal; a module lists it in system_calls): one call to the vendor's API for a compute/load_balancer/kubernetes/storage/cdn/tunnel connection. The secret is read from the vault here, added as the vendor's auth header, sent through the SSRF guard to the vendor's fixed host (apiDefs in cp/capabilities.go; base_url_overrides is the lab setting) and removed from anything returned. The path must start with / and carry no query, dots or escapes. The cloud module's drivers use this; the secret never reaches a browser, the AI or another module.
  • Kinds with a vendor API today: aws_ec2 (access key, SigV4), gcp_compute (service-account JSON), ovh_cloud (application key, secret, consumer key), hetzner_cloud (its own connection kind of the vendor hetzner; a different token from Hetzner DNS), digitalocean, vultr, linode (the same token as their DNS entry when it has the scopes). The catalog also lists scaleway, upcloud, openstack for w11-153. Testing a connection runs the DNS read when it provides dns/registrar, and the vendor API's cheapest read when it provides an API capability.

Cloudflare security (w11-220, closes bug B-008)

Everything below works per domain whose DNS the panel keeps at Cloudflare ("external" link to a Cloudflare connection), and goes through the existing Cloudflare adapter: the token comes from the vault, every request through the guarded client, nothing here sees or returns it. Source files: cp/cfzone.go (finding the zone and who may touch it), cp/cfapi.go (the API calls), cp/cfrules.go (presets, expression check, plan limits), cp/cf*_actions.go (the actions), cp/cfstore.go (what the panel remembers, migration 0003). The screen is ui/src/pages/cloudflare.tsx (route /cloudflare for admin, reseller and user).

Who may do what. A person reaches a zone only through a domain they can manage (the same domains.list scope as the DNS actions); a user never reaches another account's zone. The system skips that check, so every action called as the system must name account_id and only reaches a zone that account's own link holds (audit 2026-10-20, 002; guardSystemLink, tested for every zone action). Permissions: providers.cloudflare.view and .manage (admin, reseller, user: own domains only), .node.manage and .tunnel.manage (admin only). Tunnels and the visitor address are administrator work on purpose: the connector runs on the server, and what it may connect to is decided by the ingress rules, which the panel writes itself (the site's own nginx on this server, never a free address).

Action What
providers.cf.overview plan, rule counts against the plan limit, security level, SSL mode, managed rulesets, Origin Pulls. Parts Cloudflare or the token cannot read are listed under errors, the rest still shows
providers.cf.rules.list/save/delete/reorder firewall rules (http_request_firewall_custom) and rate limiting rules (http_ratelimit), kind = waf or ratelimit. Add or edit with a preset or your own expression; reorder moves a rule to a position
providers.cf.rules.preview turns a preset or an expression into the Cloudflare rule, a plain sentence and warnings; checks the expression (brackets, quotes, operators, 4096 characters). Sends nothing
providers.cf.managed.list/set the Free Managed Ruleset (every plan), the Cloudflare Managed Ruleset and the OWASP Core Ruleset (Pro and above). The list says what the plan allows; turning on a set the plan lacks is a plain refusal, nothing is sent
providers.cf.settings.get/set security level (incl. under attack; the protection module keeps using providers.zone.security.set), Bot Fight Mode, browser integrity check, challenge passage, SSL mode, Always Use HTTPS, minimum TLS, HSTS. set takes any subset, returns the previous values, names what was already changed if a later one fails
providers.cf.ssl.check SSL mode, redirect, TLS floor and HSTS against the site's certificate: says whether Full (strict) will work (526 warning)
providers.cf.access.list/add/remove IP access rules by address, range (IPv4 /16 and /24, IPv6 /32 /48 /64), AS number or country, for a zone or (a person, own connection only) the whole Cloudflare account
providers.cf.origin_cert.issue key and CSR made on the server through ssl.csr.create, signed by Cloudflare's Origin CA, installed through ssl.cert.upload; optionally switches the zone to Full (strict). A failed install revokes the certificate again and removes the pending request
providers.cf.origin_pulls.set zone setting plus, with a site, the nginx file asking for Cloudflare's client certificate. Order: on = Cloudflare first, then the server; off = the server first, then Cloudflare; a failed server change puts the zone setting back, so visitors are never locked out
providers.cf.site.get/set per site "only accept traffic from Cloudflare". Needs the confirm flag after the warning, the server's visitor address turned on, and a proxied (orange cloud) record for the name
providers.cf.realip.get/set per server: nginx trusts Cloudflare's published ranges (set_real_ip_from, real_ip_header CF-Connecting-IP). Fetched from api.cloudflare.com/client/v4/ips, refreshed daily by providers.cf.ranges.refresh (internal)
providers.cf.tunnel.list/create/run/stop/status/route/unroute/delete named tunnels in the connection's Cloudflare account, the cloudflared service on a server, routing a site's name through a tunnel (ingress rule plus proxied CNAME to <id>.cfargotunnel.com)

Presets (plain words in the screen): block countries, challenge bots on WordPress login (/wp-login.php, /xmlrpc.php, known good bots not touched), block bad paths (.env, .git, wp-config.php, and more; your own list works too), allow my IPs (placed first), limit sign-in attempts and limit API requests (rate limits). Plan limits come from a table in cfrules.go (Free: 5 firewall rules, 1 rate limit, period 10 s; Pro 20 and 2; Business 100 and 5; Enterprise 1000 and 100): the panel refuses before sending and explains; where an account differs, Cloudflare's own message is shown as it is.

Connection settings. A Cloudflare connection takes an optional account_id (32 hex characters). It is needed for tunnels and account-wide access rules; without it the panel uses the only account the token can see. Token permissions: Zone Read, DNS Edit for DNS; Zone WAF Edit, Zone Settings Edit, Firewall Services Edit, SSL and Certificates Edit for the rest; Cloudflare Tunnel Edit (account) for tunnels.

On the server (agent ops, sdk/agentop/cloudflare.go, internal/agent/cloudflare.go).

  • providers.cloudflare.realip writes /etc/respirecloud/web/cloudflare/00-realip.conf (ranges, a geo telling whether the TCP peer is Cloudflare or this server, and $rc_cf_block). Every range is checked again on the node: not wider than /12 (IPv4) or /29 (IPv6), not private, loopback or link-local, at most 100. The web module's nginx.conf includes cloudflare/*.conf before the sites; each site's front servers include cloudflare/sites/<site id>.con[f] (the glob lets a missing file pass). nginx is tested with the file in place and the old file is put back on a refusal. Turning it off is refused while a site still accepts only Cloudflare traffic.
  • providers.cloudflare.site writes that per-site file: if ($rc_cf_block) { return 444; } (loopback is always allowed, and the ACME challenge path stays reachable) and/or ssl_client_certificate + ssl_verify_client on with Cloudflare's origin-pull CA, which is compiled into the agent (checked by fingerprint in a test).
  • providers.cloudflared.run/status/remove: Debian and Ubuntu only. Adds Cloudflare's own apt repository (pkg.cloudflare.com/cloudflared any main) with its signing key pinned by fingerprint like every other vendor repository (aptkey.go), installs cloudflared, creates the system user rc-cloudflared and one unit rc-cloudflared-<12 hex>.service per tunnel (hardened, runs cloudflared tunnel run --token-file). The token is written to /etc/rc-cloudflared/<id>.token (root:rc-cloudflared, 0640) and is never in the unit, a result or a log. remove deletes the unit and token and, when no tunnel is left, purges the package, the repository, its key and the user.
  • Visitor addresses behind a tunnel show as 127.0.0.1 until the server also trusts loopback (trust_loopback, an explicit choice: local programs can then claim any address for requests they make to this server themselves).

Limits and next steps. The cloudflared service is installed on Debian and Ubuntu; RHEL-family servers get a plain refusal. Zone parts were proven against a fake Cloudflare built from the documented shapes and against the real account's account-level API (tunnels, account access rules, the address list); lab/tools/cf-live.sh --zone <domain> runs the zone parts live as soon as the account holds a domain. Authenticated Origin Pulls uses Cloudflare's shared certificate: it proves that a request came through Cloudflare, not through someone else's Cloudflare account (per-hostname certificates are not built). The origin certificate flow puts the key on the server the SSL module chooses for the caller (the site's server for an administrator).

Key guides (w11-227)

"How do I get this key?" for every provider a customer connects. The guides are data, one file per provider in keyguides/*.yaml, written from each provider's own current help and dated (as_of). Fields: the values RespireCloud asks for, links (deep links; unverified: true where a link could not be checked), numbered steps, the permissions to choose (least privilege), copy_once, needs_ip (the panel shows its egress address), search_hint, steps_unverified + unverified_note for anything not confirmed. providers.keyguide.get {provider?} returns one guide (by guide id or by a catalog id in applies_to) or lists them; it is the one source for the connect screen (ui/src/keyguide.tsx) and for the assistant (journey providers.connect_key), which answers from this data and not from memory of a provider's screens. The RespireSoft AI provider needs no key (no_key: true). To refresh a guide: check the provider's help, edit its YAML, bump as_of. Storage guides (r2, backblaze_b2, wasabi) are reached through the assistant until those providers join the catalog.

Import into the owner's account (w12)

providers.domains.import without account_id: an administrator's import goes to the server owner's account (accounts.list server_owner=true) when there is exactly one; with none or several, and for a reseller, it is refused before anything is done, saying which account to name. The result has imported, skipped, failed and account_id next to results; a run where every domain failed is a precondition_failed error (the CLI exits non-zero) whose message gives the reasons and whose details hold the results.

Hostinger name servers, taking over zones (card C, w12)

Hostinger is a registrar here too (public API, read from its OpenAPI file 2026-10-27): GET /domains/v1/portfolio/{domain} for name servers and child name servers, PUT .../nameservers for 2 to 4 name servers. The API has no call to create child name servers (glue): providers.glue.check {domain, hosts?} compares what the registrar shows with what is wanted (ns1/ns2 at this server's address) and, where it cannot be set by API, returns fix_steps in plain words (for Hostinger: hPanel, Domains, the domain, Child nameservers). providers.zone.takeover {domain, contact?} (external-mode domains): copies the provider's records (wildcards too) into a zone here (our name servers, SOA contact), asks the old servers and this one the same question for every record name and type (wildcards through a probe label) and lists differences; only when all agree the link goes to panel mode. It changes no delegation: the next, separately previewed step is providers.nameservers.point (dry_run shows before and after), now shared code (changeNameservers) for every registrar. fix/dns: "is there a zone here" is asked with dns.zone.get (localZone), never dns.record.list, which answers an external-mode domain from the provider; that is why an imported domain's takeover never created its zone. The old name servers come from the link, the registrar API, or DNS itself (lookupNS), never one of this server's addresses. The link now stays external until the name servers really point here: providers.nameservers.point (and providers.link.set to panel mode, the "I changed the name servers myself" button) accept an external-mode domain once its zone was copied here, and otherwise refuse with a providers.no_zone_here problem whose fix opens the takeover. providers.glue.check asks only for the zone's name servers that sit inside the domain (with the zone's addresses for them), says when none do, and says when ns1 and ns2 are one server. The Hostinger stand-in (modules/ssl/hostingerfake) serves the portfolio detail and the name-server PUT, so a whole takeover runs against it. providers.domains.import without an owner account refuses in plain words; the Providers screen asks which hosting account the domains go to.

DNS screens (owner, 2026-10-27)

  • providers.external.list {account_id?, domain?, query?, after?, limit?}: the external-mode domains, with provider_name (the catalog name) and can_proxy, scoped like dns.zone.list (admin all, reseller its accounts, others their own account; a team member only with an account-wide dns.zone.view), paged by name in byte order. The dns module merges it into its zone list.
  • Cloudflare's proxy (orange cloud) travels in dnsx.Record.Proxied, read for A, AAAA and CNAME only. providers.dns.record.set {proxied} turns it on or off for the whole name+type set through ProxySetter (Cloudflare only; any other provider is a plain refusal); a proxied set keeps Cloudflare's automatic TTL (1). Without proxied a set keeps its flag: new values of a proxied name are proxied too, and an update sends the record's flag back (Cloudflare's PUT replaces the record, so a body without proxied used to turn the orange cloud off on a TTL change). The plan shows the switch as "proxied by Cloudflare" / "DNS only".
  • A failed read of a provider's records says why in plain words and what to do (readErr: key refused, domain not visible to the key, slow down, unreachable, provider trouble); the provider's own message is in the details.

Register a domain, import from the Domains page, edit a connection (UX round, group 4)

  • providers.registrar.check (read only, providers.domain.manage): is a name free and what does it cost (first-year price, renewal, currency, in minor units). name alone tries com, net, org, app and io; names takes whole names. Without connection_id it uses the one Hostinger connection the caller may use.
  • providers.registrar.register (risk critical, providers.registrar.buy, administrators only, audited): buys the domain, then adds it to the panel with no website (mode external by default). confirm_price {amount_minor, currency} must equal the price read again at the registrar; a moved price, a missing confirmation or a taken name refuses with "Nothing was bought". dry_run is the plan: summary, cost, renewal price and the exact confirm_price to send. The add-site flow calls these two. Hostinger's calls (POST /domains/v1/availability, GET /billing/v1/catalog?category=DOMAIN, POST /domains/v1/portfolio) follow its published reference and are tested against a stand-in only: the first real check is a read-only one in the test phase; no purchase has ever been made by the build.
  • Imports (providers.domains.import, the sheet on the Domains page and the connection row) call domains.create with skip_auto: ["web"]: no PHP site is created for an imported domain.
  • UI: ui/src/import-from-registrar.tsx (the Domains page header button; the Domains bundle imports this one file), register-domain.tsx (Providers page, shown when a Hostinger connection exists), edit-connection.tsx (rename, settings, replace a secret through the vault; blank = keep). Tests: cp/registrar_test.go.
  • Unlink: a connection's detail on the Providers page lists its linked domains, each with "Unlink" (providers.link.unlink, confirmed with a sentence on what stays).
  • Custom providers (admins, ui/src/custom-providers.tsx): list, define, edit, check (providers.custom.validate), save and delete (previewed) on the Providers page. The basics are fields; the operations are one JSON box behind "Show details" that starts from a working example. Tests: ui/src/custom-providers.test.ts.