ipfs/ipfs-companion

Connect to known providers if dnsaddr exist for redirected gateway

Open

#925 opened on Sep 29, 2020

View on GitHub
 (0 comments) (5 reactions) (0 assignees)JavaScript (1,992 stars) (364 forks)batch import
P2effort/daysexp/wizardhelp wantedkind/enhancement

Description

Capturing suggestion from https://github.com/filecoin-project/slate/issues/342#issuecomment-700948648

companion could look up a dnsaddr record for the domain when it encounters IPFS urls. So slate.host could have a txt record like /dnsaddr/slate.host/tcp/4001/ipfs/QmNodeyNodeNode and while it redirects [slate.host/ipfs/..] requests to the local daemon, also try and connect to the suggested peer, to help with situations where it is difficult to publish all the provider records to the dht.

Initial thoughts:

Alternative explanation:

yes, so its like a hint for user agent that is about to load content from public gateway, and instead wants to use native IPFS. user agent reads DNS TXT record for that public gateway and learns its multiaddr, and loads data from IPFS + preconnects to that gateway in best-effort fashion.

rationale is: if someone linked to that gateway, that gateway's ipfs datastore most likely has the data, so it makes sense to preconnect to it

Contributor guide