Versions in this module Expand all Collapse all v3 v3.4.0 Feb 20, 2024 Changes in this version + type Context struct + func NewContext(req *http.Request) *Context + func TestContext(req *http.Request, conn net.Conn, bw *bufio.ReadWriter) (ctx *Context, remove func(), err error) + func (ctx *Context) APIRequest() + func (ctx *Context) Get(key string) (interface{}, bool) + func (ctx *Context) ID() string + func (ctx *Context) IsAPIRequest() bool + func (ctx *Context) Session() *Session + func (ctx *Context) Set(key string, val interface{}) + func (ctx *Context) SkipLogging() + func (ctx *Context) SkipRoundTrip() + func (ctx *Context) SkippingLogging() bool + func (ctx *Context) SkippingRoundTrip() bool + type MultiError struct + func NewMultiError() *MultiError + func (merr *MultiError) Add(err error) + func (merr *MultiError) Empty() bool + func (merr *MultiError) Error() string + func (merr *MultiError) Errors() []error + type Proxy struct + func NewProxy() *Proxy + func (p *Proxy) Close() + func (p *Proxy) Closing() bool + func (p *Proxy) GetRoundTripper() http.RoundTripper + func (p *Proxy) Serve(l net.Listener) error + func (p *Proxy) SetDial(dial func(string, string) (net.Conn, error)) + func (p *Proxy) SetDownstreamProxy(proxyURL *url.URL) + func (p *Proxy) SetMITM(config *mitm.Config) + func (p *Proxy) SetRequestModifier(reqmod RequestModifier) + func (p *Proxy) SetResponseModifier(resmod ResponseModifier) + func (p *Proxy) SetRoundTripper(rt http.RoundTripper) + func (p *Proxy) SetTimeout(timeout time.Duration) + type RequestModifier interface + ModifyRequest func(req *http.Request) error + type RequestModifierFunc func(req *http.Request) error + func (f RequestModifierFunc) ModifyRequest(req *http.Request) error + type RequestResponseModifier interface + func Noop(id string) RequestResponseModifier + type ResponseModifier interface + ModifyResponse func(res *http.Response) error + type ResponseModifierFunc func(res *http.Response) error + func (f ResponseModifierFunc) ModifyResponse(res *http.Response) error + type Session struct + func (s *Session) Get(key string) (interface{}, bool) + func (s *Session) Hijack() (net.Conn, *bufio.ReadWriter, error) + func (s *Session) Hijacked() bool + func (s *Session) ID() string + func (s *Session) IsSecure() bool + func (s *Session) MarkInsecure() + func (s *Session) MarkSecure() + func (s *Session) Set(key string, val interface{})