Skip to content

API reference (high level)

Trace does not expose a public SDK, but contributors can use this map of core modules and types.

Core modules

  • TraceCore: shared models, App Group storage, logging
  • TraceNetworking: HTTP/HTTP2/WebSocket/SSE parsing
  • TraceSecurity: certificate management and TLS helpers
  • TraceProxy: MITM proxy server and connection handling
  • TracePacket: packet parsing and reassembly
  • TraceFeatures: higher-level features (rewrite, maps, scripts, breakpoints)
  • TraceUI: reusable UI components

Common types

  • AppGroupStorage: shared storage for requests, sessions, and configuration
  • CaptureConfiguration / CaptureMode: capture settings and proxy modes
  • VPNManager: manages VPN lifecycle and IPC with the extension
  • MITMProxyServer: local proxy for HTTP/HTTPS
  • CertificateManager: root CA generation and validation

Configuration surfaces

  • Capture settings: mode, body size limits, and filters
  • Rules and scripts: rewrite rules, request maps, and scripting config
  • Export: session and request exporters

Working with requests

Requests are captured in the extension, stored in the App Group container, and surfaced in the app through the TraceCore models. Use the storage layer rather than direct file access.

Extension boundary

Anything in TraceVPN runs in a separate process. Use NEAppMessages and App Group storage for communication and state.

Adding a new feature

  1. Define models in TraceCore if you need shared storage.
  2. Add capture-time behavior in TraceVPN or TraceProxy as needed.
  3. Expose UI in TraceUI and wire feature toggles in TraceFeatures.