A low level tool for a popular

Search code, repositories, users, issues, pull requests...

submited by
Style Pass
2024-10-15 08:00:03

A low level tool for a popular "tunneling" workflow, similar to the proprietary ngrok or the openssh-based ssh -L solution. All in less than 600 LOC with no dependencies.

This workflow allows exposing your localhost development server to the internet. This requires a server component hosted on a public IP address, and a client component running on your local machine. The client establishes a tunnel to the server, and the server acts as a reverse proxy, tunneling requests back to your local machine.

On your server (example.com), we will be listening for tunnel connections on port 15001, and providing an HTTP proxy on port 80. Make sure these are open in your firewall. --mux-listen-port can be any available port, it is necessary to run an HTTP2 multiplexer on localhost.

On your local machine, we will connect to the tunnel and forward a local HTTP server on port 8000. --demux-listen-port can be any available port, it is necessary to run an HTTP2 demultiplexer on localhost.

Leave a Comment