Skip to content
This repository has been archived by the owner on Oct 2, 2022. It is now read-only.

ContainerSSH/sshproxy

ContainerSSH - Launch Containers on Demand

ContainerSSH SSH Proxy Backend

⚠⚠⚠ 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.

Using this library

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.