proxy

package
v0.0.0-...-49648c1 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PROXY_REALM    = "snykcli_realm"
	PROXY_USERNAME = "snykcli"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ProxyInfo

type ProxyInfo struct {
	Port                int
	Password            string
	CertificateLocation string
}

type WrapperProxy

type WrapperProxy struct {
	DebugLogger         *log.Logger
	CertificateLocation string
	// contains filtered or unexported fields
}

func NewWrapperProxy

func NewWrapperProxy(config configuration.Configuration, cliVersion string, debugLogger *log.Logger) (*WrapperProxy, error)

func (*WrapperProxy) Close

func (p *WrapperProxy) Close()

func (*WrapperProxy) HandleConnect

func (p *WrapperProxy) HandleConnect(req string, ctx *goproxy.ProxyCtx) (*goproxy.ConnectAction, string)

func (*WrapperProxy) ProxyInfo

func (p *WrapperProxy) ProxyInfo() *ProxyInfo

func (*WrapperProxy) SetHeaderFunction

func (p *WrapperProxy) SetHeaderFunction(addHeaderFunc func(*http.Request) error)

func (*WrapperProxy) SetUpstreamProxy

func (p *WrapperProxy) SetUpstreamProxy(proxyFunc func(req *http.Request) (*url.URL, error))

func (*WrapperProxy) SetUpstreamProxyAuthentication

func (p *WrapperProxy) SetUpstreamProxyAuthentication(mechanism httpauth.AuthenticationMechanism)

func (*WrapperProxy) SetUpstreamProxyFromUrl

func (p *WrapperProxy) SetUpstreamProxyFromUrl(proxyAddr string)

func (*WrapperProxy) Start

func (p *WrapperProxy) Start() error

func (*WrapperProxy) Stop

func (p *WrapperProxy) Stop()

func (*WrapperProxy) Transport

func (p *WrapperProxy) Transport() *http.Transport

func (*WrapperProxy) UpstreamProxy

func (p *WrapperProxy) UpstreamProxy() func(req *http.Request) (*url.URL, error)

Jump to

Keyboard shortcuts

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