client

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*ssh3.Conversation
	// contains filtered or unexported fields
}

func Dial

func Dial(ctx context.Context, options *Options, qconn quic.EarlyConnection,
	roundTripper *http3.RoundTripper,
	sshAgent agent.ExtendedAgent) (*Client, error)

func (*Client) ForwardTCP

func (c *Client) ForwardTCP(ctx context.Context, localTCPAddr *net.TCPAddr, remoteTCPAddr *net.TCPAddr) (*net.TCPAddr, error)

func (*Client) ForwardUDP

func (c *Client) ForwardUDP(ctx context.Context, localUDPAddr *net.UDPAddr, remoteUDPAddr *net.UDPAddr) (*net.UDPAddr, error)

func (*Client) RunSession

func (c *Client) RunSession(tty *os.File, forwardSSHAgent bool, command ...string) error

type ExitSignal

type ExitSignal struct {
	Signal           string
	ErrorMessageUTF8 string
}

func (ExitSignal) Error

func (e ExitSignal) Error() string

type ExitStatus

type ExitStatus struct {
	StatusCode int
}

func (ExitStatus) Error

func (e ExitStatus) Error() string

type NoSuitableIdentity

type NoSuitableIdentity struct{}

func (NoSuitableIdentity) Error

func (e NoSuitableIdentity) Error() string

type Options

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

func NewOptions

func NewOptions(username string, hostname string, port int, urlPath string, authMethods []interface{}) (*Options, error)

func (*Options) AuthMethods

func (o *Options) AuthMethods() []interface{}

func (*Options) CanonicalHostFormat

func (o *Options) CanonicalHostFormat() string

Returns the canonical host representation used by SSH3. The format is <urlhostnameport><path> <urlhostnameport> is the host:port pair in the format returned by URLHostnamePort() <path> is the URL path, it always starts with a "/", it is therefore never empty.

func (*Options) Hostname

func (o *Options) Hostname() string

func (*Options) Port

func (o *Options) Port() int

func (*Options) URLHostnamePort

func (o *Options) URLHostnamePort() string

Returns the pair hostname:port in a valid URL format. This means that an IPv6 will be written inside square brackets []. examples: "127.0.0.1:443", "example.org:1234", "[::1]:22""

func (*Options) UrlPath

func (o *Options) UrlPath() string

func (*Options) Username

func (o *Options) Username() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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