Documentation
¶
Overview ¶
Package proxy provides HTTP/HTTPS proxy functionality using goproxy.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Port to listen on
Port int
// Verbose enables verbose logging
Verbose bool
// EnableMITM enables HTTPS interception
EnableMITM bool
// CA is the certificate authority for MITM (required if EnableMITM is true)
CA *ca.CA
// Capturer is the traffic capturer (optional)
Capturer *capture.Capturer
// SkipHosts is a list of hosts to skip MITM for (e.g., hosts with cert pinning)
SkipHosts []string
// Upstream is the upstream proxy URL (e.g., http://proxy:8080)
Upstream string
}
Config holds proxy configuration options.
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig returns default proxy configuration.
type Proxy ¶
type Proxy struct {
// contains filtered or unexported fields
}
Proxy represents an HTTP/HTTPS proxy server.
func (*Proxy) ListenAndServe ¶
ListenAndServe starts the proxy server.
func (*Proxy) Server ¶
func (p *Proxy) Server() *goproxy.ProxyHttpServer
Server returns the underlying goproxy server.
Click to show internal directories.
Click to hide internal directories.