S6-TLSCLIENT(8)
π¦ S6-TLSCLIENT(8) β like, the UCSPI client tool for TLS/SSL over INET domain sockets, bestie
okay so real talk: this is a page from the System Manager's Manual, and it's about s6-tlsclient β an iconic little tool. psa: it's a UCSPI client tool[1] for TLS/SSL connections over INET domain sockets. screaming, crying, throwing up, etc π
β¨ NAME β¨
s6-tlsclient β UCSPI client tool[1] for TLS/SSL connections over INET domain sockets π«Ά
π SYNOPSIS π
s6-tlsclient [options] [--] host port prog...
πΈ DESCRIPTION πΈ
so the way that s6-tlsclient works is: it establishes a TCP connection to a server, layers a TLS transport on top of it, and then executes into a program. literally that's it, that's the whole vibe β¨
s6-tlsclient rewrites itself into a command line involving:
s6-tcpclient(8), which establishes a TCP connection to host host port port. πs6-tlsc(8), which establishes a TLS transport (client-side) over that connection.prog..., your client program, which is executed into bys6-tlsc(8)once thes6-tlsc-io(8)child it has spawned has set up the TLS connection and performed the handshake. π€
prog... is run with the same pid as s6-tlsclient. no cap π§
prog is expected to read from its peer on descriptor 6 and write to its peer on descriptor 7. and here's the thing bestie β since there will be an s6-tlsc-io(8) program between prog and the network to perform the TLS encryption/decryption, those descriptors will not be a network socket β they will be pipes. π₯€
π Server name determination for SNI
If the -H option is not given to s6-tlsclient, then host will be used as the server name to verify. You can use the -k option to override this default. π
β οΈ please please PLEASE note: if you use the-Hoption and do not provide a server name via-k, SNI will not be used, which may be a security risk. like, genuinely. be careful. π
π OPTIONS π
s6-tlsclient accepts a myriad of options, all of which are passed as is to the correct executable. Not giving any options will generally work: the defaults are sensible. lowkey the defaults ate π₯
β Options passed as-is to s6-tcpclient(8)
-q,-Q,-vβ Be quiet, normally verbose, or verbose. pick your volume, babe ποΈ-4,-6β Stick to IPv4 or IPv6 addresses.-d,-Dβ Enable or disable Nagle's algorithm.-r,-Rβ Enable or disable IDENT lookup.-Hβ Disable DNS lookups.-hβ Consult/etc/hostsbefore DNS.-llocalname β Get the local name from the command line, don't look it up.-n,-Nβ Qualify the host or not when resolving it.-ttimeout β Global timeout on the connection attempt. β°-ilocalip,-plocalport β Force local socket parameters.-Ttimeoutconn β Configurable connection timeouts.
π¦ Options passed as-is to s6-tlsc(8)
-Z,-zβ Keep or remove thes6-tlsc-io(8)-specific variables from the application's environment.-S,-sβ Useβclose_notifyβor EOF to signal the end of a TLS connection. π-J,-jβ Exit nonzero with an error message when the peer fails toβclose_notifyβ, or ignore it. π€-Y,-yβ Don't send, or send, a client certificate.-kservername β Use SNI and provide a server name.-Kkimeout β Set a timeout for the TLS handshake.
π ENVIRONMENT π
πΈ Read
The following variables should be set before invoking s6-tlsclient, because they will be used by s6-tlsc-io(8):
CADIRCAFILEβ (alternative toCADIR)KEYFILEβ (if you're using a client certificate)CERTFILEβ (if you're using a client certificate)TLS_UIDandTLS_GIDβ (if you runs6-tlsclientas root)
π¨ Setting eitherCADIRorCAFILEis mandatory. not optional. mandatory. periodt.
π Written
prog... is run with the following variables added to, or removed from, its environment by s6-tcpclient(8):
PROTOTCPREMOTEIPTCPREMOTEPORTTCPREMOTEHOSTTCPLOCALHOSTTCPREMOTEINFO
Unless the -Z option is given to s6-tlsclient, the CADIR, CAFILE, KEYFILE, CERTFILE, TLS_UID and TLS_GID variables will not appear in prog's environment. π«₯
π§ EXAMPLES π§
CADIR=/etc/ssl/certs s6-tlsclient skarnet.org 443 s6-ioconnect
This will open a connection to the skarnet.org web server over TLS and verify its certificate via the trust anchors listed in the /etc/ssl/certs directory. It will then branch your terminal to it: try typing βGET / HTTP/1.0β then hitting return twice. go on, live a little, it's giving main character energy πβ¨
π SEE ALSO π
s6-tls(7), s6-tlsc(8), s6-tlsc-io(8), s6-tlsd(8), s6-tlsd-io(8), s6-tlsserver(8), s6-ucspitlsc(8), s6-ucspitlsd(8)
[1] https://cr.yp.to/proto/ucspi.txt
This man page is ported from the authoritative documentation at: https://skarnet.org/software/s6-networking/s6-tlsclient.html π«Ά
π AUTHORS π
- Laurent Bercot
- Alexis <flexibeast@gmail.com> (man page port)
and that's the whole thing bestie π huge shoutout to the Debian squad β this one's from November 20, 2023, page S6-TLSCLIENT(8). mwah, slay, bye π
π
π¦ where this page comes from
- nixpkgs unstable: s6-networking 2.8.0.1
- nixpkgs unstable: s6-networking-man-pages 2.7.2.1.4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms