mirror of
https://github.com/jason5ng32/MyIP.git
synced 2026-11-04 18:23:27 +00:00
whoiser's port-43 WHOIS path returns empty for newer gTLDs (.ing /
.app / .dev / …) that expose RDAP only. Keep whoiser as the primary
path — it still returns richer multi-provider text for legacy gTLDs
like .com / .us — and fall back to a minimal in-house RDAP client
(common/rdap.js) when whoiser produces no __raw for any provider.
The fallback:
- loads IANA's TLD → RDAP endpoint map (data.iana.org/rdap/dns.json)
with a 24h in-memory cache
- issues one RDAP GET via fetchUpstream (5s cap)
- formats the RDAP JSON into a WHOIS-like text block (status, events,
entities-by-role with vCard name / email / address, nameservers,
DNSSEC)
- returns the same { [host]: { __raw, ... } } shape as whoiser.domain()
so the frontend Accordion renders it with zero changes
IP queries stay on whoiser only — regional IP WHOIS servers are
widely reachable and RDAP adds no coverage there.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>