# joewalnes/websocketd

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/joewalnes-websocketd).**

17,465 stars · 1,011 forks · Go · BSD-2-Clause

## Links

- GitHub: https://github.com/joewalnes/websocketd
- Homepage: http://websocketd.com/
- awesome-repositories: https://awesome-repositories.com/repository/joewalnes-websocketd.md

## Topics

`proxy` `websocket-server` `websockets`

## Description

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.

## Tags

### Networking & Communication

- [Standard IO WebSocket Bridges](https://awesome-repositories.com/f/networking-communication/standard-io-websocket-bridges.md) — Provides a bridge that transforms any command line program using standard input and output into a WebSocket server.
- [Protocol Bridges](https://awesome-repositories.com/f/networking-communication/transport-bridges/protocol-bridges.md) — Bridges a program's standard input and output streams directly to a WebSocket connection for remote interaction. ([source](https://github.com/joewalnes/websocketd/wiki/Download-and-install))
- [Process-to-WebSocket Wrappers](https://awesome-repositories.com/f/networking-communication/process-to-websocket-wrappers.md) — Pipes a local executable's input and output streams to and from remote WebSocket clients.
- [WebSocket-Based CLI Exposure](https://awesome-repositories.com/f/networking-communication/remote-access-control/websocket-based-cli-exposure.md) — Exposes command line programs as WebSocket servers for remote interaction through a web browser.
- [Standard IO to WebSocket Bridging](https://awesome-repositories.com/f/networking-communication/standard-io-to-websocket-bridging.md) — Connects a program's standard input and output to WebSockets for real-time data streaming and remote control.

### Security & Cryptography

- [Transport Layer Security](https://awesome-repositories.com/f/security-cryptography/transport-layer-security.md) — Secures socket connections using HTTPS and SSL certificates to encrypt traffic between clients and the server. ([source](https://github.com/joewalnes/websocketd/blob/master/help.go))
- [Origin Validators](https://awesome-repositories.com/f/security-cryptography/cross-origin-security-policies/origin-validators.md) — Verifies the Origin header during the WebSocket handshake to prevent unauthorized protocol upgrades. ([source](https://github.com/joewalnes/websocketd/blob/master/help.go))
- [TLS/SSL Configurations](https://awesome-repositories.com/f/security-cryptography/security/cryptography-and-secrets/cryptographic-primitives-management/tls-ssl-configurations.md) — Secures socket connections using SSL/TLS encryption to protect data transmission.
- [TLS-Secured WebSocket Gateways](https://awesome-repositories.com/f/security-cryptography/security/cryptography-and-secrets/cryptographic-primitives-management/tls-ssl-configurations/tls-secured-websocket-gateways.md) — Provides a TLS-secured gateway for routing traffic to backend processes with origin restriction.

### Web Development

- [CGI Script Execution](https://awesome-repositories.com/f/web-development/cgi-script-execution.md) — Provides the ability to execute local scripts and return their output as HTTP responses via the CGI standard. ([source](https://github.com/joewalnes/websocketd/blob/master/help.go))
- [Protocol Upgrades](https://awesome-repositories.com/f/web-development/protocol-upgrades.md) — Handles the handshake protocol to upgrade standard HTTP requests into persistent bidirectional WebSocket streams.
- [Executable-to-WebSocket Proxying](https://awesome-repositories.com/f/web-development/websockets/executable-to-websocket-proxying.md) — Wraps existing executables with a WebSocket layer to enable real-time data streaming and remote process execution.
- [Filesystem-to-URL Endpoint Mapping](https://awesome-repositories.com/f/web-development/api-management-tools/api-development-management/web-apis/administrative-api-endpoints/endpoint-discovery/endpoint-translation-maps/filesystem-to-url-endpoint-mapping.md) — Automates the creation of URL paths by mapping executable files in a local directory to unique endpoints.
- [Environment Variable Metadata Forwarding](https://awesome-repositories.com/f/web-development/request-metadata/environment-variable-metadata-forwarding.md) — Forwards remote host, cookies, and query parameters to backend processes through standard environment variables. ([source](https://github.com/joewalnes/websocketd#readme))

### Data & Databases

- [Process-Per-Connection Architectures](https://awesome-repositories.com/f/data-databases/process-per-connection-architectures.md) — Employs a process-per-connection model to isolate execution and manage state for every WebSocket client.

### Development Tools & Productivity

- [Session Environment Variable Exporters](https://awesome-repositories.com/f/development-tools-productivity/terminal-environment-variables/session-environment-variable-exporters.md) — Exposes HTTP request headers and client metadata to child processes via session-specific environment variables.

### Software Engineering & Architecture

- [Process Pool Limiters](https://awesome-repositories.com/f/software-engineering-architecture/concurrent-task-runners/concurrent-task-limiters/process-pool-limiters.md) — Caps the number of simultaneous child processes executed by handlers to prevent system resource exhaustion. ([source](https://github.com/joewalnes/websocketd/blob/master/help.go))

### Part of an Awesome List

- [Network Utilities](https://awesome-repositories.com/f/awesome-lists/devtools/network-utilities.md) — Turns standard input/output programs into WebSocket servers.
