Documentation
¶
Overview ¶
Package proxy implements an intercepting HTTP/HTTPS forward proxy that captures every flow. Plain HTTP is forwarded directly; HTTPS is intercepted via CONNECT + a locally-minted leaf certificate (TLS MITM).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Events ¶
Events is an optional sink notified when a flow is captured (used by the control plane to push live updates to the UI).
type ScopeChecker ¶
ScopeChecker reports whether a flow is in the engagement's target scope. When set, only in-scope requests are held by the intercept gate.
type Server ¶
type Server struct {
Scope ScopeChecker // nil → everything in scope
// contains filtered or unexported fields
}
Server is the intercepting forward-proxy HTTP handler.
func New ¶
func New(st *store.Store, cap *capture.Capturer, ca *tlsca.CA, eng *intercept.Engine, events Events) *Server
New builds a proxy Server. ca, eng, and events may each be nil.
func (*Server) ServeHTTP ¶
func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP dispatches: CONNECT → TLS MITM; absolute-URI → HTTP forward proxy.
func (*Server) SetUpstreamProxy ¶
SetUpstreamProxy routes outbound traffic through a chained proxy (e.g. a corporate proxy). An empty string means connect directly.