ipfs / in-web-browsers

Tracking the endeavor towards getting web browsers to natively support IPFS and content-addressing
https://docs.ipfs.tech/how-to/address-ipfs-on-web/
MIT License
349 stars 29 forks source link

Create Check Page for Distributed Web #61

Open lidel opened 6 years ago

lidel commented 6 years ago

The Tor project has a simple page that can be used to reliably determine if one is using Tor network or not: https://check.torproject.org

I think we should have a similar page (at check.ipfs.io or safer check.dweb.link). I imagine it as a static HTML + JS with heuristic tests that reliably determine if the page itself was loaded over HTTP or IPFS (be it web extension, HTTP gateway etc)

Rationale:

lidel commented 6 years ago

Idea 1) Perhaps we could reuse designs made by @nunofmn for https://github.com/ipfs/ipfs-companion/issues/324 here ? This "Check Page" would serve similar purpose to the post-install Landing Page in browser extension: connectivity check + next steps / learning materials.

Idea 2) What if we keep wording/design generic enough to use original "Check Page" in extension?

olizilla commented 6 years ago

I'm happy to build a page for this. Any ideas how to test for it? I feel like "how did i get here?" isn't the sort of info that the rendered page has access to.

Would we settle for checking the address bar for one of the ipfs address formats?

It feels along way from reliable, but I can't think of anything else, without having something injected into the response. There is work underway to have window.ipfs be available on all pages when ipfs-companion is running, so that could be part of it, but that's much more specific.

I'm using http://ipfs.io/ipfs/QmP2yCrvuL89kgCxtt5vXfPMt89PtidxQ8yKTr86gtYZd4 for testing the brave integration work... so i do see the need for some kind of simple test page.

lidel commented 6 years ago

I think we will end up with a set of tests that work together.

Some ideas:

olizilla commented 6 years ago

Some prior art from @VictorBjelkholm

https://ipfs.io/ipfs/QmcVc8eQiWkR23wMKiQjipLRSjCxR1FEj4TL99aY89J83d

Via https://github.com/ipfs/in-web-browsers/issues/42#issuecomment-281382909

singpolyma commented 6 years ago

Just serve a page over HTTP that says "No" and add a page to IPFS with dnslink on that domain that says "Yes" -- no javascript needed :)