websocketd(8)
β¨ websocketd(8) β the manual page, but make it a group chat β¨
okay bestie, sit down, hydrate, because this one is iconic. This is the manual page for websocketd, and honestly? It's giving "tiny tool, massive slay." π
πΈ NAME πΈ
websocketd β turns any program that uses STDIN/STDOUT into a WebSocket server.
periodt. that's the whole vibe. π
π¦ SYNOPSIS π¦
websocketd [options] COMMAND [command args]
or
websocketd [options] --dir=SOMEDIR
likeβ¦ pick a lane, both lanes are cute π«Ά
π DESCRIPTION π
websocketd is a command line tool that will allow any executable program that accepts input on stdin and produces output on stdout to be turned into a WebSocket server.
no cap. your little script that just reads stdin and writes stdout? boom. WebSocket server. main character energy fr fr. β¨
To learn more about websocketd visit http://websocketd.com and project WIKI on GitHub! π
π OPTIONS π
A summary of the options supported by websocketd is included below.
--port=PORTβ the HTTP port to listen on. that's the door, bestie πͺ--address=ADDRESSβ the Address to bind to (multiple options allowed, yes you can stack them π ). Use square brackets to specify IPv6 address. Default:""(all)--sameorigin={true,false}β Restrict (HTTP 403) protocol upgrades if theOriginheader does not match to requested HTTPHost. Default:false. so by default it's just vibes and open doors, set it to true if you want to be picky π«--origin=host[:port][,host[:port]...]β Restrict (HTTP 403) protocol upgrades if theOriginheader does not match to one of the host and port combinations listed. If the port is not specified, any port number will match. Default:""(allow any origin). lowkey a VIP list, comma-separated and everything ποΈ--ssl--sslcert=FILE--sslkey=FILEβ Listen for HTTPS socket instead of HTTP. All three options must be used or all of them should be omitted. > it's all three or none, bestie, there is NO in-between π--passenv VAR[,VAR...]β Lists environment variables allowed to be passed to executed scripts. like a lil guest list for your env vars π--reverselookup={true,false}β Perform DNS reverse lookups on remote clients. Default:true--dir=DIRβ Allow all scripts in the local directory to be accessed as WebSockets. If using this, option, then the standard program and args options should not be specified. so like, pick one?? don't do both π--staticdir=DIRβ Serve static files in this directory over HTTP.--cgidir=DIRβ Serve CGI scripts in this directory over HTTP.--helpβ Print help and exit. the classic π«Ά--versionβ Print version and exit.--licenseβ Print license and exit.--devconsoleβ Enable interactive development console. This enables you to access the websocketd server with a web-browser and use a user interface to quickly test WebSocket endpoints. For example, to test an endpoint atws://[host]/foo, you can visithttp://[host]/fooin your browser. This flag cannot be used in conjunction with--staticdiror--cgidir. > obsessed with this one honestly, it's the "just test it in the browser" button π§β¨ and yes it does NOT play nice with--staticdiror--cgidir--loglevel=LEVELβ Log level to use (defaultaccess). From most to least verbose:debug,trace,access,info,error,fatal. sodebugis the yapper andfatalis the one who speaks once and only once π
π SEE ALSO π
- full documentation at http://websocketd.com
- project source at https://github.com/joewalnes/websocketd
go read, bestie, the wiki is cute π
π BUGS π
The only known condition so far is that certain applications in programming languages that enforce implicit STDOUT buffering (Perl, Python, etc.) would be producing unexpected data passing delays when run under websocketd. Such issues could be solved by editing the source code of those applications (prohibiting buffering) or modifying their environment to trick them into autoflush mode (e.g. pseudo-terminal wrapper "unbuffer").
translation: your Perl/Python script is holding the message in drafts instead of sending it π and yeah you gotta fix that on your side, either by editing the source (no buffering, periodt) or by tricking it into autoflush mode with something like the pseudo-terminal wrapper "unbuffer".
Active issues in development are discussed on GitHub: https://github.com/joewalnes/websocketd/issues.
Please use that page to share your concerns and ideas about websocketd, authors would greatly appreciate your help! π«Ά drop your thoughts, they're literally asking for them.
π AUTHOR π
Copyright 2013-2014 Joe Walnes and the websocketd team. All rights reserved.
BSD license: Run websocketd --license for details.
okay that's the whole page, you ate it, go build something π π
this was version 0.0, dated 28 Sep 2014, from the websocketd(8) manual β and that's the sign-off, bestie. mwah. πβ¨
π¦ where this page comes from
- debian bookworm: websocketd 0.4.1-1+b11 Β· BSD-2-Clause
- debian trixie: websocketd 0.4.1-1+b23 Β· BSD-2-Clause
- ubuntu jammy: websocketd 0.4.1-1 Β· BSD-2-Clause
- ubuntu noble: websocketd 0.4.1-1build1 Β· BSD-2-Clause
- ubuntu noble: websocketd 0.4.1-1ubuntu0.24.04.3 Β· BSD-2-Clause
- ubuntu questing: websocketd 0.4.1-1build1
- ubuntu resolute: websocketd 0.4.1-1build2 Β· BSD-2-Clause
- ubuntu stonking: websocketd 0.4.1-1build2 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms