sshtunnel

package
v0.28.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2026 License: Apache-2.0 Imports: 8 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SshTunnel

type SshTunnel struct {
	Host string
	Port int
	User string
	// PrivateKeys are the keys offered to the server, most preferred first. SSH
	// public-key auth tries them in order and the server accepts the first one
	// it trusts, so a caller rotating its key can offer the new key alongside
	// the one it replaces and no handshake breaks while the server's
	// authorized_keys is being updated.
	//
	// Offer only the keys that are still meant to work: OpenSSH counts every
	// attempt against MaxAuthTries (6 by default) and drops the connection once
	// it is exhausted, so a long list of retired keys can fail a handshake the
	// first entry would have completed.
	PrivateKeys [][]byte
	Timeout     time.Duration
}

func (*SshTunnel) IsEnabled

func (r *SshTunnel) IsEnabled() bool

type SshTunnelDialer

type SshTunnelDialer struct {
	// contains filtered or unexported fields
}

func NewSshTunnelDialer

func NewSshTunnelDialer(tunnel *SshTunnel) (*SshTunnelDialer, error)

func (*SshTunnelDialer) Close

func (d *SshTunnelDialer) Close() error

func (*SshTunnelDialer) Dial

func (d *SshTunnelDialer) Dial(network, address string) (net.Conn, error)

func (*SshTunnelDialer) DialContext

func (d *SshTunnelDialer) DialContext(ctx context.Context, network, address string) (net.Conn, error)

func (*SshTunnelDialer) DialTimeout

func (d *SshTunnelDialer) DialTimeout(network, address string, timeout time.Duration) (net.Conn, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL