MetaMask / metamask-extension

:globe_with_meridians: :electric_plug: The MetaMask browser extension enables browsing Ethereum blockchain enabled websites
https://metamask.io
Other
11.84k stars 4.83k forks source link

Preserve URL when visiting IPFS or ENS pages #9353

Open danfinlay opened 4 years ago

danfinlay commented 4 years ago

Chromium has introduced the new protocol prefix handlers

This is an API that allows a webextension to handle protocols with dweb prefixes like ipfs, ethereum, ssb, and more!

You can learn to use them here.

Gudahtt commented 3 years ago

Related: #7740

As discussed in this comment, we may be able to do this with the proxy permission as well (that was how the other IPFS extension we analyzed implemented it IIRC).

gerbz commented 2 years ago

@danfinlay If you don't want to keep track of which browsers support which protocols (ipfs://, ipns://, ens://, etc.), there's an interim solution using INPS and the same public gateway already supported by MetaMask.

MM current behavior redirects like this: vitalik.eth -> https://bafybeibc7nsbhktzjvplpi4qmzk7kd22yqol3v4thpbhp5yzfspcc56hsi.ipfs.dweb.link/

However this also works while preserving the ENS domain somewhat: vitalik.eth -> https://vitalik-eth.ipns.dweb.link

Brave browser handles it this way already for ipns://vitalik.eth when IPFS is set to use a public gateway.