Using Kubo as middleman for browser Helia nodes

I found your post because I had the same question. I have doubts that this can be accomplished with Kubo. (I am not sure at all)

So far it was never possible to use Kubo as a WebRTC-star or relay for browser nodes. Kubo doesn鈥檛 speak WebRTC at all. You always needed a dedicated (and centralized) WebRTC-star service node. As far as I remember, you could use it as Websocket relay but this had to be done with wss (e.g. ssl via nginx proxy) instead of ws (in case it is not running on the local machine).I I thought, I had this working last year, but for some reason either something changed with Kubo or Helia or something else was breaking inbetween. So probably Helia isn鈥檛 doing the WebRTC-star anymore as js-ipfs was doing it before. (only an assumption)

With the latest version of Kubo from yesterday v0.24.0 WebRTC-direct should be possible in case the WebRTC peer is not behind firewall or router as they write. (a mobile phone might work, but they are working on it). I guess kubo has released some tests here if you want to dig into it.
Release v0.24.0 路 ipfs/kubo 路 GitHub.

Your first question, your config cannot be correct, because WebRTC is not possible.

  1. traditionally WebRTC and WebRTC-direct can be used only between browser peers and with Helia running on NodeJS.

As far as I understand, you still need a special relay service in order to accomplish what you want to do:

E.g.:

  1. https://github.com/libp2p/js-libp2p-examples/tree/main/examples/js-libp2p-example-browser-pubsub. (unfortunately firefox doesn鈥檛 seem to work - see and run the tests, I couldn鈥檛 find the reason)
  2. this is an example where you can use circuit-relay instead of ws wait for helia1 to listen on WebRTC and use multiaddr-matcher to find correct address by achingbrain 路 Pull Request #2 路 haydenyoung/helia-browser 路 GitHub

So as you can see, you touched the current front line of Helia/Kubo developments and those are the questions probably all are working on at the moment. As soon it is working, this will be amazing.

You can setup a dedicated public relay service as in the above examples until its working with Kubo. This might be the thing I am going to do now. I鈥檒l keep you updated as in case or as soon as I have better information.

1 Like