103 lines
3.7 KiB
HTML
103 lines
3.7 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>sclient - tls unwrapper for Windows, Mac, and Linux</title>
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<h1>sclient</h1>
|
|
<p>ssl unwrapper for Windows, Mac, and Linux</p>
|
|
<p>a poor man's alternative to <code>openssl s_client</code>, <code>stunnel</code>, <code>socat</code>
|
|
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 <code>telnet</code>, <code>netcat</code>, <code>ssh</code>, <code>openvpn</code>, etc).</p>
|
|
|
|
<h2>Usage</h2>
|
|
<pre><code>$ sclient [flags] <remote> <local></code></pre>
|
|
<pre><code>$ sclient example.com:443 localhost:3000</code></pre>
|
|
<h3>Flags</h3>
|
|
<ul>
|
|
<li><kbd>-k, --insecure</kbd> ignore invalid tls certificates</li>
|
|
<li><kbd>--servername <string></kbd> spoof SNI
|
|
(to disable use IP as <remote> and do not use this option)</li>
|
|
</ul>
|
|
<h3>Arguments</h3>
|
|
<ul>
|
|
<li><kbd><remote></kbd> the servername and port of the tls-enabled server (default port is 443)</li>
|
|
<li><kbd><local></kbd> the local address and port to bind to (default bind address is 127.0.0.1 or ::1)
|
|
<ul>
|
|
<li><code>-</code> may be used to read from stdin (like netcat)</li>
|
|
<li>may be omitted when piping (see pipe example below)</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
|
|
<h2>Examples</h2>
|
|
<h3>SSH</h3>
|
|
<pre><code>$ ssh -o ProxyCommand="sclient %h:443" jon.telebit.io</code></pre>
|
|
|
|
<p>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.
|
|
</p>
|
|
|
|
<h3>Telnet </h3>
|
|
<pre><code>$ sclient example.com:443 localhost:3000
|
|
> [listening] example.com:443 <= localhost:3000</code></pre>
|
|
<pre><code>$ telnet localhost 3000</code></pre>
|
|
<h3>stdin/stdout</h3>
|
|
<pre><code>$ sclient whatever.com -
|
|
> (connected to whatever.com:443 and reading from stdin)</code></pre>
|
|
Use just like netcat or telnet. A manual HTTP request, for example:
|
|
<pre><code>> GET / HTTP/1.1
|
|
> Host: whatever.com
|
|
> Connection: close
|
|
>
|
|
</code></pre>
|
|
|
|
<h3>pipe</h3>
|
|
<pre><code>$ printf "GET / HTTP/1.1\r\nHost: telebit.cloud\r\n\r\n" | sclient telebit.cloud</code></pre>
|
|
|
|
<h2>Downloads (standalone) <small>v1.2</small></h2>
|
|
<ul>
|
|
<li>Windows 7/8/10
|
|
<a href="dist/windows/amd64/sclient.exe">Download</a>
|
|
| <a href="dist/windows/386/sclient.exe">(x86)</a>
|
|
</li>
|
|
<li>macOS / OS X / Darwin
|
|
<a href="dist/darwin/amd64/sclient">Download</a>
|
|
</li>
|
|
<li>Linux Ubuntu/Arch/etc
|
|
<a href="dist/linux/amd64/sclient">Download</a>
|
|
| <a href="dist/linux/386/sclient">(386)</a>
|
|
</li>
|
|
<li>Raspberry Pi
|
|
<a href="dist/linux/armv7/sclient">Download</a>
|
|
| <a href="dist/linux/armv5/sclient">(Pi Zero)</a>
|
|
</li>
|
|
<li>Source Code
|
|
<a href="https://git.coolaj86.com/coolaj86/sclient.go">Go (golang)</a>
|
|
| <a href="https://git.coolaj86.com/coolaj86/sclient.js">node.js</a>
|
|
</li>
|
|
</ul>
|
|
|
|
<h2>Source Code</h2>
|
|
<p><code>sclient</code> is maintained simultaneously in go and node.js</p>
|
|
<ul>
|
|
<li>Go
|
|
<ul>
|
|
<li><a href="https://git.coolaj86.com/coolaj86/sclient.go">git</a></li>
|
|
<li><a href="https://git.coolaj86.com/coolaj86/sclient.go/archive/master.zip">zip</a></li>
|
|
</ul>
|
|
</li>
|
|
<br>
|
|
<li>node.js
|
|
<ul>
|
|
<li><a href="https://git.coolaj86.com/coolaj86/sclient.js">git</a></li>
|
|
<li><a href="https://git.coolaj86.com/coolaj86/sclient.js/archive/master.zip">zip</a></li>
|
|
<li><kbd>npm install -g sclient</kbd></li>
|
|
</ul>
|
|
|
|
</body>
|
|
</html>
|