any plans to add websockets support ? #1
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Created by: gedw99
this is really cool
I found yours by accident after looking at this: https://github.com/ripienaar/nats-roundtripper/blob/main/caddy-middleware/README.md
Basically I am using golang WASM client GUI like here:
https://github.com/gioui/gio-example
and they want to use HTTP and Websockets to talk to a "server".
SO i want to let them talk to the NATS Proxy ( like this one), and because NATS understands HTTP and Websockets, just proxy all the stuff through to a backend golang microservice that supports NATS golang client.
maybe your intend is a bit different ?
Created by: jar3b
@gedw99, hello! I use this solution in my current work to provide communication scheme like this:
My problem is getting access to internal organization resources (in LAN behind NAT) from own cloud. For example:
.net SOAP client
needs access to resourcehttp://private-org-svc.local
located inLocal Network 1
..NET wsdl client
is configured to use http://http-nats-proxy:8080 (this is service inside k8s cluster) as default HTTP/HTTPS proxy..NET wsdl client
sets some HTTP Header identifier whichAgent
in private LAN need to be used..NET wsdl client
sends http message tohttp-nats-proxy
, it converts request to NATS request (using this repo) and sends this request to specificAgent
(detecting it by HTTP header) in organization network.Agent 1
(written in .net core) decodes NATS request and converts it to HTTP request then sends to organization resource server.http-nats-proxy
is the service uses this repo and https://github.com/rainforestapp/mitm, and performs request-response handling.So, for my case, I only need an HTTP/HTTPS proxy, maybe (in future) a websocket if I need access to a websocket resource behind NAT in a private network.
To summarize, sorry, - unfortunately, it's unlikely that i will implement support for websockets in near future. Also, the websocket support that I probably need needs to be implemented in a slightly different way: first of all in a mitm proxy and then possibly in the
RoundTripper
.Created by: gedw99
hey @jar3b thanks an awesome rundown - really awesome ...
Maybe i can just use SSE then, since it runs over HTTP, and not bother with websockets. DO you think SSE wil work over your nats-transport ?
SSE works everywhere now :https://caniuse.com/eventsource
The nats.go gets and sets the data into Nats Server.