Versions in this module Expand all Collapse all v0 v0.0.16 Dec 23, 2024 v0.0.15 Dec 23, 2024 Changes in this version + const DefaultBodySize + const DefaultSampleRate + const MaxBodySize + const ProtoHTTP + const ProtoSSH + const ProtoTLS + var DefaultCertPool = tls_util.NewMemoryCertPool() + func Sniff(ctx context.Context, r *bufio.Reader) (proto string, err error) + type HandleOption func(opts *HandleOptions) + func WithBypass(bypass bypass.Bypass) HandleOption + func WithDial(dial func(ctx context.Context, network, address string) (net.Conn, error)) HandleOption + func WithDialTLS(...) HandleOption + func WithLog(log logger.Logger) HandleOption + func WithRecorderObject(ro *xrecorder.HandlerRecorderObject) HandleOption + type HandleOptions struct + Bypass bypass.Bypass + Dial func(ctx context.Context, network, address string) (net.Conn, error) + DialTLS func(ctx context.Context, network, address string, cfg *tls.Config) (net.Conn, error) + Log logger.Logger + RecorderObject *xrecorder.HandlerRecorderObject + type Sniffer struct + CertPool tls_util.CertPool + Certificate *x509.Certificate + MitmBypass bypass.Bypass + NegotiatedProtocol string + PrivateKey crypto.PrivateKey + ReadTimeout time.Duration + Recorder recorder.Recorder + RecorderOptions *recorder.Options + Websocket bool + WebsocketSampleRate float64 + func (h *Sniffer) HandleHTTP(ctx context.Context, conn net.Conn, opts ...HandleOption) error + func (h *Sniffer) HandleTLS(ctx context.Context, conn net.Conn, opts ...HandleOption) error