Socat is a relay for bidirectional data transfer between two independent data channels. Each of these data channels may be a file, pipe, device (terminal or modem, etc.), socket (Unix, IP4, IP6 - raw, UDP, TCP), SSL, a client for SOCKS4, or proxy CONNECT. It supports broadcasts and multicasts, abstract Unix sockets, Linux tun/tap, GNU readline, and PTYs. It provides forking, logging, and dumping and different modes for interprocess communication. Many options are available for tuning socat and its channels. Socat can be used, for example, as a TCP relay (one-shot or daemon), as a daemon-based socksifier, as a shell interface to Unix sockets, as an IP6 relay, or for redirecting TCP-oriented programs to a serial line.
| Tags | Utilities |
|---|---|
| Licenses | GPL |
| Operating Systems | POSIX AIX BSD FreeBSD Linux Solaris |
| Implementation | C |
Recent releases


Release Notes: Fixes a possible heap buffer overflow in the readline address.


Release Notes: This release allows tun/tap interfaces without IP addresses and introduces the options openssl-compress and max-children. It fixes 18 bugs and has 11 changes for improved platform support, especially Mac OS X Lion, DragonFly, and Android.


Release Notes: A stack overflow vulnerability has been fixed that could be triggered when command line arguments were longer than 512 bytes.


Release Notes: This release fixes some bugs: building on RedHat systems, OpenSSL "nonblock" failure, Debian bug 531078 (SIGCHLD), 64-bit issues, and some minor bugs.


Release Notes: This release fixes a couple of bugs, some of which could crash socat under some circumstances.
Recent comments
07 Apr 2008 15:51
Awesome UNIX utility!
I had written a small program, named sockio, which does a (very) small subset of what this awesome socat utility does. When I discovered socat, I was impressed by the number of useful features, in particular SSL support.
With its clean design, this utility keeps the spirit of UNIX: Basic utilities that can be piped or connected together!
The possibilities are infinite. I can now connect together any two bi-directional streams.
Now, I'm tempted to write a Windows port.
27 Jan 2007 10:40
Far more than a swiss army knife of networking ;)
The most interesting options IMHO are builtin SSL and SOCKS support. With the latter it's easy to map a TOR hidden service to a local port to access it like any other service on the Internet. Here you have the answer to (nearly) all your networking interconnection needs you ever might think of.
16 Jul 2006 01:00
A+++ for socat
Truly awesome, we use it extensively in productions systems and it rocks! Please keep developing!
Cheers,
SS
04 Oct 2002 17:54
Fantastic!!!
Friggin' unbelievable! All my dreams come true! Now i can pipe stdin to the UDP:syslog port, or redirect the output of /bin/ls to an arbitrary TCP port on an arbitrary host! Stuff like that.
Awesome! Really, really awesome!
Thank you for the excellent application!