How neonredwood/redtun works
Main Components
a. Client-Side Components:
• Local Development Server (user's application)
• Redtun Client (CLI tool)
• WebSocket Tunnel Client
• HTTP Reverse Proxy
b. Server-Side Components:
• Nginx Reverse Proxy (with SSL termination)
• Redtun Server
• WebSocket Tunnel Server
• Client Manager
• Authentication System
[Developer Environment] <---> [Public Internet] <---> [Server Infrastructure]
Key Relationships to Highlight
a. Data Flow:
• WebSocket tunnel connection between Client and Server
• HTTP/HTTPS traffic flow from public internet through the entire stack
b. Authentication Flow:
• API key validation path
• Secure WebSocket connection establishment
Specific Implementation Details
• Rectangles: Main services (Redtun Server, Nginx)
• Hexagons: Protocol handlers (WebSocket, HTTP)
Component Details
[Developer Environment]
• Local Dev Server (Port 3000)
• Redtun Client
• CLI Interface
• Tunnel Client
• Config Manager
[Public Internet]
• HTTPS Traffic (*.dev.yourdomain.com)
[Server Infrastructure]
• Nginx Reverse Proxy
• SSL Termination
• Redtun Server
• Authentication Handler
• Client Manager
• WebSocket Tunnel
• HTTP Proxy
Important Architectural Notes
• How the wildcard SSL certificate (*.dev.yourdomain.com) is handled at the Nginx level
• Subdomain-based routing mechanism
• API key authentication flow
Technical Specifications
• Port mappings (3000 for local server, configurable server port)
• Protocol transitions (HTTP → HTTPS → WebSocket)
• Authentication points (API key validation)
• Subdomain handling
Environmental Boundaries
Use clear boundaries to separate:
• Local development environment
• Public internet
• Server infrastructure
• Security perimeters
Additional Elements
• Notes about scalability limitations (single-server deployment recommendation)
• Configuration points (API keys, server addresses)
• Version compatibility information
Deployment Context
• Container boundaries for dockerized components
• Kubernetes deployment options
• Load balancer limitations
Remember to include a note about the current limitation regarding subdomain reservation in distributed deployments, as this is a critical architectural consideration mentioned in the README.