Documentation
¶
Overview ¶
Package control serves the Interceptor UI and the REST + SSE control API on the fixed localhost control port. It bridges the browser UI to the store and the intercept engine and pushes live events (captured flows, hold-queue changes) over Server-Sent Events.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hub ¶
type Hub struct {
// Upstream applies a chained upstream-proxy URL ("" = direct). Set by cmd.
Upstream func(string) error
// SetCaptureScopeOnly toggles persisting only in-scope traffic. Set by cmd.
SetCaptureScopeOnly func(bool)
// SetSuppressBrowserTelemetry toggles suppression of Chrome/Firefox telemetry. Set by cmd.
SetSuppressBrowserTelemetry func(bool)
// ChecksDir holds user-authored Starlark scanner checks ("" = none). Set by cmd.
ChecksDir string
// SelfAddr is this control plane's own host:port (e.g. 127.0.0.1:9966). Set by
// cmd; the active scanner refuses to target it, so it never attacks its own API.
SelfAddr string
// ProjectName/ProjectDir identify the active project (Burp-style). Set by cmd;
// surfaced at GET /api/version so the UI can show which project is loaded.
ProjectName string
ProjectDir string
// GlobalDir is ~/.interceptor (named projects live in GlobalDir/projects).
// SwitchProject re-launches Interceptor into another project; nil if unsupported.
GlobalDir string
SwitchProject func(target string) error
// contains filtered or unexported fields
}
Hub is the control-plane HTTP handler and live-event broadcaster. It also implements the proxy's Events sink (FlowCaptured).
func New ¶
func New(st *store.Store, eng *intercept.Engine, ca *tlsca.CA, rebind Rebinder, sc *scope.Engine) *Hub
New builds a Hub. eng, ca, and rebind may be nil. If eng is non-nil, the hub registers itself as the intercept change notifier.
func (*Hub) FlowCaptured ¶
FlowCaptured implements proxy.Events: it pushes a newly-seen flow (request sent, response not yet known) to all live UI subscribers. Concurrency-safe.
func (*Hub) FlowUpdated ¶ added in v0.3.0
FlowUpdated implements proxy.Events: it pushes the filled-in flow (response or error now known) so the UI can update the existing history row in place.
func (*Hub) Handler ¶
Handler returns the control-plane HTTP handler, wrapped in the loopback/CSRF security guard (see securityGuard).
Source Files
¶
- activescan.go
- activity.go
- ai.go
- analyze.go
- api.go
- authz.go
- bodydecode.go
- checks.go
- control.go
- curl.go
- decode.go
- discovery.go
- discovery_seeds.go
- endpoints_cache.go
- events.go
- guard.go
- har.go
- intruder.go
- oob.go
- project.go
- projectnotes.go
- repeater.go
- retention.go
- scanner.go
- scope.go
- session.go
- sysproxy.go
- version.go
- views.go
- wordlist.go
- wsrepeater.go