Skip to content

Macxzew/Waitgate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

50 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Waitgate

Render

Waitgate is a fully self-hosted, secure reverse proxy tunnel, designed to expose any local service (HTTP, HTTPS, raw TCP, SSH, RDP, etc.) without ever directly exposing a public IP or port. All application data is encrypted client-side (ChaCha20-Poly1305) before being sent through the WebSocket tunnel (WS or WSS, HTTP or HTTPS). Modern admin dashboard, only one port to open, security and simplicity first.

Waitgate UI


✨ Features

  • πŸ”’ End-to-end ChaCha20-Poly1305 encryption (all traffic: dashboard, HTTP & raw TCP)
  • πŸ›‘οΈ 2FA (TOTP) for dashboard login
  • 🚦 Brute-force protection
  • πŸ•³οΈ NAT/firewall bypass (outgoing only)
  • πŸ–₯️ Expose any TCP service (HTTP, SSH, RDP…)
  • 🌐 HTTP/HTTPS reverse proxy
  • βš™οΈ Single public port (dashboard & tunnel share the same port)
  • πŸ“¦ Auto-generated, encrypted client.js
  • πŸ‘οΈ Real-time connected users
  • πŸ‘€ Self-hosted & open source

πŸš€ Installation

  1. Clone the repo:
git clone https://github.com/votre_user/waitgate.git
cd waitgate
  1. Install dependencies:
npm install
  1. Start the server:
node server.js
  1. Access the dashboard:
  1. Download the tunnel client:
  1. Configure client.js:
  • Edit LOCAL_HOST & LOCAL_PORT in client.js on the target machine.
  • Run:
node client.js

🧰 Environment variables (.env)

  • TUNNEL_CHACHA_KEY : ChaCha20-Poly1305 encryption key (256 bits, auto-generated)
  • TUNNEL_TOKEN : Tunnel connection token (wgt_ prefix, auto-generated)
  • DASH_USER / DASH_PASS : Admin credentials
  • LOGIN_SECRET : Password encryption key for dashboard login

Edit the .env file to customize.


πŸ” Security

  • ChaCha20-Poly1305 application-level encryptionΒ : All buffers are encrypted before being sent through the tunnel (WS, WSS, HTTP, HTTPS). Even on plain HTTP/WS, your data is not readable without the ChaCha20 key.
  • No public port required on the client side (outgoing only).
  • Strong authentication for both dashboard and tunnel.
  • No admin/tunnel secret is ever stored client-side.

‼️ Waitgate does not require HTTPS/TLS or any proxy on its own port. Only the service you want to expose needs to handle HTTPS/TLS if required (for ex: if you expose a web server with HTTPS, it’s your web server that must serve HTTPS, not Waitgate). Waitgate simply tunnels all traffic as-is. Every message is individually ChaCha20-encrypted client-side before entering the tunnel. If you run Waitgate behind a reverse proxy (Nginx, Caddy, etc.), only HTTP services can be exposed; raw TCP will not work through the tunnel.


⚠️ Disclaimer

This tool is provided for educational and legitimate use only. The author is not responsible for any misuse, illegal activity, or damage caused by this software. Users are responsible for complying with applicable laws.


πŸ“¦ Project structure

waitgate/
β”œβ”€ core/
β”‚  β”œβ”€ crypto-utils.js      # ChaCha20-Poly1305 encryption/decryption
β”‚  β”œβ”€ exposer-ip.js        # IP exposer logic
β”‚  β”œβ”€ rateLimiter.js       # Request rate limiting
β”‚  β”œβ”€ tcp-tunnel.js        # TCP tunnel logic
β”‚  └─ ws-handler.js        # WebSocket handler
β”‚
β”œβ”€ routes/
β”‚  β”œβ”€ dashboard.js         # HTTP/dashboard routing
β”‚  └─ download.js          # Generates client.js
β”‚
β”œβ”€ server/
β”‚  β”œβ”€ httpServer.js        # HTTP SRV
β”‚  β”œβ”€ tcpServer.js         # TCP SRV
β”‚  └─ wsServer.js          # WS SRV
β”‚
β”œβ”€ views/                  # HTML frontend
β”‚  β”œβ”€ index.html
β”‚  β”œβ”€ login.html
β”‚  └─ panel.html
β”‚
β”œβ”€ config.js               # Env management
β”œβ”€ server.js               # Main server entry
β”œβ”€ package.json            # Node.js dependencies
└─ .env                    # Secret config (auto)

πŸ“ Examples of use

  • Expose an internal web service to the outside (no public IP/port exposed).
  • Share a dev service temporarily (API, webapp, SSH, etc.).
  • Secure remote raw TCP access (shell, RDP, local proxy, etc.).
  • Create a temporary, secured TCP bastion to a specific port.

Waitgate UI


πŸ‘€ Author

Project by Macxzew


⭐ Show your support

Give a ⭐️ if this project helped you!


About

πŸ›‘οΈ Expose a private service online, no IP or port opened. Client-side ChaCha20-Poly1305 before the tunnel.

Resources

License

Stars

Watchers

Forks

Contributors