proxy

package
v1.2.3-fred.12 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2022 License: Apache-2.0 Imports: 14 Imported by: 45

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