crazysoldier / ipfs-browser

8 stars 3 forks source link

remove the gateway prefix in link bar #2

Open jbenet opened 8 years ago

jbenet commented 8 years ago

(this is great!)

if you control the URL bar, remove the gateway address.

We've been looking at doing this for a while, and releasing at as a protocol handler for fs:, ipfs:, and web+ipfs:. (see https://github.com/ipfs/go-ipfs/issues/1678) the short of it is:

Browsers should show URIs like:

# immutable uris
/ipfs/<hash>/<path>
/ipfs/QmZGLUEabKFv85MiDJAHCYuVRGzW23z6ieWyGsTi6FFBnu
/ipfs/QmZGLUEabKFv85MiDJAHCYuVRGzW23z6ieWyGsTi6FFBnu/vm/Makefile
/ipfs/QmTgNJEgQaCqRht9KSXNyZsCp2xpHZmBRms28NRMmtcERp/docs/install

# mutable key uris
/ipns/Qmbatr97vqpmrXg6tubdpUBwJrLzvYPHe9vS7xc9b7y3nk
/ipns/Qmbatr97vqpmrXg6tubdpUBwJrLzvYPHe9vS7xc9b7y3nk/vm/Makefile

# mutable dns uris
/ipns/ipfs.io
/ipns/ipfs.io/docs/install

Browsers should redirect (or rewrite) URIs like:

# gateway prefixed URLs (configurable in a list)
https://ipfs.io/ipfs/<anything>        --> /ipfs/<anything>
https://ipfs.io/ipns/<anything>        --> /ipns/<anything>
http://localhost:8080/ipfs/<anything>  --> /ipfs/<anything>
http://localhost:8080/ipns/<anything>  --> /ipns/<anything>

# scheme prefixed URIs  (trim multiple leading /)
fs:<anything>       --> <anything>
ipfs:<anything>     --> <anything>
web+ipfs:<anything> --> <anything>
web+fs:<anything>   --> <anything>
nicola commented 8 years ago

++!

crazysoldier commented 8 years ago

Ok im back for review, thanks for the feedback :+1:
next steps: redirect like you said, than an bookmarks toolbar.