⚠⚠⚠ Deprecated: ⚠⚠⚠
This repository is deprecated in favor of libcontainerssh for ContainerSSH 0.5.
This is the SSH proxy backend for ContainerSSH, which forwards connections to a backend SSH server.
This library implements a NetworkConnectionHandler
from the sshserver library. This can be embedded into a connection handler.
The network connection handler can be created with the New()
method:
var client net.TCPAddr
connectionID := "0123456789ABCDEF"
config := sshproxy.Config{
//...
}
collector := metrics.New()
proxy, err := sshproxy.New(
client,
connectionID,
config,
logger,
collector.MustCreateCounter("backend_requests", "", ""),
collector.MustCreateCounter("backend_failures", "", ""),
)
if err != nil {
// Handle error
}
The logger
parameter is a logger from the ContainerSSH logger library.