Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Secure Websocket proxy nginx -> IPFS node #8

Open
BladeMcCool opened this issue Apr 2, 2021 · 0 comments
Open

Secure Websocket proxy nginx -> IPFS node #8

BladeMcCool opened this issue Apr 2, 2021 · 0 comments

Comments

@BladeMcCool
Copy link
Owner

BladeMcCool commented Apr 2, 2021

I would like to be able to have the browser js-ipfs code directly connect to a server that has a bit more stable and consistent connectivity. I also believe having this working is a prerequisite to getting pubsub to work between go-ipfs and js-ipfs, which I would eventually like to employ to push rapid updates to connected clients.

As part of the server functionality it includes a go-ipfs node that is needed to be running. The js-ipfs code in browser is capable of connecting to go-ipfs nodes via SECURE websocket due to the browser security model. The go-ipfs out of the box does not support TLS websocket. SOooooo we have to set up nginx as a reverse proxy on /wss path and proxy to the /ws path for the IPFS node. There are some guides out there, I will find more details and put here as I get closer to thinking about actually tackling this.

I believe the gist was

  • set up nginx in the docker
  • set up this nginx to get letsencrypt TLS cert
  • reverse proxy /wss to /ws on the IPFS node
  • ipfs node configuration has to enable the ws but adding some special thing in the config, which I can't recall
    • “/ip4/127.0.0.1/tcp/4003/ws" in the swarm list .... or something like that.

some more info:
ipfs/kubo#3907
ipfs/kubo#5251

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant