ipfs / in-web-browsers

Tracking the endeavor towards getting web browsers to natively support IPFS and content-addressing
https://docs.ipfs.tech/how-to/address-ipfs-on-web/
MIT License
349 stars 29 forks source link

Leveraging ws://localhost provided by local IPFS node #177

Open lidel opened 3 years ago

lidel commented 3 years ago

So js-ipfs running on a web page loaded via https:// is able to connect to ws://localhost:port provided by IPFS node running on the same machine as browser – PoC in https://github.com/ipfs/go-ipfs/issues/5251#issuecomment-767909144

We could enable WS transport in IPFS Desktop / Brave, but not sure how to leverage it in js-ipfs. This feels related to some prior discussions in https://github.com/ipfs/js-ipfs/issues/3022 and work made by @Gozala, but is also bit brittle (eg. localhost WS dials can be blocked for security reasons)

Open questions:

lidel commented 2 years ago

WebTransport (https://github.com/libp2p/specs/pull/404) could provide an interesting alternative here, but TBD if browser vendors will allow using it in localhost / LAN contexts.