WEBSOCAT(1) User Commands WEBSOCAT(1) (NAME) websocat - netcat curl socat ws:// (DESCRIPTION) websocat 1.14.1 Vitaly "_Vi" Shukela netcat/curl/socat ws://. (USAGE): websocat ws://URL | wss://URL ( ) websocat -s port ( ) websocat [FLAGS] [OPTIONS] ( ) (FLAGS): ( --help=long ) -e, --set-environment WEBSOCAT_* exec:/cmd:/sh-c: WEBSOCAT_URI WEBSOCAT_CLIENT URI ( TCP) . (ShellShock) . -E, --exit-on-eof EOF --jsonrpc JSON RPC 2.0. ( [] ). -0, --null-terminated \0 \n (linemode) --no-fixups Websocat. -1, --one-message / . --no-close / -u/-U . --oneshot . -1 (--one-message) --print-ping-rtts (RTT) stderr (pong) . -q -s, --server-mode : TCP addr:port -S, --strict / : . -k, --insecure TLS -u, --unidirectional -U, --unidirectional-reverse ( -u) -v info -b, --binary -n, --no-close Close EOF -t, --text --base64 Base64. `--binary-prefix` ( `--help=full` ) base64 . (OPTIONS): ( --help=long ) --socks5 address:port SOCKS5. : --socks5 127.0.0.1:9050 --basic-auth HTTP `Authorization: Basic` base64. `WEBSOCAT_BASIC_AUTH` --basic-auth-file HTTP `Authorization: Basic` base64 -B, --buffer-size [: 65536] --close-reason . --close-status-code . --close-status-code . -H, --header ... HTTP . . . -H . -H='X: y' . --server-header ... HTTP (upgrade) . . . -H . --header-to-env ... H_* `exec:`. -h, --help . --help=short --help=long ( [A] ) --help=doc . --max-messages . --max-messages-rev . --conncap (listening) --origin HTTP Origin --pkcs12-der Pkcs12 SSL . : openssl pkcs12 -export -out output.pkcs12 -inkey key.pem -in cert.pem -s (--server-mode) TLS . moreexamples.md . --pkcs12-passwd pkcs12 --pkcs12-der. Mac . -p, --preamble ... . . -P, --preamble-reverse ... ( ). . --restrict-uri URI `/ws` URI . -F, --static-file ... . : :: : /index.html:text/html:index.html . . `-F=...` --ua `User-Agent` . `-H`. --protocol Sec-WebSocket-Protocol: --server-protocol Sec-WebSocket-Protocol: --websocket-version Sec-WebSocket-Version --ping-interval --ping-timeout Pong (ARGS): URL . ( ) . --help=types . . . . (Basic examples): : websocat ws://ws.vi-server.org/mirror : websocat -s 8080 TCP: websocat --binary ws-l:127.0.0.1:8080 tcp:127.0.0.1:5678 (Partial list of address types): ws:// (ws://). URL . wss:// (wss://). URL . ws-listen: . . wss-listen: TCP tcp: TCP . . tcp-listen: TCP . ssl-listen: SSL TCP sh-c: `sh -c` ( ) cmd: `sh -c` `cmd /C` ( ) readfile: . . writefile: . appendfile: . udp: UDP UDP udp-listen: UDP host:port - . (thread) `--async-stdio` . mirror: . . literalreply: . literal: . random: . (Partial list of overlays): broadcast: . autoreconnect: EOF foreachmsg: . log: () . --help=long . --dump-spec --help=doc websocat 1.14.1 July 2026 WEBSOCAT(1)