Versions in this module Expand all Collapse all v2 v2.0.1 Oct 25, 2023 v2.0.0 Oct 13, 2021 Changes in this version + const DialTimeoutHeader + const MetricDialUpstream + func OnFirstOnly(filter filters.Filter) filters.Filter + type BufferSource interface + Get func() []byte + Put func(buf []byte) + type DialFunc func(ctx context.Context, isCONNECT bool, network, addr string) (conn net.Conn, err error) + type Opts struct + BufferSource BufferSource + Dial DialFunc + Filter filters.Filter + IdleTimeout time.Duration + MITMOpts *mitm.Opts + OKSendsServerTiming bool + OKWaitsForUpstream bool + OnError func(cs *filters.ConnectionState, req *http.Request, read bool, err error) *http.Response + ShouldMITM func(req *http.Request, upstreamAddr string) bool + type Proxy interface + ApplyMITMOptions func(MITMOpts *mitm.Opts) error + Connect func(dialCtx context.Context, in io.Reader, conn net.Conn, origin string) error + Handle func(dialCtx context.Context, in io.Reader, conn net.Conn) error + Serve func(l net.Listener) error + func New(opts *Opts) (newProxy Proxy, mitmErr error) + type RequestAware interface + OnRequest func(req *http.Request) + type ResponseAware interface + OnResponse func(req *http.Request, resp *http.Response, err error)