dialer

package
v0.0.0-...-ace7313 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDialer

func AddDialer(dialerName, uri string) (err error)

func AddSSHKey

func AddSSHKey(encodedKey string, passPhrase string) error

func CheckSSHKey

func CheckSSHKey(encodedKey string, passPhrase string) error

CheckSSHKey/ verifies that the encodedKey can be decoded and converts it to a format that ssh.ParsePrivateKeyWithPassphrase can parse

func Dial

func Dial(dialerName, network, addr string) (net.Conn, error)

Dial uses the selected dialer to establish a network connection

func GetSSHKeys

func GetSSHKeys() (keys []control.SSHKey, err error)

func Marshall

func Marshall(info DialerInfo) (result control.Dialer, err error)

Types

type Dialer

type Dialer interface {
	Dial(network, addr string) (net.Conn, error)
}

Dialer is a generic interface which is used to establish a net.Conn

func NewSocks5Dialer

func NewSocks5Dialer(addr string) (dialer Dialer, err error)

type DialerInfo

type DialerInfo struct {
	control.Dialer
	// contains filtered or unexported fields
}

DialerInfo is the internal representation of a dialer

func ListDialers

func ListDialers() (dialerInfos []DialerInfo, err error)

type SSHAddress

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

type SSHConnector

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

func GetConnector

func GetConnector() (sshConnector *SSHConnector, err error)

func (*SSHConnector) Done

func (sshConnector *SSHConnector) Done() bool

func (*SSHConnector) Message

func (sshConnector *SSHConnector) Message(i int) string

func (*SSHConnector) MessageCount

func (sshConnector *SSHConnector) MessageCount() int

func (*SSHConnector) Print

func (sshConnector *SSHConnector) Print(msg string)

func (*SSHConnector) Printf

func (sshConnector *SSHConnector) Printf(format string, args ...interface{})

func (*SSHConnector) SetPassphrase

func (sshConnector *SSHConnector) SetPassphrase(passphrase string) error

func (*SSHConnector) Status

func (sshConnector *SSHConnector) Status() control.ConnectStatus

func (*SSHConnector) Wait

func (sshConnector *SSHConnector) Wait() error

type SSHDialer

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

func NewSSHDialer

func NewSSHDialer(timeout int) (sshDialer *SSHDialer, err error)

func (*SSHDialer) AddDialer

func (sshDialer *SSHDialer) AddDialer(uri string) error

func (*SSHDialer) AddSSHKey

func (sshDialer *SSHDialer) AddSSHKey(encodedKey string, passPhrase string) error

func (*SSHDialer) Connect

func (sshDialer *SSHDialer) Connect() (*ssh.Client, error)

func (*SSHDialer) Dial

func (sshDialer *SSHDialer) Dial(network, addr string) (net.Conn, error)

func (*SSHDialer) GetConnector

func (sshDialer *SSHDialer) GetConnector(interactive bool) *SSHConnector

func (*SSHDialer) GetSSHKeys

func (sshDialer *SSHDialer) GetSSHKeys() (keys []control.SSHKey, err error)

Jump to

Keyboard shortcuts

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