The reverse proxy is going to have a config that says “for hostname ‘foo’ I should forward traffic to foo.example.com:port”.
If you setup the rproxy at home then ssh just needs to forward all port 443 traffic to the rproxy. It doesn’t care about hostnames. The rproxy will then get a request with the hostname in the data and forward it to the appropriate target on behalf of the requester.
If you setup the rproxy at the vps then yes - you would need to forward different ports to each backend target. This is because the rproxy would need to direct traffic to each target individually. And if your target is “localhost” (because that’s where the ssh endpoint is) then you would differentiate each backend by port.
lemmyvore@feddit.nl 6 months ago
No, that’s the magic of the reverse proxy. You can transport all HTTP services through just one port. It will route them to the correct service on your service based on the domain (which is passed through the HTTP headers).
It won’t work for non-HTTP services, for those you’ll have to make a separate ssh tunnel per port.