sshtunnel

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SshConfig

type SshConfig struct {
	HostName     string
	User         string
	IdentityFile string
}

func (*SshConfig) ParseClientConfig

func (sc *SshConfig) ParseClientConfig() (*ssh.ClientConfig, error)

func (*SshConfig) SetDefaults

func (sc *SshConfig) SetDefaults()

type SshTunnel

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

func NewTunnel

func NewTunnel(cfs ...*SshConfig) *SshTunnel

func (*SshTunnel) Close

func (st *SshTunnel) Close() error

func (*SshTunnel) Forward

func (st *SshTunnel) Forward(ctx context.Context, localAddr, remoteAddr string) error

func (*SshTunnel) Reverse

func (st *SshTunnel) Reverse(ctx context.Context, remoteAddr, localAddr string) error

func (*SshTunnel) Wait

func (st *SshTunnel) Wait()

Jump to

Keyboard shortcuts

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