-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
How to open websocket connection? #3907
Comments
You need:
I have a work-in-progress branch which simplifies this a bit, but that's the setup for now. |
Ok thanks @lgierth this was helpful:+1: |
@lgierth Hi Lars I'm trying to do this to get my js-ipfs browser client directly talking to my go-ipfs node, and this thread is the only place I can find guidance on how to do this. I tried it but it doesn't work, I must be missing a piece. The go-ipfs node is on AWS and has public IP 18.XXX.XX.XXX and private/internal IP 172.XX.XX.XX.
I addd the /ws address as instructed. I assume this makes the node listen via a web socket on 4002. I have nginx set up with a certificate made via certbot with the following config: ` server {
} ` Is this port forwarding being done correctly as you have described? The last piece of the puzzle is the ipfs-js config in the browser. I've tried adding many addresses in the creation of the node like so:
But really I don't really know what would go here. I keep getting "NotFoundError"...but I know for a fact that this hash is on my go-ipfs node. Your help would greatly be appreciated!!! |
Would really appreciate if someone can point to how a client can establish webSocket connection to a node, and gateway. Any examples would be very helpful. |
@KrishnaPG please ask on the forums (https://discuss.ipfs.io) and tag me. When you do, please expand on what you mean by "establish a webSocket connection" (connect to the API? gateway? libp2p?). |
would it be possible to have a config option in the go-ipfs which sets a TLS hostname, and then if that is set to have the go code set up a wss handler using a lets-encrypt cert, much along the lines of how this example sets out automatic cert obtaining? (example: https://blog.kowalczyk.info/article/Jl3G/https-for-free-in-go-with-little-help-of-lets-encrypt.html), so as to make this automatic and NOT need to set up nginx to support allowing the browser js-ipfs to connect to my go-ipfs? |
Is it possible to open websocket connection on go-ipfs node, and how?
I would like to setup something like:
'/dns4/ams-1.bootstrap.libp2p.io/tcp/443/wss/ipfs/QmSoLer265NRgSp2LA3dPaeykiS1J6DifTC88f5uVQKNAd'
The text was updated successfully, but these errors were encountered: