Run the following in your client machine
ssh -R EXPOSED_PORT:localhost:SERVICE_PORT USER@HOST
Where
- EXPOSED_PORT is the port exposed to the internet in the proxy server
- SERVICE_PORT is the port your application is listening in your machine
- USER is the username of the ssh user
- HOST is the proxy server host
EXPOSED_PORT is the same as PORT_TARGET in proxy.js
If proxying does not work, check if you have set the following line in your sshd config of the proxy server
GatewayPorts clientspecified
After you haved logged in to the ssh server, run the proxy
Fantastic, thank you for this! I've forked it to add handling rewriting the Location header on 3xx responses.