Replies: 2 comments
-
In this case, I'm using the websocket proxy so I only need one http interface for the system -- the one exposed by SIOT. Then I poxy this to the NATS websocket port. This allows me to use one Webserver setup/port (Caddy/lets encrypt) etc. The SIOT client or downstream instance can connect by simply providing a WS URL: https://docs.simpleiot.org/docs/user/upstream.html I don't do anything different in the client other than specify a wss:// vs nats:// URI in the go NATS client code. This is the easy way to do encryption, security in Go Nats clients :-) I originally did this because I had customers who were operating on network where outgoing connections to the NATS port were blocked, so its simplest to just use HTTP for everything. This has to get through. But, we also plan to use this in the web frontend code soon. The JS code is already developed: https://github.com/simpleiot/simpleiot/blob/master/frontend/lib/siot-nats.js Not sure if this addresses your comment? |
Beta Was this translation helpful? Give feedback.
-
Thanks I started looking a web socket proxy that uses the web socket lib that supports wasm . Makes it possible to do fancy client stuff. I will let you know if I find one. I think caddy l4 proxy would do the trick possibly also |
Beta Was this translation helpful? Give feedback.
-
this seems to pass the tcp over ws .
so then that would mean that a nats golang client could talk to it if it also had the reverse ws proxy.
Beta Was this translation helpful? Give feedback.
All reactions