Secure Client for exposing TLS (aka SSL) secured services as plain-text connections locally. Also ideal for multiplexing a single port with multiple protocols using SNI.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.3 KiB

2 years ago
sclient unwraps SSL.
It makes secure remote connections (such as HTTPS) available locally as plain-text connections -
similar to `stunnel` or `openssl s_client`.
There are a variety of reasons that you might want to do that,
but we created it specifically to be able to upgrade applications with legacy
2 years ago
security protocols - like SSH, OpenVPN, and Postgres - to take
advantage of the features of modern TLS, such as ALPN and SNI
(which makes them routable through almost every type of firewall).
See for more info.
Package Basics
2 years ago
In the simplest case you'll just be setting a ServerName and connection info:
2 years ago
servername := ""
sclient := &sclient.Tunnel{
ServerName: servername,
RemoteAddress: servername,
RemotePort: 443,
LocalAddress: "localhost",
LocalPort: 3000,
err := sclient.DialAndListen()
2 years ago
Try the CLI
If you'd like to better understand what sclient does, you can try it out with `go run`:
go get
go run localhost:3000
curl http://localhost:3000 -H "Host:"
Pre-built versions for various platforms are also available at
package sclient