How boronine/h2tunnel works
Main Components
a) Client-side Components:
• Local TCP Server (Origin Server)
• H2Tunnel Client
• TLS Client Connection Handler
b) Server-side Components:
• H2Tunnel Server
• TLS Server Connection Handler
• TCP Proxy Server
Data Flow Through HTTP/2 Streams
Left Side (Client) Right Side (Server)
• Local Server │ │ TCP Proxy │
• ↕ ↕
• H2T Client │ ←──── HTTP/2 ─────→ │ H2T Server │
• Tunnel ────────────────
• ↕ ↕
• TLS Client │ ←──── TLS ─────────→│ TLS Server │
D. Important Details to Include:
• Port numbers (tunnel port and proxy port)
• TLS certificate/key authentication
• HTTP/2 stream multiplexing indication
• TCP connection conversion points
Technical Specifications to Note
Annotations for:
• Node.js v18+ requirement
• TLS with self-signed certificates
• HTTP/2 multiplexing capability
• TCP protocol conversion points
Implementation Notes
Notes about:
• No dependencies requirement
• Less than 500 LOC implementation
• Support for both CLI and library usage
• Authentication mechanism using shared TLS certificates
Remember to include version information and any relevant environment-specific configurations in supplementary documentation.