Leveraging ws://localhost provided by local IPFS node
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:
- How useful this is today? Perhaps should we park this until IPFS nodes can rebroadcast WANT messages, we have a concept of superodes, or delegated downloads
- Could localhost WS be added to bootstrap list? How would it work without knowing PeerID upfront? (this is not a
/dnsaddrthat we can resolve)
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.