js-libp2p
js-libp2p copied to clipboard
Unclear setup/instructions for rendezvous server behind SSL
- Version:
0.27.x - Platform:
nodejs
Type:
Enhancement
Severity:
Very Low
Description:
See https://github.com/libp2p/js-libp2p-webrtc-star/issues/238, https://github.com/libp2p/js-libp2p-webrtc-star/issues/180. In short, for being able to quickly start with the libp2p-in-the-browser demo, one needs to start a signaling start server. Locally, these instructions are pretty clear, but on any other setup (i.e. online demo like Stackblitz or Glitch), this is not obvious, particularly when behind SSL. A warning label in the README would be enough, in addition to the URLs of the existing servers ready to use.
As anadditional note, it would be useful to have a status dashboard for the existing servers (i.e. https://wrtc-star2.sjc.dwebops.pub/, https://wrtc-star1.par.dwebops.pub/) as to know the status of these ones for running demos online.
Steps to reproduce the error:
- Clone https://github.com/libp2p/js-libp2p and switch to branch
0.27.x - Go to the libp2p in the browser example.
- Change the start function inside
package.jsonfromparcel index.htmltoparcel index.html --https - Run signaling server with
npm run serverand application withnpm run start - Open browser and see mixed content error.
@jacobheun @vasco-santos I've described in https://github.com/libp2p/js-libp2p-webrtc-star/issues/238 how to deploy a wrtc-signaling-star server behind SSL, which can then be used by an online application. To demonstrate this, I went ahead and created a Glitch demo with the libp2p-browser-demo code in this repo using 0.27.x. You can see it running on https://libp2p-browser-demo.glitch.me/ (takes a bit to load, cloud stuff doing p2p stuff, yay).
Glitch has some cool features, like their Remix button which looks something like this:
Clicking on that one will allow anyone in Glitch to create their own “fork” of the project, bringing the “time for demo” to seconds. This setup can likely be replicated in Stackblitz and Codesandbox, but I haven't tried those. I know that @xpepermint from 0xcert used those some time ago (see one of their examples). Maybe we could have more libp2p online demos for beginners?
Closing as these transports have been deprecated, please migrate to the https://github.com/libp2p/js-libp2p/tree/master/packages/transport-webrtc transport