proxy

package
v0.0.0-...-eb5fed3 Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PROXY_REALM    = "snykcli_realm"
	PROXY_USERNAME = "snykcli"
)
View Source
const HeaderSnykTerminate = "snyk-terminate"

HeaderSnykTerminate is a header to signal that the typescript CLI should terminate execution.

Variables

This section is empty.

Functions

This section is empty.

Types

type CaData

type CaData struct {
	CertPool *x509.CertPool
	CertFile string
	CertPem  string
}

func InitCA

func InitCA(config configuration.Configuration, cliVersion string, logger *zerolog.Logger) (*CaData, error)

type ProxyInfo

type ProxyInfo struct {
	Port                int
	Password            string
	CertificateLocation string
}

type WrapperProxy

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

func NewWrapperProxy

func NewWrapperProxy(config configuration.Configuration, cliVersion string, debugLogger *zerolog.Logger, ca CaData) (*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) RegisterInterceptor

func (p *WrapperProxy) RegisterInterceptor(interceptor interceptor.Interceptor)

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)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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