3 ms·
You can also do this with ssh and Unix sockets if you’d like to not leave ports open and accessible from the proxy server. It’s a little more work, but both ope
by mbreese 5y ago
You can also do this with ssh and Unix sockets if you’d like to not leave ports open and accessible from the proxy server. It’s a little more work, but both openssh and nginx support this. I’m doing that on a remote server to run code server (vscode w/o the MS specific code) on a multi user system. I’d rather not have my code editor available for anyone else on the system. So, node is getting served on a socket, and that is the forwarded to a web reverse proxy.
There is extra authentication/authorization as part of the web server itself, but it is nice that I don’t have open IP ports on the shared server.
That said, for the use case from the article, if you have a more permanent setup, using something like wireguard would be more robust than an ssh reverse tunnel. But the ssh tunnel is great for more ephemeral connections.