dappnode / DAppNode

General repository of the project dappnode
GNU General Public License v3.0
581 stars 99 forks source link

IPFS Gateway for Brave (with Origin isolation enabled) #406

Open vorburger opened 2 years ago

vorburger commented 2 years ago

When I first set up DAppNode my Brave browser on my brave://settings/ipfs had a Brave local IPFS node.

My environment is a Home LAN with manually configured port forwarding, so DAppNode has some ports exposed, but no full public IP.

It seemed to me that that Brave's IPFS interfered with DAppNode's IPFS. Do you know if that's possible? (Given that they are both behind the same public IP in this kind of set-up.)

So I played with making DAppNode the IPFS Gateway for Brave. But at least so far that doesn't really work, when I switch brave://settings/ipfs from Brave local IPFS node to Gateway, and change the IPFS public gateway address from the default https://dweb.link to http://dappnode:8080 (without VPN, but I've mapped port 8080 on http://dappnode.local/#/packages/ipfs.dnp.dappnode.eth/network). But this doesn't quite work, because Brave doesn't accept that, due to Only a valid IPFS gateway with Origin isolation enabled can be used in Brave.

Would it be useful to get this working? Or am I overthining this and this is supposed to "just work", by letting Brave local IPFS node on a workstation on the LAN, and it will automagically peer with the DAppNode's IPFS, so all good and really no need to use DAppNode as a IPFS Gateway?

┆Issue is synchronized with this Basecamp todo by Unito

vorburger commented 2 years ago

I think I may have figured this out... so this seems to be related to https://github.com/brave/brave-browser/issues/16999?

Meanwhile I have the VPN set up, and have had to add the 8080 port mapping for the gateway; should that perhaps be open by default?

Now I can set http://ipfs.dappnode:8080/ instead of the default https://dweb.link as IPFS public gateway address (and Gateway as Method to resolve IPFS resources on brave://settings/ipfs, see Brave's documentation.

With that, going e.g. to https://ipfs.io takes me to http://ipfs.tech.ipns.ipfs.dappnode:8080! 🚀

https://ipfs.dappnode:8080 as Gateway doesn't work yet; I'll still have to learn more about how to use https://github.com/dappnode/DNP_HTTPS.

Should this issue be filed on https://github.com/dappnode/DNP_IPFS/issues?