This is a simplified use case for a real use case I need help with.
I have a linux machine, with N users.
There is a program, say “webecho”, that when run, starts listening on a random port and serve a “echo” webpage. The CLI tells users what port it is listening on. So, users can remotely access http://host:9091. I’d like all of these connections to be https. Users might run the “webecho” program for a few minutes per session, and then terminate it.
What’s the best way to set this up? There could be several instances of “webecho” running, and if each of the servers serve SSL, they’d need to share the certificate since they are on the same host. Another alternative is that Caddy be somehow setup to reverse proxy connections dynamically. Maybe https://host/webecho/9091 gets connected to localhost:9091.
What’s the best way to do this?