sclient

ssl unwrapper for Windows, Mac, and Linux

a poor man's alternative to openssl s_client , stunnel , socat for the simple use case of connecting a client application that doesn't support tls+sni through a secure connection, https proxy, or sni multiplexer (think telnet , netcat , ssh , openvpn , etc).

Usage

$ sclient [flags] <remote> <local>

$ sclient example.com:443 localhost:3000

Flags

-k, --insecure ignore invalid tls certificates

ignore invalid tls certificates --servername <string> spoof SNI (to disable use IP as <remote> and do not use this option)

Arguments

<remote> the servername and port of the tls-enabled server (default port is 443)

the servername and port of the tls-enabled server (default port is 443) <local> the local address and port to bind to (default bind address is 127.0.0.1 or ::1) - may be used to read from stdin (like netcat) may be omitted when piping (see pipe example below)

the local address and port to bind to (default bind address is 127.0.0.1 or ::1)

Examples

SSH $ ssh -o ProxyCommand="sclient %h" jon.telebit.io This is useful to be able to connect to SSH even from behind a corporate packet-inspection firewall. It can also be used to multiplex and relay multiple ssh connections through a single host.

Telnet (HTTP/HTTPS) $ sclient whatever.com:443 localhost:3000 > [listening] whatever.com:443 <= localhost:3000 $ telnet localhost 3000

Telnet (SMTP/SMTPS/STARTTLS) $ sclient smtp.gmail.com:465 localhost:2525 > [listening] smtp.gmail.com:465 <= localhost:2525 $ telnet localhost 2525 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. 220 smtp.gmail.com ESMTP c79-v6sm37968282pfb.147 - gsmtp

stdin/stdout $ sclient whatever.com - > (connected to whatever.com:443 and reading from stdin) Use just like netcat or telnet. A manual HTTP request, for example: > GET / HTTP/1.1 > Host: whatever.com > Connection: close >

pipe $ printf "GET / HTTP/1.1\r

Host: telebit.cloud\r

\r

" | sclient telebit.cloud

Downloads (standalone) v1.2

Source Code

sclient is maintained simultaneously in go and node.js