Tunnel My ...
Wordpress
Wordpress is configured to run under a specific URL, usually http://localhost
. This is excellent for local development but not for being on the internet.
Follow the instructions at https://wordpress.org/support/article/changing-the-site-url/ to set the URL of your wordpress installation.
Favourite Web framework
If you see requests going to localhost:{your locally running apps port}
in your browsers dev tools when browsing your site through localhost.run check your framework for reverse proxy settings.
More information can be found in the faq.
SSH servers
With a custom domain plan it is possible to tunnel to a SSH server using stunnel on the SSH client.
-
On the SSH server make sure your localhost.run tunnel is connected:
Terminal window ssh -R tunnel.example.com:80:localhost:22 plan@cd.localhost.runThis must be running to connect to SSH from your client computer.
The rest of this guide is for the client computer.
-
Install stunnel on your client SSH computer.
stunnel is an application that wraps TCP, like SSH, in TLS.
-
Configure it to wrap connections to localhost:2222 in TLS and send them to your custom domain by creating a file named
stunnel.conf
stunnel.conf foreground = yespid = ./stunnel.pid[lhr]client = yesaccept = localhost:2222connect = tunnel.example.com:443 -
Run
stunnel stunnel.conf
in a terminal. This command must be running to connect to SSH. -
Run
ssh localhost -p 2222
to connect over the tunnels to your SSH server.