Skip to content

HTTP Tunnels

To set up a HTTP tunnel to port 8080, request a port forward from port 80 by running the following command:

ssh -R 80:localhost:8080 localhost.run

localhost.run forwards HTTP traffic down your tunnel to your app and automatically adds encrypted HTTPS to your tunnel endpoints for your users to optionally connect to.

Prefix your domain name with https:// to access your tunnel over HTTPS, and localhost will unwrap the encryption for you and send the plain HTTP requests to your app.

Proxy headers

Reverse proxy headers are automatically added to HTTP requests, specifically X_Forwarded_For, X_Forwarded_Host, X_Forwarded_Proto and the newer Forwarded header.

These can be turned off with a command line option if required.

Non-HTTP protocols over TLS

On Custom Domain plans, connections to port 443 over TLS do not have to talk the HTTP protocol, any protocol from TLS capable client will be sent down your tunnel.

Your app connected to your tunnel should be listening for plain TCP because localhost.run will take care of certificates and decryption for you.