1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/socat.md

16 lines
394 B
Markdown
Raw Normal View History

2016-01-19 17:55:37 +09:00
# socat
2016-01-19 19:53:40 +09:00
> Multipurpose relay (SOcket CAT).
2016-01-19 17:55:37 +09:00
2016-01-20 10:22:04 +09:00
- Listen to a port, wait for an incoming connection and transfer data to STDIO:
2016-01-19 17:55:37 +09:00
`socat - TCP-LISTEN:8080,fork`
2016-01-19 19:53:40 +09:00
- Create a connection to a host and port, transfer data in STDIO to connected host:
2016-01-19 17:55:37 +09:00
`socat - TCP4:www.domain.com:80`
2016-01-20 10:22:04 +09:00
- Forward incoming data of a local port to another host and port:
2016-01-19 17:55:37 +09:00
`socat TCP-LISTEN:80,fork TCP4:www.domain.com:80`