# vi/websocat

**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/vi-websocat).**

8,571 stars · 329 forks · Rust · MIT

## Links

- GitHub: https://github.com/vi/websocat
- awesome-repositories: https://awesome-repositories.com/repository/vi-websocat.md

## Topics

`cli` `command-line` `command-line-tool` `curl` `netcat` `proxy` `rfc-6455` `socat` `websocket-client` `websocket-server` `websockets`

## Description

Websocat is a specialized set of command-line tools for WebSocket communication, acting as a client, server, and stream processor. It provides a terminal-based interface for connecting to WebSocket servers, hosting secure WebSocket servers, and bridging data between WebSockets and other network transports.

The project distinguishes itself by functioning as a bidirectional network relay, allowing the routing of data between WebSocket streams, TCP sockets, UNIX sockets, and standard system input and output. It includes specialized implementations for SOCKS5 and HTTP proxying, as well as a stream processor capable of transforming WebSocket messages into line-based or binary records for use with external programs.

The toolset covers a broad range of networking capabilities, including secure communication via TLS and symmetric encryption, protocol bridging, and network debugging through traffic inspection. It also supports server mocking, automatic connection re-establishment, and the exposure of performance metrics on dedicated ports.

The project is packaged as a lightweight Docker container image for deployment across different environments.

## Tags

### Networking & Communication

