Consolidiffication of DNS requests for a host. #1034
Labels
kind/enhancement
A net-new feature or improvement to an existing feature
status/ready
Ready to be worked
TL;DR:
While implementing DNS over Tor for anonymity we faced the impossibilities to proxy the DNS requests made by libp2p and libs using it, we should try to fix that.
Current status
I've identified 3 resolver spots and each one has a problem :
basichost#Host.maResolver
: no codepath available to set it with a customDialFunc
or resolver, underused.go-dnslink#defaultResolver
: no codepath available to set it, unsafe to set (racy), mixed Parser + Resolver objectgo-multiaddr-dns#DefaultResolver
: unsafe to set (racy)Proposed changes
Important (non breaking, or minor breaking):
go-multiaddr-dns#DefaultResolver
as backend.Need more discussion:
DNSResolver
options togo-libp2p#New
, this would sets thebasichost#Host.maResolver
with a custom*madns.Resolver
as argument.host#Host
When we came to a consensus about that I'll be happy to implement it (I'll probably throw an ugly api and many replace go.mod rules since).
The text was updated successfully, but these errors were encountered: