DNS query API is ready (ipfs/kubo#1054 (comment)) which means we could implement it as a part of #16 effort.
While user browses the web addon should query API regarding newly discovered hostnames and load site resources from IPFS if dnslink is present (and custom gateway redirect is enabled) – 037ea98
Initially it should be an experimental feature (disabled by default) – 037ea98
API responses should be cached in-memory for some time – 49a00cc
Note that we redirect to /ipns/ address and ignore dnslink path from DNS. Thanks to this, we can cache DNS responses for a long time.
It is up to the gateway to get the latest version
Tests
Do not cache dnslink lookup when API is offline – 2c37516
- based on functionality from legacy-sdk branch (see issue #44)
- DNS lookups are stored in LRU Cache
- does not redirect on initial cache miss (room for improvement)
- disabled by default (in current form degrades browsing performance)
lidel commentedJan 13, 2016
DNS query API is ready (ipfs/kubo#1054 (comment)) which means we could implement it as a part of #16 effort.
dnslinkis present (and custom gateway redirect is enabled) – 037ea98/ipns/address and ignore dnslink path from DNS. Thanks to this, we can cache DNS responses for a long time.It is up to the gateway to get the latest version
Site with
dnslink:GET http://localhost:5001/api/v0/dns/ipfs.io{"Path":"/ipfs/QmSrk8wCZ9oUgSCxJq4TXyJnPBYfoLDpKLGn7hLPNzauVX"}Site without
dnslinkinTXTrecord:GET http://localhost:5001/api/v0/dns/google.com:{"Message":"could not resolve name.","Code":0}The text was updated successfully, but these errors were encountered: