Mekong Tunnel Logo
MEKONG
Open Source · MIT Licensev1.4.9 — What's new

Expose your local server in one command

MekongTunnel is a self-hosted SSH tunnel server. No signup, no config, no agents. Just run mekong 3000 and get a public HTTPS URL instantly.

MIT
Open Source
1,000
Tunnels
Go
Written in
mekong — zsh
~$

Get started in seconds

Install the CLI

One binary. No dependencies. Works on macOS, Linux, and Windows.

Terminal
$sudo curl -L https://github.com/MuyleangIng/MekongTunnel/releases/download/v1.4.9/mekong-darwin-arm64 -o /usr/local/bin/mekong
$sudo chmod +x /usr/local/bin/mekong
# Run once to allow the binary (not signed with Apple certificate):
$sudo xattr -d com.apple.quarantine /usr/local/bin/mekong
$mekong 3000

Or use raw SSH (no install needed)

Skip the CLI entirely — just use the ssh command you already have.

Basic

$ssh -t -R 80:localhost:3000 mekongtunnel.dev

With keep-alive (recommended)

$ssh -t -R 80:localhost:3000 -o ServerAliveInterval=60 -o ServerAliveCountMax=3 mekongtunnel.dev

With expiry

$ssh -o SetEnv=MEKONG_EXPIRE=48h -t -R 80:localhost:3000 mekongtunnel.dev

Replace 3000 with your local port. The -t flag is required — without it the server cannot display your URL. For raw SSH expiry, use SetEnv like MEKONG_EXPIRE=48h.

Simple by design

How it works

MekongTunnel uses standard SSH reverse port forwarding. No agents, no proprietary protocol, no account required.

01
⌨️

Run the CLI

Run `mekong 3000` in your terminal. The CLI connects to MekongTunnel via SSH reverse port forwarding.

mekong 3000
02
🔗

Get a Public URL

The server assigns a unique HTTPS subdomain and displays it in your terminal. The URL is copied to clipboard automatically.

https://happy-tiger-a1b2.mekongtunnel.dev
03
🌐

Share & Demo

Paste the URL anywhere — your phone, a client's browser, a webhook endpoint. All traffic proxies through to your local app.

curl https://happy-tiger-a1b2.mekongtunnel.dev
<>

Under the hood

SSH reverse forwarding

Your SSH client sends a tcpip-forward request to the server. The server opens an internal TCP listener, assigns you a subdomain, and terminates TLS on port 443. When a browser hits your URL, the server opens a forwarded-tcpip SSH channel back through your connection to your local app.

tcpip-forwardTLS :443subdomain assignedforwarded-tcpip

Traffic path from the public browser request back to your local app

WEB

Browser

443

A user opens your public HTTPS URL from anywhere.

HTTPS :443
EDGE

Tunnel registry

TLS

Terminates TLS, assigns the subdomain, and opens the internal listener.

forwarded-tcpip
SSH

Your SSH client

SSH

Sends tcpip-forward and receives forwarded-tcpip channels back.

localhost dial
APP

localhost:3000

3000

Your local dev server, webhook receiver, or private app.

Everything you need

Built-in features

No plugins, no extensions. Everything ships in a single ~6 MB binary.

Auto-reconnect

The mekong CLI automatically reconnects with exponential backoff if the tunnel drops.

📱

QR Code

Your public URL is printed as a QR code in the terminal. Scan with your phone instantly.

WebSocket Support

WebSocket connections are detected and proxied transparently. No special config needed.

🔒

HTTPS by Default

TLS is terminated at the server. Every tunnel gets a valid HTTPS URL out of the box.

⚙️

Zero Config

One command. No YAML, no accounts, no dashboard. Just your port and you're live.

🛡️

Abuse Protection

Per-IP rate limiting, sliding-window connection limits, and automatic IP blocking for abusers.

📊

Live Request Log

Every HTTP request is streamed live to your SSH terminal — method, path, status, and latency.

🌐

Self-Hostable

Run your own MekongTunnel server on any VPS. Full control, your own domain, MIT licensed.

Multiple Ports

Expose several local ports at once — mekong 3000 8080 — each gets its own public URL.

🌙

Daemon Mode

Run tunnels in the background with mekong -d 3000. Check status or stop anytime.

Transparent

Server limits

All limits apply to the public hosted instance. Self-hosters can adjust everything via env vars.

Max tunnels per IP1,000
Total server tunnelsUnlimited
New SSH connections/minUnlimited
IP auto-blockingDisabled
Requests per tunnel10/s
Max request body1 GB
WebSocket transferUnlimited
Inactivity timeoutmatches expiry
Max tunnel lifetime1w
SSH handshake timeout30s

Open Source

Run your own tunnel server

MekongTunnel is MIT licensed. Deploy on any VPS with Docker in under 5 minutes. Your domain, your rules, your data.