-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC6249: Metalink/HTTP: Mirrors and Hashes #179
Comments
I love (B). Brave could remember that for visited websites and fetch automaticaly via IPFS if the source website is down. Should probably be opt-in. (A) could also enable torrent websites to indicate that the file is also available on IPFS. If they do, some people should be able to (aka: will) make indexes of equivalence between torrent haches and ipfs CIDs. Torrent clients could then choose trustworthy indexes to rely on, and multiply sources of fetching (even though you can't download partly from Bittorrent and partly from IPFS, alternative sources could be useful for poorly seeded files). (D). A website like DTube could point at peers having requested the file recently, so they can seed from each other and offload the server. The server would then act more as a coordinator and a last-resort seeder rather than the main provider). Similar to (B), but with the extra step of explicitely giving lilely providers to accelerate the discovery step of IPFS fetching. |
See also ipfs/ipfs-companion#1013, in the same spirit it would be nice to have a way to indicate these headers directly in the HTML ( |
RFC6249 enables metalink hints to be returned as HTTP response headers:
Ideas how to use this on HTTP Gateways
Having this as part of HTTP spec makes it much easier for us to implement things which we always wanted, but did not want to invent IPFS-specific proprietary semantics. Below is a short list with the most obvious things, but comments with additional ideas are welcome.
(A) Return hash in
Digest
field to use HTTP-native semantics to enable verifiable gateway response (#128)If we are returning a small file that fits in a single IPFS block, and was hashed with SHA (or other function supported by the web platform) we could return it as-is.
We could also return raw Multihash or a CID of entire DAG. Details would have to be determined around our plans to standardize Multihash before CID etc, broad brush strokes around something like (either MH or CID):
(B) URI hint that the content is available on IPFS
Opening https://en.wikipedia-on-ipfs.org/wiki/ would return mutable and immutable links to content on IPFS:
To facilitate automated fallback, the list of supported formats (ipfs/kubo#8234) could be included as well.
For example, a
dag-cbor
CID could have:(C) URI hint that the content is available on other Peered gateways
go-ipfs already has a concept of Peering, which means friendly peers can add each other to
Peering
section in config and that will ensure they are always connected to each other and can engage in bitswap without the need of DHT.I believe we could add opt-in field for a name of a subdomain gateway backed by a peer, and when present, return
Link
header for each "peered gateway".For example, if
dweb.link
was peered withcf-ipfs.com
(Cloudflare),example.com
andexample.net
, response for https://bafybeiemxf5abjwjbikoz4mc3a3dla6ual3jsgpdr4cjr3oz3evfyavhwq.ipfs.dweb.link could include:The text was updated successfully, but these errors were encountered: