SOCAT cheat sheet
Remember that socat usually has 2 legs. Both are connected bidirectionally.
| Listen/Passive | Connect/Active | |
|---|---|---|
| TCPv4 | TCP4-LISTEN:8000,reuseaddr,fork | TCP4:192.168.1.5:8000 |
| OpenSSL | OPENSSL:192.168.1.5:1443,pf=ip4,verify=0, |
|
| Unix Socket | UNIX-LISTEN:mysqld.sock,mode=777,reuseaddr,fork | UNIX-CONNECT:mysqld.sock.orig |
| SOCKSv4 | SOCKS4:socks-server.local:10.1.2.3:22, (First IP is socks server, Second IP is destination server). |
|
| HTTP Proxy | PROXY:aproxy.local:example.com:80, |
|
| STDIO | - / STDIN | - / STDOUT / STDERR |
| Misc | EXEC:/bin/bash
FILE:/dev/null |
Example certificate file server.pem: [Click here to show]
Marcador RSS