-
-
Notifications
You must be signed in to change notification settings - Fork 0
Relay Mode
Chokri Hammedi edited this page Aug 2, 2026
·
1 revision
Relay mode connects two endpoints and moves bytes in both directions:
wcat relay [options] LEFT RIGHT
- standard input/output
stdio standard input/output
tcp:HOST:PORT outbound TCP connection
listen:HOST:PORT inbound TCP listener, accepts one peer
unix:PATH outbound Unix domain socket connection
unix-listen:PATH inbound Unix domain socket listener, accepts one peer
file:PATH read/write file endpoint, created if missing
exec:PATH process endpoint using pipes
pty:PATH process endpoint using a POSIX PTY
-
HOSTmay be an IPv4 address, IPv6 address, or resolvable hostname. -
PORTmust be numeric, from1to65535. -
listen:HOST:PORTaccepts one connection for the relay session. -
unix:PATHandunix-listen:PATHuse stream Unix domain sockets. -
exec:PATHandpty:PATHexecute the path directly; shell parsing is not applied. -
pty:PATHis intended for interactive programs that expect terminal behavior. -
file:PATHopens the file read/write and creates it with mode0600when it does not exist.
Standard input/output to TCP:
wcat relay - tcp:example.com:80Local listener to remote TCP:
wcat relay listen:127.0.0.1:9000 tcp:10.0.0.5:22Unix socket to process:
wcat relay unix-listen:/tmp/wcat.sock exec:/usr/bin/teeProcess relay:
wcat relay - exec:/usr/bin/teeCapture TCP traffic to a file:
wcat relay tcp:127.0.0.1:9000 file:./capture.binPTY-backed shell relay:
wcat relay listen:0.0.0.0:4444 pty:/bin/shHex inspection with timeout:
wcat relay --hex --timeout 10 tcp:127.0.0.1:8000 file:./trace.bin