vtunnel-server
v1.0.0
Published
Public tunnel server that handles incoming traffic and CLI client connections
Readme
V-Tunnel Server
Public tunnel server that handles incoming traffic and CLI client connections for secure local development tunneling.
Architecture
The server consists of two main components:
- Tunnel Server: Handles CLI client connections and agent registration (default port 9999)
- Public Server: Handles incoming HTTP requests from the internet and routes them to registered tunnels (default port 8000)
Features
- Dual-server architecture for tunnel management and public traffic
- Secure tunnel creation with API key authentication
- Client agent registration and subdomain management
- Request forwarding based on Host header routing
- Real-time bidirectional data piping between public users and local servers
- Configurable server host, ports, and authentication
Development
- Install dependencies:
npm install- Start the development server:
npm run dev- Run the unit tests:
npm run test- Build the server:
npm run build- Start the production server:
npm startConfiguration
The server can be configured using environment variables:
PUBLIC_PORT: Port for public HTTP traffic (default: 8000)TUNNEL_PORT: Port for tunnel client connections (default: 9999)SERVER_HOST: Server hostname (default: "localhost")SECRET_KEY: API key for tunnel authentication (default: "supersecret")
Example .env file:
PUBLIC_PORT=8080
TUNNEL_PORT=7000
SERVER_HOST=0.0.0.0
SECRET_KEY=my-secure-key-123Related
- V-Tunnel CLI - Command line client for creating tunnels
