Meet Tunnelto: The High-Performance Open-Source Tunnel Written in Rust

tunnelto

Every developer has been there. Youโ€™re building a webhooks integration, testing a mobile app against your local API, or trying to show a client a preview of a site. You need a public URL for your localhost, and you need it now.

While Ngrok has been the industry standard for years, it has become increasingly bloated, restricted, and expensive. Enter tunnelto, an open-source, blazingly fast alternative built entirely in Rust.

Why Tunnelto?

If youโ€™re already using a tunneling tool, why switch?

  1. Written in Rust: Built on top of tokio and async-io, itโ€™s designed for high concurrency and minimal resource footprint.
  2. Open Source: Unlike proprietary alternatives, you can see exactly how your data is being handled.
  3. Self-Hostable: If you don’t want to use the public service, you can deploy your own tunnelto_server using Docker or fly.io.
  4. Simplicity: No complex configuration files. One command and youโ€™re live.

Getting Started in 60 Seconds

Installing tunnelto is straightforward, whether you’re on macOS or a Linux/Windows machine with Cargo.

Installation

macOS (via Brew):

Bash

brew install agrinman/tap/tunnelto

Via Cargo:

Bash

cargo install tunnelto

Creating Your First Tunnel

Suppose your local dev server is running on port 8000. To expose it to the world, simply run:

Bash

tunnelto --port 8000

tunnelto will provide you with a unique public URL (e.g., https://xyz.tunnelto.dev) that routes directly to your local machine.


Power User Features

While the quick start is great, tunnelto offers features that make it a robust choice for professional workflows:

1. Custom Subdomains

Tired of getting a random string every time you restart your tunnel? You can specify a preferred subdomain:

Bash

tunnelto --port 8000 --subdomain my-dev-project

2. Inspection Dashboard

tunnelto includes a local introspection dashboard. This allows you to monitor incoming requests, inspect headers, and debug the traffic hitting your local server in real-time.

3. Self-Hosting for Privacy

For teams with high security requirements, you can host the server component yourself. The repository includes a Dockerfile and a musl_build.sh script to make deployment to any cloud provider (like AWS, DigitalOcean, or Fly.io) trivial.


Under the Hood: The Tech Stack

What makes tunnelto interesting from a technical perspective is its architecture. It leverages:

  • Tokio: The industry-standard asynchronous runtime for Rust.
  • Control Streams: It uses a control websocket to coordinate tunnel creation and management.
  • Gossip Mechanism: For those interested in distributed systems, the server implementation includes a gossip protocol to handle traffic across multiple server instances.

The Verdict

If you are looking for a tool that is faster, lighter, and more transparent than Ngrok, tunnelto is the answer. It stays out of your way and lets you get back to what matters: building your software.

Ready to try it? Check out the GitHub Repository and give it a star!

Post Comment

You May Have Missed