Documentation
¶
Overview ¶
Command pipecat is netcat for pipe: it connects stdin and stdout of two processes on two machines through a pipe connection.
Start a signaling server somewhere both machines can reach (see examples/signaling), then on the first machine:
pipecat -signal https://signal.example.net/pipe -token "$BOB_TOKEN" -id bob listen
and on the second:
echo hello | pipecat -signal https://signal.example.net/pipe -token "$ALICE_TOKEN" -id alice dial bob
Whatever alice writes, bob reads, and the other way around. Because the connection is a net.Conn, anything that works over netcat works here: pipe a file, an SSH session (ProxyCommand), a tar stream, or a terminal.
Without STUN or TURN the two peers can only meet when host addresses are directly reachable, which is true on one LAN and almost never across the internet. Add servers with -stun and -turn:
pipecat ... -stun stun:stun.l.google.com:19302 \
-turn 'turn:relay.example.net:3478?transport=udp' -turn-user alice -turn-pass "$PASS" dial bob
The -relay-only flag forces the connection through TURN, which is the way to check a relay actually works.