tunnel

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	log.Logger
	// contains filtered or unexported fields
}

func NewConnection

func NewConnection(logger log.Logger, addr, proxy string) *Connection

func (*Connection) Dial

func (cnx *Connection) Dial() (net.Conn, error)

func (*Connection) HasSSH

func (cnx *Connection) HasSSH() bool

func (*Connection) ListenSSH

func (cnx *Connection) ListenSSH(addr string) (net.Listener, error)

func (*Connection) SetupSSHConnector

func (cnx *Connection) SetupSSHConnector(addr, tunnel, user, keyFile string) error

func (*Connection) SetupTCPConnector

func (cnx *Connection) SetupTCPConnector() error

func (*Connection) SetupTLSConnector

func (cnx *Connection) SetupTLSConnector(serverName, certFile, keyFile string) error

type Listener

type Listener interface {
	Address() string
	Listen() (net.Listener, error)
}

type LocalListener

type LocalListener struct {
	Addr     string
	CertFile string
	KeyFile  string
	CAFile   string
}

func NewListener

func NewListener(addr, cert, key, ca string) *LocalListener

func (*LocalListener) Address

func (l *LocalListener) Address() string

func (*LocalListener) Listen

func (l *LocalListener) Listen() (net.Listener, error)

type RemoteListener

type RemoteListener struct {
	ListenOn  string
	ConnectTo *Connection
}

func NewRemoteListener

func NewRemoteListener(listen string, connect *Connection) *RemoteListener

func (*RemoteListener) Address

func (l *RemoteListener) Address() string

func (*RemoteListener) Listen

func (l *RemoteListener) Listen() (net.Listener, error)

type Tunnel

type Tunnel struct {
	log.Logger
	Listener
}

func NewTunnel

func NewTunnel(logger log.Logger, l Listener) *Tunnel

func (*Tunnel) Run

func (t *Tunnel) Run(cnx *Connection) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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