Ipfs-companion: Redirect opt-out per website

Created on 6 Dec 2018  Â·  9Comments  Â·  Source: ipfs/ipfs-companion

When using things such as riot (matrix client) that rely on the domain to separate logins it gets very annoying to have to turn off ipfs-companion to avoid redirection to the local gateway (which would cause riot to use a completely different account than when it's served from the intitial domain).
It would be nice to be able to blacklist certain domains from being redirected to the local gateway.

kinenhancement exnovice

Most helpful comment

I think a button in the popup saying "Don't use local gateway" that when toggled adds a line to a textarea in the _Preferences_ screen. i think this is somewhat like what uBlock Origin does.

All 9 comments

This sounds useful and easy to add.
Would appreciate some feedback:

  • What would be the intuitive UI for adding a website to redirect opt-out list?

    • A list of hostnames on _Preferences_ screen?

    • A button in browser action?

    • How to name this feature? ("Redirect opt-out"?)

I think the preferences screen is suitable, and maybe "Gateway redirect blacklist"?

Maybe while you're at it add an option for whitelist as well? The user would then have radio buttons for choosing between "Filter: None, Blacklist, Whitelist".

I think a button in the popup saying "Don't use local gateway" that when toggled adds a line to a textarea in the _Preferences_ screen. i think this is somewhat like what uBlock Origin does.

When IPFS times out, the user should be prompted to temporarily disable it for the current domain (24 hours?) and be redirected back to the web version.

Some websites should possibly be on the blacklist by default …

  • *.neocities.org (public; but their nodes have been broken since 2017-11; hosts large number of websites)
  • *.shiftproject.com (private network; source)
  • *.mrh.io (private network; source)

Privacy Badger as a prior art:

2019-01-20--23-01-17

I think the second button is quite valuable. We could enable it on Beta channel only, and make it open https://github.com/ipfs/ipfs-companion/issues/new with site URL pre-filled in description.

Note to self:

  • As noted in #662, subresources are easy to detect, and can be linked to specific "parent URL". We can apply rules of the root document to all sub-resources, even if those are loaded from different Origins. For example, if we disable redirect for d.tube, it should be disabled for d.tube but also iframes loaded from emb.d.tube and third party hostnames foo.bar.buzz.tld, solving the problem of "breaking DTube".

  • Research how feasible is an experiment to make global exception for image, audio and video sub-resources by looking at ResourceType

WIP in https://github.com/ipfs-shipyard/ipfs-companion/pull/687 – just pushed the first stab at UX, would appreciate feedback, thanks!

Ready for testing: v2.7.5.748 (Beta)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fsdiogo picture fsdiogo  Â·  3Comments

lidel picture lidel  Â·  5Comments

lidel picture lidel  Â·  3Comments

samuelmaddock picture samuelmaddock  Â·  5Comments

lidel picture lidel  Â·  3Comments