Closed lidel closed 12 months ago
Fwiw, proof of concept of binary DNS query over HTTPS in a browser, https://gist.github.com/stskeeps/d64d01f1ed42402405e294e5806f0970. -- one thing to keep in mind is that for example Google's doesn't give proper CORS headers
js-ipfs is being deprecated in favor of Helia. You can learn more about this deprecation and read the migration guide.
Please feel to reopen with any comments by 2023-06-02. We will do a final pass on reopened issues afterwards (see https://github.com/ipfs/js-ipfs/issues/4336).
This sounds like something we may want to consider in helia/libp2p if it's not already resolved. I'm not sure of the status, pinging @achingbrain
This is still todo: https://github.com/ipfs/helia-ipns/blob/main/packages/ipns/src/utils/resolve-dns-link.browser.ts#L48
This issue can be moved to https://github.com/ipfs/helia-ipns/
Do we want to use https://github.com/vasco-santos/dns-over-http-resolver here?
Type: Feature
Severity: Low
Problem
When running in Node, js-ipfs uses system resolver (
/etc/resolv.conf
)When run in web browser context, we don't have access to UDP sockets, so since https://github.com/ipfs/js-ipfs/pull/1172 js-ipfs running on webpages delegates DNS queries to
https://ipfs.io/api/v0/dns?arg=${domain}
.Solution
jsipfs config DNS.HttpsResolvers ["https://mozilla.cloudflare-dns.com/dns-query"]
https://ipfs.io/api/v0/dns
which is a single point of failureRFC8484: Notes on binary format and
@hugomrdias's recent work on IPNS over DNS confirmed we are able to use binary DNS over HTTPS in web browser context, which makes it possible to use any DNS over HTTPS (DoH) server compatible with RFC8484
I repeat: we should not need to use proprietary JSON format supported by Google and Cloudflare, but rely on native DNS query sent as HTTP GET encoded in Base64, as specified in example in RFC8484. This enables users to have better choice of DNS servers with DoH support: any server will do, as long it implements RFC8484.
References