PrivateTunnel

Expose your localhost to the internet with a single command.
HTTP tunnels, raw TCP tunnels, real-time dashboard. Self-hosted, open-source.

Terminal
$ ptunnel http 3000
Private Tunnel (Ctrl+C to quit)
────────────────────────────────────────────
Status: ● online
Forwarding: https://a7f3bc01.iam.iws.lol → localhost:3000
────────────────────────────────────────────

$ ptunnel tcp 25565
Private Tunnel (Ctrl+C to quit)
────────────────────────────────────────────
Status: ● online
Forwarding: [TCP] iam.iws.lol:30001 → localhost:25565
────────────────────────────────────────────

HTTP & TCP Tunnels

ptunnel http 3000 for web apps. ptunnel tcp 25565 for game servers, SSH, databases — any raw TCP service.

Persistent Subdomains

Each client gets a unique subdomain that persists across reconnects. Your URL stays the same every time.

Real-time Dashboard

Monitor all active tunnels, client info, request logs, and bandwidth usage from the web dashboard.

Self-hosted

Run on your own server. Full control over your data. Works on Windows, Linux & macOS.

Auto Firewall

TCP tunnel ports are automatically opened in the OS firewall when a client connects and closed when they disconnect. Supports Windows (netsh) and Linux (ufw/iptables).

Desktop App

Electron-based GUI for non-developers. One-click tunnels, port presets, live request log, and system tray. No terminal required. Available for Windows, Linux & macOS.

Minimal Dependencies

Only ws and better-sqlite3. Everything else uses Node.js built-ins.

Architecture

Browser ──HTTPS──> Nginx (SSL + wildcard *.iam.iws.lol) │ ├── /ws ──> Port 8080 WebSocket tunnel connections ├── /dashboard ──> Port 8081 Admin dashboard + API └── / ──> Port 8082 HTTP proxy (tunnel traffic) │ Subdomain routing abc123.iam.iws.lol │ ┌─────▼─────┐ │ WebSocket │ Multiplexed request/response │ Connection│ via requestId └─────┬─────┘ │ Client (ptunnel)localhost:3000

Quick Start

1. Install

Clone the repository and install dependencies

git clone https://github.com/Jindanet/private-tunnel.git
cd private-tunnel
npm install
npm link
2. Configure

Copy .env.example to .env and set your domain

cp .env.example .env
# Edit .env: set DOMAIN=your-domain.com
3. Start Server

Run on your server machine

node server/index.js
4. Connect Client

Run on your local machine (server URL is saved after first use)

ptunnel http 3000 --server wss://your-domain.com/ws
ptunnel tcp 25565 --server wss://your-domain.com/ws

Download

Pre-built binaries are available on GitHub Releases.

🖥️ Desktop App (Windows)

PrivateTunnel-win.zip — Electron GUI. One-click tunnels, port presets, system tray.

⌨️ CLI Binaries

ptunnel-win.exe, ptunnel-linux, ptunnel-macos — Standalone CLI. No Node.js required.