mirror of
https://github.com/jhd3197/ServerKit.git
synced 2026-12-04 06:01:23 +09:00
Phase 0 of the DNS roadmap. #2 Shared Cloudflare client (app/services/dns/): DnsCredential + DnsRecordSpec + CloudflareClient. Both DNSProviderService and DNSZoneService delegate to it, so auth (scoped token / global key), the CAA structured-data wire format, MX/SRV priority parsing, and idempotent upsert live in one place. Fixes dup-on-recreate, silent update/delete no-op, and missing proxied/priority on the provider path. #1 Single credential source: new FK dns_zones.dns_provider_config_id (migration 025) + DNSZoneService._resolve_credential (linked -> auto-discover-by-domain -> legacy inline-token). create_zone accepts a connection id; link_legacy_zones() converges inline tokens onto encrypted connections at boot. The /dns create-zone modal now picks a connection instead of pasting a token. DDNS rides it for free. Tests: test_dns_cloudflare_client.py, test_dns_credential_resolution.py. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>