Open lidel opened 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?
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.
I think we will end up with a set of tests that work together.
Some ideas:
window.location.href
(crude test: if it is different than hard-coded domain, we can guess that someone is using ipfs-companion and redirect loaded it from a custom gateway)window.location
?)/api/v0/version
– it should be available on every HTTP gateway: http://127.0.0.1:8080/api/v0/version
(we probably need to exclude public one at https://ipfs.io/api/v0/version 🙂 )window.ipfs
present?Some prior art from @VictorBjelkholm
https://ipfs.io/ipfs/QmcVc8eQiWkR23wMKiQjipLRSjCxR1FEj4TL99aY89J83d
Via https://github.com/ipfs/in-web-browsers/issues/42#issuecomment-281382909
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 :)
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 safercheck.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: