2016-01-19 08:55:37 +00:00
|
|
|
# socat
|
|
|
|
|
2016-01-19 10:53:40 +00:00
|
|
|
> Multipurpose relay (SOcket CAT).
|
2022-02-01 09:06:33 +00:00
|
|
|
> More information: <http://www.dest-unreach.org/socat/>.
|
2016-01-19 08:55:37 +00:00
|
|
|
|
2016-01-20 01:22:04 +00:00
|
|
|
- Listen to a port, wait for an incoming connection and transfer data to STDIO:
|
2016-01-19 08:55:37 +00:00
|
|
|
|
|
|
|
`socat - TCP-LISTEN:8080,fork`
|
|
|
|
|
2016-01-19 10:53:40 +00:00
|
|
|
- Create a connection to a host and port, transfer data in STDIO to connected host:
|
2016-01-19 08:55:37 +00:00
|
|
|
|
2019-05-13 14:33:05 +01:00
|
|
|
`socat - TCP4:www.example.com:80`
|
2016-01-19 08:55:37 +00:00
|
|
|
|
2016-01-20 01:22:04 +00:00
|
|
|
- Forward incoming data of a local port to another host and port:
|
2016-01-19 08:55:37 +00:00
|
|
|
|
2019-05-13 14:33:05 +01:00
|
|
|
`socat TCP-LISTEN:80,fork TCP4:www.example.com:80`
|