Categorygithub.com/containerssh/sshproxy
repositorypackage
1.0.0
Repository: https://github.com/containerssh/sshproxy.git
Documentation: pkg.go.dev

# README

ContainerSSH - Launch Containers on Demand

ContainerSSH SSH Proxy Backend

Go Report Card LGTM Alerts

This is the SSH proxy backend for ContainerSSH, which forwards connections to a backend SSH server.

⚠⚠⚠ Warning: This is a developer documentation. ⚠⚠⚠
The user documentation for ContainerSSH is located at containerssh.io.

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.