websocketd is a CGI web server and process-to-WebSocket wrapper that transforms command line programs into WebSocket servers by bridging standard input and output streams to remote clients. It functions as a TLS-secured gateway that routes traffic to backend processes, allowing any executable using standard IO to be exposed via a web interface.
The project uses directory-based endpoint mapping to automate the creation of URL paths from local executable files. It employs a process-per-connection model to isolate execution and forwards HTTP request metadata, such as cookies and query parameters, to child processes through environment variables.
The system includes capabilities for serving static web assets, restricting WebSocket upgrades based on origin headers, and limiting concurrent processes to prevent resource exhaustion. It also supports custom HTTP header configuration and transport layer security using SSL certificates.