Multipurpose relay (SOcket CAT)
open sourceGPL-2.0-onlyself-hostablefree
socat is a command-line relay for bidirectional data transfer between two independent data channels, a netcat with a far wider design. Each channel can be a file, pipe, serial line or pseudo terminal, a UNIX, TCP, UDP, SCTP or raw IP socket over IPv4 or IPv6, an SSL connection, a proxy CONNECT or SOCKS connection, a program, readline or a file descriptor, and it can listen, fork per connection and run as a daemon. It is used as a TCP port forwarder, a shell interface to UNIX sockets, an IPv6 relay or a bridge between a TCP program and a serial line, with many options for sockets, terminals, permissions and tracing.
Problems it solves
- forward a local TCP port to another host and port from the command line
- talk to a UNIX domain socket from a shell script
- connect a program that only speaks TCP to a serial device
- relay IPv4 clients to a service that only listens on IPv6
- netcat isn't flexible enough and I need fork-per-connection and SSL
- expose a serial port or pseudo terminal over the network
- debug a protocol by dumping the bytes flowing between two endpoints
- make a quick TLS client or server for testing from the terminal
Features
- files, pipes, devices, pseudo terminals and file descriptors
- TCP, UDP, SCTP, DCCP, UNIX and raw IP sockets over IPv4 and IPv6
- OpenSSL client and server
- SOCKS4, SOCKS5 and HTTP proxy CONNECT
- listening sockets, fork per connection, daemon mode
- exec and system addresses to run programs
- socket, terminal, permission and ownership options, chroot
- debug, trace and hex dump options; logging to syslog, stderr or file
- filan and procan helper tools
Capabilities
| Has a command line tool | plan not known |
|---|