Socat
From Attie's Wiki
(Difference between revisions)
(Created page with "==Pipe a Unix socket over TCP== ===Server (next to the listening Unix socket)=== <source lang="bash"> socat TCP-LISTEN:27015,reuseaddr,fork UNIX-CLIENT:/tmp/ns </source> <sour...") |
m (→Client (to create a listening Unix socket)) |
||
(One intermediate revision by one user not shown) | |||
Line 1: | Line 1: | ||
− | == | + | ==Route a Unix socket over TCP== |
===Server (next to the listening Unix socket)=== | ===Server (next to the listening Unix socket)=== | ||
<source lang="bash"> | <source lang="bash"> | ||
Line 11: | Line 11: | ||
===Client (to create a listening Unix socket)=== | ===Client (to create a listening Unix socket)=== | ||
<source lang="bash"> | <source lang="bash"> | ||
− | socat UNIX-LISTEN:/tmp/ns,fork TCP-CONNECT:myserver:27015 | + | socat UNIX-LISTEN:/tmp/ns,fork,unlink-early TCP-CONNECT:myserver:27015 |
</source> | </source> |
Latest revision as of 15:38, 24 September 2015
[edit] Route a Unix socket over TCP
[edit] Server (next to the listening Unix socket)
socat TCP-LISTEN:27015,reuseaddr,fork UNIX-CLIENT:/tmp/ns
socat TCP-LISTEN:27015,bind=127.0.0.1,reuseaddr,fork,su=nobody,range=127.0.0.0/8 UNIX-CLIENT:/tmp/ns
[edit] Client (to create a listening Unix socket)
socat UNIX-LISTEN:/tmp/ns,fork,unlink-early TCP-CONNECT:myserver:27015