tunnel

package
v0.0.0-...-84a5298 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2021 License: AGPL-3.0 Imports: 7 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 {
	Key     string
	User    string
	Address string
}

type SSHConnection

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

func NewSSHConnection

func NewSSHConnection(sshAddr string, sshUser string, sshAuth []ssh.AuthMethod, sshHostKeyCallback func(hostname string, fingerprint string) error) *SSHConnection

func (*SSHConnection) AddLocalToRemoteTunnel

func (c *SSHConnection) AddLocalToRemoteTunnel(localAddr string, remoteAddr string) (string, error)

func (*SSHConnection) Close

func (c *SSHConnection) Close() error

func (*SSHConnection) GetTunnels

func (c *SSHConnection) GetTunnels() ([]Tunnel, error)

func (*SSHConnection) Open

func (c *SSHConnection) Open() error

func (*SSHConnection) RemoveTunnel

func (c *SSHConnection) RemoveTunnel(key string) error

type SSHConnectionManager

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

func NewSSHConnectionManager

func NewSSHConnectionManager() *SSHConnectionManager

func (*SSHConnectionManager) GetConnection

func (m *SSHConnectionManager) GetConnection(key string) (*SSHConnection, error)

func (*SSHConnectionManager) GetConnections

func (m *SSHConnectionManager) GetConnections() ([]Connection, error)

func (*SSHConnectionManager) GetOrCreateSSHConnection

func (m *SSHConnectionManager) GetOrCreateSSHConnection(sshAddr string, sshUser string, sshAuth []ssh.AuthMethod, sshHostKeyCallback func(hostname string, fingerprint string) error) (string, *SSHConnection, error)

func (*SSHConnectionManager) RemoveConnection

func (c *SSHConnectionManager) RemoveConnection(key string) error

type Tunnel

type Tunnel struct {
	Key           string
	LocalAddress  string
	RemoteAddress string
}

Jump to

Keyboard shortcuts

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