Re: [go-nuts] Re: Looking for a specialized proxy package

2023-03-16 Thread Matthew Zimmerman
I would abandon the IOT device doing any serving of data to any client and instead make your cloud instance the web server rendering data it obtains via grpc from the IOT devices. This makes the design much simpler on the IOT side and takes any direct access to them away which simplifies the desig

Re: [go-nuts] Re: Looking for a specialized proxy package

2023-03-16 Thread egonbits
I've seen this type of SSH/rsync access used many times (and have used it myself to great effect), but it is worth considering if you feel confident being able to sufficiently secure the ssh access in your threat model. Your system, if compromised, could serve as an ingress and pivot to other syste

Re: [go-nuts] Re: Looking for a specialized proxy package

2023-03-16 Thread Tamás Gulácsi
As far as I understand, the requirement is to have a link presented by the cloud server, that is proxied to the IOT's HTTP handler. The latter is only on the IOT's localhost, accessible on the cloud server through ssh reverse tunneling (so, a specific port on the cloud server's localhost). This

Re: [go-nuts] Re: Looking for a specialized proxy package

2023-03-16 Thread Vladimir Varankin
Hey Michael, > The piece I'm missing is how to construct a proxying handler that will use the identifier in the link to look up the tunnel port and fetch the IOT's home page and thereafter make it seem as though the user is directly browsing the IOT. If I got the question right, there are two

Re: [go-nuts] Re: Looking for a specialized proxy package

2023-03-15 Thread Michael Ellis
Thanks, Matthew. I know what RPC is, but have never considered it as a way to serve http from behind a NAT. I should say that the IOT's are part of a product that's been in the market for several years. My client likes the web interface we built and wants users to be able to access an IOT's p

Re: [go-nuts] Re: Looking for a specialized proxy package

2023-03-15 Thread Matthew Zimmerman
Honestly I'd probably use grpc and keep a constant connection from the IOT to the cloud. No ports/services required on the client at all and the server can still request things in real time. Like: https://www.talentica.com/blogs/part-3-building-a-bidirectional-streaming-grpc-service-using-golang/

[go-nuts] Re: Looking for a specialized proxy package

2023-03-15 Thread Michael Ellis
FWIW, I pasted my post into ChatGPT-4 and got what might be a plausible outline of an approach using httputil.NewSingleHostReverseProxy. But, as we know, LLM's are prone to hallucination. If you're curious, here's a share link. https://shareg.pt/cNoNdWc On Wednesday, March 15, 2023 at 5:57: