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: 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 ?
@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 resource http://private-org-svc.local located in Local 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 which Agent in private LAN need to be used.
.NET wsdl client sends http message to http-nats-proxy, it converts request to NATS request (using this repo) and sends this request to specific Agent (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.
Resource server returns HTTP response, ..., data backs to .NET wsdl client.
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: 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 resource `http://private-org-svc.local` located in `Local Network 1`.
1. `.NET wsdl client` is configured to use http://http-nats-proxy:8080 (this is service inside k8s cluster) as default HTTP/HTTPS proxy.
2. `.NET wsdl client` sets some HTTP Header identifier which `Agent` in private LAN need to be used.
3. `.NET wsdl client` sends http message to `http-nats-proxy`, it converts request to NATS request (using this repo) and sends this request to specific `Agent` (detecting it by HTTP header) in organization network.
4. `Agent 1` (written in .net core) decodes NATS request and converts it to HTTP request then sends to organization resource server.
5. Resource server returns HTTP response, ..., data backs to .NET wsdl client.
`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`.
The nats.go gets and sets the data into Nats Server.
*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.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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 clientneeds access to resourcehttp://private-org-svc.locallocated inLocal Network 1..NET wsdl clientis configured to use http://http-nats-proxy:8080 (this is service inside k8s cluster) as default HTTP/HTTPS proxy..NET wsdl clientsets some HTTP Header identifier whichAgentin private LAN need to be used..NET wsdl clientsends 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-proxyis 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.