tunnel

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2019 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 Tunnel

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

Tunnel holds data needed to create one ssh tunnel per host for port forwarding.

func New

func New(user string, port int, addrs []string) *Tunnel

New creates a new Tunnel

func (*Tunnel) Connect

func (t *Tunnel) Connect() ([]string, error)

Connect creates an ssh tunnel for each address passed in. It also creates a dns lookup for the local net.DefaultResolver so that hostname resolves to the localhost address of the ssh tunnel.

Jump to

Keyboard shortcuts

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