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 --server wss://iam.iws.lol/_private-tunnel/ws
Private Tunnel (Ctrl+C to quit)
────────────────────────────────────────────
Status: ● online
Forwarding: https://a7f3bc01.iam.iws.lol → localhost:3000
────────────────────────────────────────────

$ ptunnel tcp 25565 --server wss://iam.iws.lol/_private-tunnel/ws
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.

Persistent Subdomains

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

Real-time Dashboard

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

Self-hosted

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

Architecture

Browser ──HTTPS──> Nginx │ ├── /_private-tunnel/ws ──> Port 8080 WebSocket tunnel connections ├── /_private-tunnel/admin ──> Port 8081 Admin dashboard + API └── / ──> Port 8082 HTTP proxy (tunnel traffic) │ Subdomain routing abc123.iam.iws.lol │ 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 finish setup from the dashboard

cp .env.example .env
# Edit .env: set MySQL + startup defaults
3. Start Server

Run on your server machine

node server/index.js
4. Connect Client

Run on your local machine

ptunnel http 3000 --server wss://iam.iws.lol/_private-tunnel/ws
ptunnel tcp 25565 --server wss://iam.iws.lol/_private-tunnel/ws