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


Changes: This release fixes a couple of bugs, some of which could crash socat under some circumstances.


Changes: This beta release contains all features and bugfixes of 1.7.1.0 and 2.0.0-b2, and adds the ability to integrate external programs and scripts into address chains.


Changes: This version provides a few new address options to better control its closing behavior.


Changes: This release fixes a few bugs: a possible SIGSEGV in listening addresses, client connections with option connect-timeout failed when the connections succeeded, the option end-close "did not apply" to some addresses, and a half close of EXEC and SYSTEM addresses might have failed for pipes and socketpair.


Changes: The main enhancements are so-called address chains that concatenate simple addresses. Address chains are similar to command shell pipes, but work bidirectionally.
- All comments
Recent commentsAwesome 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.
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.
A+++ for socat
Truly awesome, we use it extensively in productions systems and it rocks! Please keep developing!
Cheers,
SS
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!