- [WebSocket Clients](https://awesome-repositories.com/f/networking-communication/websocket-clients.md) — Ships a terminal-based client for establishing and managing bidirectional WebSocket connections.
- [Bidirectional Protocol Bridging](https://awesome-repositories.com/f/networking-communication/bidirectional-protocol-bridging.md) — Forwards data bidirectionally between different socket types, bridging diverse network endpoints. ([source](https://github.com/vi/websocat/blob/master/doc.md))
- [Pluggable Transport Layers](https://awesome-repositories.com/f/networking-communication/communication-protocols-architectures/communication-protocols-standards/network-transport-layers/pluggable-transport-layers.md) — Utilizes a pluggable transport layer to seamlessly relay data between TCP, UNIX sockets, and WebSockets.
- [Websocket Connection Managers](https://awesome-repositories.com/f/networking-communication/connection-management/websocket-connection-managers.md) — Establishes secure or insecure connections to remote WebSocket servers. ([source](https://github.com/vi/websocat/blob/master/doc.md))
- [Port-Based WebSocket Listeners](https://awesome-repositories.com/f/networking-communication/distributed-systems-p2p/distributed-computing/communication-protocols/websocket-implementations/websocket-clients-and-servers/port-based-websocket-listeners.md) — Hosts WebSocket servers listening on TCP ports, UNIX sockets, or abstract-namespaced sockets. ([source](https://github.com/vi/websocat#readme))
- [Secure](https://awesome-repositories.com/f/networking-communication/distributed-systems-p2p/distributed-computing/communication-protocols/websocket-implementations/websocket-servers/secure.md) — Provides a command-line listener that accepts secure WebSocket connections using PKCS#12 certificates.
- [Secure Server Implementations](https://awesome-repositories.com/f/networking-communication/distributed-systems-p2p/distributed-computing/communication-protocols/websocket-implementations/websocket-servers/secure-server-implementations.md) — Provides a command-line utility to host secure WebSocket servers using PKCS#12 certificates. ([source](https://github.com/vi/websocat/blob/master/moreexamples.md))
- [Event-Driven Networking](https://awesome-repositories.com/f/networking-communication/event-driven-networking.md) — Implements a high-performance event-driven networking model using non-blocking I/O for concurrent connections.
- [Process-to-WebSocket Wrappers](https://awesome-repositories.com/f/networking-communication/process-to-websocket-wrappers.md) — Pipes an external program's standard input and output streams directly to a WebSocket connection. ([source](https://github.com/vi/websocat#readme))
- [Bidirectional Stream Proxying](https://awesome-repositories.com/f/networking-communication/socket-networking/socket-proxying-layers/socket-wrappers/bidirectional-stream-proxying.md) — Provides bidirectional data stream proxying between remote listeners and local clients.
- [Standard IO WebSocket Bridges](https://awesome-repositories.com/f/networking-communication/standard-io-websocket-bridges.md) — Bridges the standard input and output of local processes to WebSocket connections.
- [TCP and Unix Socket Listeners](https://awesome-repositories.com/f/networking-communication/tcp-and-unix-socket-listeners.md) — Connects to and listens on TCP and UNIX sockets for raw bidirectional data exchange. ([source](https://github.com/vi/websocat/blob/master/doc.md))
- [WebSocket Terminal Clients](https://awesome-repositories.com/f/networking-communication/websocket-terminal-clients.md) — Provides a terminal-based interface to connect to WebSocket servers for testing and automation.
- [Transport Mapping](https://awesome-repositories.com/f/networking-communication/websocket-transports/transport-mapping.md) — Proxies data by mapping TCP connections to WebSocket connections and vice versa. ([source](https://github.com/vi/websocat#readme))
- [Broadcast Messaging Channels](https://awesome-repositories.com/f/networking-communication/broadcast-messaging-channels.md) — Duplicates replies from a single inner connection to all currently connected downstream clients. ([source](https://github.com/vi/websocat/blob/master/doc.md))
- [Automatic Reconnection](https://awesome-repositories.com/f/networking-communication/communication-protocols-architectures/communication-protocols-standards/network-protocols/connection-establishment-protocols/automatic-reconnection.md) — Automatically re-establishes underlying connections after encountering errors or end-of-file signals. ([source](https://github.com/vi/websocat/blob/master/doc.md))
- [Direct-to-Network File Streaming](https://awesome-repositories.com/f/networking-communication/direct-to-network-file-streaming.md) — Streams data from local files directly to network connections or logs traffic to disk using append operations. ([source](https://github.com/vi/websocat/blob/master/doc.md))
- [SOCKS5 Proxies](https://awesome-repositories.com/f/networking-communication/socks5-proxies.md) — Routes WebSocket connections through SOCKS5 or HTTP proxies to bypass network restrictions. ([source](https://github.com/vi/websocat/blob/master/moreexamples.md))
- [SOCKS5 Proxy Tunneling Clients](https://awesome-repositories.com/f/networking-communication/socks5-proxies/socks5-proxy-tunneling-clients.md) — Acts as a networking client that tunnels WebSocket traffic through SOCKS5 or HTTP proxies to bypass restrictions.
- [Text and Binary Message Exchanges](https://awesome-repositories.com/f/networking-communication/text-and-binary-message-exchanges.md) — Supports bidirectional transmission and conversion between binary bytes and UTF-8 encoded text messages. ([source](https://github.com/vi/websocat/blob/master/README.md))
- [Proxy-Routed](https://awesome-repositories.com/f/networking-communication/websocket-clients/proxy-routed.md) — Routes WebSocket connections through HTTP or SOCKS5 proxies using the CONNECT method to bypass network restrictions.
- [Stream Processors](https://awesome-repositories.com/f/networking-communication/websocket-to-stream-bridges/stream-processors.md) — Filters and transforms WebSocket data streams into line-based or binary records for external tools.
- [WebSocket Utilities](https://awesome-repositories.com/f/networking-communication/websocket-utilities.md) — Includes tools for inspecting raw traffic and protocol frames to debug WebSocket communication issues.

### Security & Cryptography

- [WebSocket Security](https://awesome-repositories.com/f/security-cryptography/websocket-security.md) — Establishes secure, encrypted WebSocket connections using TLS or static symmetric keys.
- [TLS Session Wrapping](https://awesome-repositories.com/f/security-cryptography/handshake-protocols/handshake-validations/tls-certificate-validations/tls-session-wrapping.md) — Wraps raw socket connections with TLS using PKCS#12 certificates for secure communication.
- [Message Encryption](https://awesome-repositories.com/f/security-cryptography/message-encryption.md) — Implements message-level encryption using the ChaCha20-Poly1305 algorithm for secure data transmission. ([source](https://github.com/vi/websocat/blob/master/doc.md))
- [Symmetric Encryption](https://awesome-repositories.com/f/security-cryptography/symmetric-encryption.md) — Secures raw byte streams using symmetric encryption with the ChaCha20-Poly1305 algorithm.
- [TLS Traffic Encryption](https://awesome-repositories.com/f/security-cryptography/tls-traffic-encryption.md) — Provides capabilities to wrap connections in TLS encryption or accept secure connections via certificates. ([source](https://github.com/vi/websocat/blob/master/doc.md))

### Development Tools & Productivity

- [Command Piping](https://awesome-repositories.com/f/development-tools-productivity/command-piping.md) — Pipes the standard input and output of external command-line programs directly to a network connection. ([source](https://github.com/vi/websocat/blob/master/doc.md))

### Operating Systems & Systems Programming

- [File and Console I/O](https://awesome-repositories.com/f/operating-systems-systems-programming/file-i-o-management/i-o-polling/file-and-console-i-o.md) — Facilitates interaction with the console by reading and writing to standard system input and output streams. ([source](https://github.com/vi/websocat/blob/master/doc.md))
- [Line-Based Record Processing](https://awesome-repositories.com/f/operating-systems-systems-programming/file-i-o-management/sequential-line-processing/line-based-record-processing.md) — Translates WebSocket messages into line-based records for compatibility with shell-based text processing tools.

### System Administration & Monitoring

- [WebSocket Protocol Relays](https://awesome-repositories.com/f/system-administration-monitoring/administrative-operations/linux-system-administration/networking/proxy-management-systems/multi-protocol-proxy-managers/multi-protocol-proxies/websocket-protocol-relays.md) — Bridges and routes data bidirectionally between WebSocket connections, TCP sockets, and UNIX sockets.

### Data & Databases

- [Streaming Data Transformers](https://awesome-repositories.com/f/data-databases/data-i-o/streaming-i-o/streaming-data-transformers.md) — Provides a transformation pipeline to modify data streams by adding timestamps or converting messages to lines. ([source](https://github.com/vi/websocat/blob/master/doc.md))

### Part of an Awesome List

- [Network Analysis and Simulation](https://awesome-repositories.com/f/awesome-lists/devops/network-analysis-and-simulation.md) — CLI client for WebSocket debugging and interaction.
