proxy

package
v0.0.0-...-7a2ee58 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: ISC Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Opt

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

func New

func New(remotes []*url.URL, opt ...Option) *Opt

New sets configuration options for a proxy.

func (*Opt) Accept

func (o *Opt) Accept(ctx context.Context, l net.Listener) error

type Option

type Option func(*Opt)

func WithClientCerts

func WithClientCerts(certs []tls.Certificate) Option

WithClientCerts sets the mTLS client certificates.

func WithExtensions

func WithExtensions(e []agent.Extension) Option

WithExtensions sets the proxy behaviour for matching extensions.

func WithLog

func WithLog(f func(error)) Option

WithLog sets the logging function.

func WithRootCAs

func WithRootCAs(rootCAs *x509.CertPool) Option

WithRootCAs sets CA roots for TLS connections.

Jump to

Keyboard shortcuts

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