Skip to content

Conversation

@lidel
Copy link
Member

@lidel lidel commented Jan 12, 2026

Warning

Parking this for now, something to pick in spare time.

This PR adds DNS.OverrideSystem flag (enabled by default) that extends DNS.Resolvers to affect all DNS lookups in the daemon process, not just DNSLink and Multiaddr resolution.

Approach A: thin adapter that turns Multiaddr resolver back to net.Resolver

Warning

Do Not Merge

This is an exploration of how DNS configuration can be applied daemon-wide without refactoring boxo/gateway. A future improvement may create a native net.Resolver from config first, and convert it to Multiaddr DNS resolver only when passing to go-libp2p, which would be a cleaner architecture.

this ensures AutoTLS ACME DNS-01 challenge verification, HTTP retrieval, and third-party library code all respect DNS.Resolvers config.

implementation creates a net.Resolver bridge that intercepts DNS wire protocol queries, parses them with miekg/dns, calls madns.Resolver, and returns properly formatted DNS responses.

note: this is an exploration of daemon-wide DNS configuration without refactoring boxo/gateway. a cleaner future approach may create native net.Resolver from config first, then convert to madns only for go-libp2p.

Approach B: cleanup boxo/gateway, extract boxo/dns

Pay off technical debt, use native GO type as first-class citizen for DNS.Resolvers, and only do ma one when passing to go-libp2p. Use native type for everything else, and override global net.Resolver

adds DNS.OverrideSystem flag (enabled by default) that extends
DNS.Resolvers to affect all DNS lookups in the daemon process,
not just DNSLink and Multiaddr resolution.

this ensures AutoTLS ACME DNS-01 challenge verification, HTTP retrieval,
and third-party library code all respect DNS.Resolvers config.

implementation creates a net.Resolver bridge that intercepts DNS wire
protocol queries, parses them with miekg/dns, calls madns.Resolver,
and returns properly formatted DNS responses.

note: this is an exploration of daemon-wide DNS configuration without
refactoring boxo/gateway. a cleaner future approach may create native
net.Resolver from config first, then convert to madns only for go-libp2p.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants