-
instal stunnel from your package manager. This allows you to wrap any TCP protocol (ssh, postgresql, mysql) in TLS.
-
download the stunnel.conf from this gist and replace the example.com host with your custom domain (also in the ssh command below).
-
run
stunnel stunnel.conf
in a terminal -
connect your localhost.run tunnel on port 80 to your backend service.
ssh -R example.com:80:localhost:5432 plan@localhost.run
connects a tunnel to a local postgres on port 5432, change the port for other services -
connect your client to port 9999 (or what ever port you specified in stunnel.conf), for eg:.
psql postgresql://localhost:9999/dbname
mysql -h localhost -P9999
ssh localhost -p 9999