ssh

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tunnel

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

Tunnel represents an SSH tunnel.

func NewTunnel

func NewTunnel(sshConfig *conf.SSHConfig, remoteHost string, remotePort uint16, localPort uint16) *Tunnel

NewTunnel creates a new SSH tunnel.

func (*Tunnel) Close

func (t *Tunnel) Close() error

Close closes the SSH tunnel.

func (*Tunnel) LocalPort

func (t *Tunnel) LocalPort() uint16

LocalPort returns the local port the tunnel is listening on.

func (*Tunnel) Start

func (t *Tunnel) Start(ctx context.Context) error

Start establishes the SSH connection and starts forwarding traffic.

Jump to

Keyboard shortcuts

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