Websockify is a WebSocket to TCP proxy that enables browsers to connect to any application or server by translating WebSocket traffic to normal socket traffic. The tool accepts WebSocket handshakes, parses them, and forwards traffic bidirectionally between clients and target services.
The core problem websockify solves is the inability of web browsers to establish direct TCP connections to arbitrary services. Browsers can only communicate via WebSocket or HTTP protocols. Websockify bridges this gap by running as a proxy that accepts incoming WebSocket connections from browsers and translates them into standard TCP socket connections to backend services. This allows any networked application to be accessed through a web interface without modifying the application itself.
Websockify suits projects where you need to expose non-web services to browser clients, such as remote desktop applications, terminal emulators, or legacy services. It is particularly useful when you want to avoid modifying the target application or when the application already has a working TCP interface. The tool supports encrypted connections via the wss:// URI scheme using SSL certificates, with options for both self-signed and commercial certificates. It also provides daemonization support for running as a background process and automatic SSL detection by examining the first byte of client data.
The project maintains clear documentation on certificate configuration and connection handling, including specific guidance for browser certificate trust scenarios across multiple ports.