Get started
mix-dns resolves hostnames over DNS-over-HTTPS (DoH), carried through the Nym mixnet. The browser client opens the TLS session and terminates it at the resolver, so the mixnet hides your network address while the encrypted query hides the hostname from everything in between, the Nym exit included. Only the resolver reads the hostname, and it sees the query arrive from the exit, not from you.
Installation
npm install @nymproject/mix-dnsESM only, with the worker and WASM inlined via mix-tunnel; no bundler config needed.
Quick start
import { setupMixTunnel, mixDNS, disconnectMixTunnel } from '@nymproject/mix-dns';
await setupMixTunnel();
const ip = await mixDNS('example.com');
console.log(ip); // e.g. an IPv4 address string
await disconnectMixTunnel();mixDNS returns the first resolved address as a string: an IPv4 A record when available, otherwise IPv6. It rejects if the hostname cannot be resolved. To resolve and immediately use the result via mixFetch, the simpler path is to skip mixDNS entirely and call mixFetch('https://example.com'), which handles resolution itself.
Resolve hostnames live in the mixnet playground, with a tunnel-vs-clearnet (DoH) comparison.