proxy

package
v0.0.0-...-5c79d48 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: AGPL-3.0 Imports: 11 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(alpnDialerConfig apiclient.ALPNDialerConfig) 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.

func WithPROXYHeaderGetter

func WithPROXYHeaderGetter(proxyHeaderGetter apiclient.PROXYHeaderGetter) DialerOptionFunc

WithPROXYHeaderGetter adds PROXY headers getter, which is used to propagate client's real IP

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