Skip to content
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

Create Check Page for Distributed Web #61

Open
lidel opened this issue Dec 1, 2017 · 5 comments
Open

Create Check Page for Distributed Web #61

lidel opened this issue Dec 1, 2017 · 5 comments
Labels
demo status/ready Ready to be worked ux

Comments

@lidel
Copy link
Member

lidel commented Dec 1, 2017

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:

  • it would make it easier for non-technical people to test connectivity
  • IPFS-enabled browsers could have it as a default staring page
  • browser extension could have "test connectivity" button on Preferences screen that opens it for a quick test
  • having a well known, neutral connectivity test simplifies making various demos and decreases cognitive load on the audience
@lidel
Copy link
Member Author

lidel commented Dec 5, 2017

Idea 1) Perhaps we could reuse designs made by @nunofmn for ipfs/ipfs-companion#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?

@daviddias daviddias added the status/ready Ready to be worked label Dec 13, 2017
@olizilla
Copy link
Member

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?

  • URL - ipfs://QmHash
  • URI - dweb:/ipfs/QmHash
  • NURI - /ipfs/QmHash

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
Copy link
Member Author

lidel commented Dec 14, 2017

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)
  • Address bar (is there a dedicated API for accessing it in Brave? or is via window.location ?)
  • To remove false-positives from gateway detection, we can send a XHR to /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 🙂 )
  • Is window.ipfs present?

@olizilla
Copy link
Member

Some prior art from @victorbjelkholm

https://ipfs.io/ipfs/QmcVc8eQiWkR23wMKiQjipLRSjCxR1FEj4TL99aY89J83d

Via #42 (comment)

@singpolyma
Copy link

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
demo status/ready Ready to be worked ux
Projects
None yet
Development

No branches or pull requests

4 participants