INFURA / infura

Official Public Repository for INFURA
https://infura.io
380 stars 62 forks source link

IPFS: Enabling WebSocket (and WebSocket Secure) for js-ipfs (Brower) Interoperability #101

Open 5310 opened 6 years ago

5310 commented 6 years ago

If it's an acceptable use-case, I would like to request interoperability between js-ipfs (browser) nodes and the Infura node.

At the moment, the only way js-ipfs browser nodes can connect to go-ipfs nodes is via WebSocket. go-ipfs does support the WebSocket transport as is, if enabled in the config. The current Infura go-ipfs node only configures the TCP transport over IPv6, (which I assume is made to work with IPv4 with an endpoint proxy already in use.)

But browsers only allow pages loaded securely to connect to WebSocket Secure, which go-ipfs currently does not (cannot?) support natively. So, on top of enabling the transport, something needs to wrap that endpoint with a valid SSL setup.

The official issue regarding this matter suggests running nginx as an example proxy. Presumably, the endpoint proxy already in use can also serve that purpose.

ncocchiaro commented 6 years ago

Interesting, it's not something we offer at the moment, as you noted, but certainly something we can look into.