proxy

package
v11.3.3 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dialer

type Dialer interface {
	// Dial establishes a client connection to a SSH server.
	Dial(ctx context.Context, network string, addr string, config *ssh.ClientConfig) (*tracessh.Client, error)

	// DialTimeout acts like Dial but takes a timeout.
	DialTimeout(ctx context.Context, network, address string, timeout time.Duration) (net.Conn, error)
}

A Dialer is a means for a client to establish a SSH connection.

func DialerFromEnvironment

func DialerFromEnvironment(addr string, opts ...DialerOptionFunc) Dialer

DialerFromEnvironment returns a Dial function. If the https_proxy or http_proxy environment variable are set, it returns a function that will dial through said proxy server. If neither variable is set, it will connect to the SSH server directly.

type DialerOptionFunc

type DialerOptionFunc func(options *dialerOptions)

DialerOptionFunc allows setting options as functional arguments to DialerFromEnvironment

func WithALPNDialer

func WithALPNDialer(tlsConfig *tls.Config) DialerOptionFunc

WithALPNDialer creates a dialer that allows to Teleport running in single-port mode.

func WithInsecureSkipTLSVerify

func WithInsecureSkipTLSVerify(insecure bool) DialerOptionFunc

WithInsecureSkipTLSVerify skips the certs verifications.

type DirectDialerOptFunc

type DirectDialerOptFunc func(dial *directDial)

Jump to

Keyboard shortcuts

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