espelhamento de https://github.com/therootcompany/sclient
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.
https://webinstall.dev/sclient
Você não pode selecionar mais de 25 tópicos
Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
38 linhas
1.1 KiB
38 linhas
1.1 KiB
/*
|
|
Package 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
|
|
security protocols - like SSH, OpenVPN, and Postgres - to be able to take
|
|
advantage of the features modern TLS, such as ALPN and SNI
|
|
(which makes them routable through almost every type of firewall).
|
|
|
|
See https://telebit.cloud/sclient for more info.
|
|
|
|
Try the CLI
|
|
|
|
go get git.rootprojects.org/root/sclient.go/cmd/sclient
|
|
go run git.rootprojects.org/root/sclient.go/cmd/sclient example.com:443 localhost:3000
|
|
|
|
Package Basics
|
|
|
|
servername := "example.com"
|
|
|
|
sclient := &sclient.Tunnel{
|
|
ServerName: servername,
|
|
RemoteAddress: servername,
|
|
RemotePort: 443,
|
|
LocalAddress: "localhost",
|
|
LocalPort: 3000,
|
|
}
|
|
|
|
err := sclient.DialAndListen()
|
|
|
|
Pre-built versions for various platforms are also available at
|
|
https://telebit.cloud/sclient
|
|
|
|
*/
|
|
package sclient
|