Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // git rev-parse --short HEAD GitHash string // git describe --tags Version string )
Build variables, set when building the binary
View Source
var ErrNoKnownHostsFile = errors.New("sshconfig: missing known hosts file")
ErrNoKnownHostsFile is returned when the KnownHostsFile field is empty.
Functions ¶
This section is empty.
Types ¶
type MetaConfig ¶ added in v0.0.10
type MetaConfig struct { KnownHostsFile string SSHDialTimeout time.Duration // contains filtered or unexported fields }
MetaConfig holds configuration options to use to create SSH client configurations.
func (*MetaConfig) WithAgent ¶ added in v0.0.10
func (c *MetaConfig) WithAgent(user string) (*ssh.ClientConfig, error)
WithAgent returns an SSH ClientConfig that authenticates via the SSH agent.
type Server ¶
type Server struct { // The address the server listens on. Addr net.Addr // The MetaConfig to use to create SSH ClientConfig. MetaConfig *MetaConfig // Duration before the tunnels stop if there is no active connection. TunnelIdleTimeout time.Duration // Write timeout before returning a network error on a write attempt. WriteTimeout time.Duration // If not nil, this is an expvar map that contains statistics about the server, // tunnels and connections. Stats *expvar.Map // The channel to send errors to. If nil, the errors are logged. // If the send would block, the error is dropped. It is the responsibility // of the caller to close the channel once the Server is stopped. // If set, this ErrChain is used for all Tunnels started by this // Server. ErrChan chan<- error // contains filtered or unexported fields }
Server defines the regis-companion Server that listens for incoming connections and manages SSH tunnels.
Click to show internal directories.
Click to hide internal directories.