Tunnel My…
WordPress
WordPress is configured to run under a specific URL, usually http://localhost — great locally, not on the internet. Change the site URL to your tunnel's domain.
Tip: free domains change over time, and WordPress URL updates are lengthy. A Custom Domain gives a stable name you configure once.
Caution: for free domains you can explore the relative URL plugin and set
WP_HOMEandWP_SITEURLto'https://' . $_SERVER['HTTP_HOST']— but understand the security implications of trusting the Host header.
Favourite web framework
Seeing requests to localhost:{port} in your browser dev tools when browsing through localhost.run? Check your framework's reverse proxy settings. More in the FAQ.
SSH servers
With a custom domain you can tunnel to an SSH server using stunnel on the client.
- On the SSH server, connect the tunnel (keep it running):
bash
ssh -R tunnel.example.com:80:localhost:22 plan@cd.localhost.run- On the client, install stunnel, which wraps TCP in TLS.
- Create
stunnel.conf:
ini
foreground = yes
pid = ./stunnel.pid
[lhr]
client = yes
accept = localhost:2222
connect = tunnel.example.com:443- Run
stunnel stunnel.confand keep it running. - Connect:
ssh localhost -p 2222.