Documentation
v1.0.0
Installation

Installation

One-liner install (recommended)

The install scripts download the latest release automatically. Current release: v1.6.1.

macOS and Linux

curl -fsSL https://mekongtunnel.dev/install.sh | sh

Detects your OS and architecture automatically: macOS Apple Silicon, macOS Intel, Linux amd64, and Linux arm64. Installs to /usr/local/bin or ~/.local/bin, removes macOS Gatekeeper quarantine, and adds to PATH if needed.

Windows (PowerShell)

irm https://mekongtunnel.dev/install.ps1 | iex

Detects amd64 or arm64, downloads the binary, unblocks it from Windows SmartScreen, and adds to your user PATH.

After installing, log in and start your first tunnel:

mekong login
mekong 3000

Build from source (Go 1.24+)

go install muyleanging.com/mekongtunnel/cmd/mekong@latest

Upgrading

mekong update

Detects your platform, downloads the latest release, verifies the checksum, and replaces the binary atomically.


Ecosystem

Install once, use everywhere — official packages for Node.js, Python, and VS Code.


Raw SSH (no install needed)

Skip the CLI entirely and use the ssh command you already have.

# Anonymous
ssh -t -R 80:localhost:3000 proxy.mekongtunnel.dev
 
# With token (reserved subdomain)
ssh -o SetEnv="MEKONG_API_TOKEN=mkt_xxxxxxxxxxxx" \
    -t -R 80:localhost:3000 proxy.mekongtunnel.dev
 
# With expiry
ssh -o SetEnv=MEKONG_EXPIRE=48h \
    -t -R 80:localhost:3000 proxy.mekongtunnel.dev
 
# Both at once
ssh -o SendEnv="MEKONG_API_TOKEN MEKONG_EXPIRE" \
    -o SetEnv="MEKONG_API_TOKEN=mkt_xxx MEKONG_EXPIRE=48h" \
    -t -R 80:localhost:3000 proxy.mekongtunnel.dev

Replace 3000 with your local port. The -t flag is required, or the server cannot display your tunnel URL. If you want extra keep-alive protection, add -o ServerAliveInterval=60 -o ServerAliveCountMax=3.

⚠️

The PowerShell one-liner handles Windows unblocking automatically. Prefer the installer scripts unless you specifically need a custom source build.


Verify the install

mekong --help
mekong test