Capture Proxy + Team Collaboration

pxcCapture proxy & team collaboration

A capture proxy benchmarked against Proxyman that turns debugging sessions into a shared team asset. The only contract between the Go kernel pxc-core and the platform shells is a /v1 HTTP/WS API: macOS Swift, Windows WinUI and Flutter all share the same kernel.

pxc
01$ pxc sessions --host api.github.com --status 500 --limit 20
02[ { "id": 42, "method": "POST", "path": "/v1/pay", "status": 500 } ]
03
04$ pxc bp respond 7 --status 201 --body '{"ok":true}'
05{ "released": true, "mode": "mock" }
$

Capturing traffic is not the goal — a reproducible debugging session is.

Design

Design decisions

Why this tool is built the way it is, and what that buys.

Kernel and UI decoupled

The kernel exposes only the /v1 API; every client (Swift / WinUI / Flutter / CLI) is an equal consumer, so cross-platform behaviour is consistent by construction.

Agent-friendly

pxc status / sessions / body / curl all emit structured output, so AI can read the traffic and locate problems — no screenshots needed.

A breakpoint is the debugger

One rule line holds the target traffic; inspect the body live and choose to release, mock or abort — rewriting and replaying without scripts.

Team sharing

A capture scene exports to HAR and cURL; attach it to an issue and it reproduces — no more “try it again on your side”.

Highlights

Capabilities at a glance

  • Go kernel with replaceable platform shells; /v1 HTTP/WS is the only contract
  • The pxc CLI is built for agents: JSON output by default, semantic exit codes, automatic token resolution
  • Server-side filtering and full-text search: locate by host, status code or body keyword
  • Breakpoint debugging: suspend traffic, change method / URL / headers / body, then release
  • Fault injection and mocking: answer without hitting upstream to construct error branches
  • Full HAR 1.2 export and cURL replay — share a debugging session with a colleague in one click
Metrics

Design metrics

Each one maps to a concrete decision in the implementation.

shells sharing the kernel
3 shells

macOS Swift / Windows WinUI / Flutter, with a replaceable UI

kernel acceptance cases
61

E2E acceptance coverage of the kernel — the precondition for identical behaviour across shells

rule hot reload
1s

Rules take effect within one second of saving, with no kernel restart

exit code semantics
0 / 1 / 2

success / failure / usage error — easy for scripts and agents to judge

search method
FTS

Full-text search; locate by body keyword instead of scrolling by eye

export format
HAR 1.2

Full export + cURL replay; the debugging session is shareable

Platforms

Platform support

With kernel and shell separated, support levels can advance independently per platform.

macOS
Full

The Swift desktop shell, talking to the kernel over /v1 HTTP/WS

Windows
Full

The WinUI desktop shell, sharing the same Go kernel

CLI
Full

JSON output by default, semantic exit codes, automatic token resolution

Flutter / Mobile
Partial

On-device capture and viewing on mobile; bindings live in kernel/bindings

Web UI
Partial

The kernel ships its own web UI build for inspecting traffic in the browser

Comparison

How it differs from the common approach

The difference usually is not in the feature table — it is in where the boundary is drawn.

Kernel and interface
The Go kernel exposes only /v1 HTTP/WS; every client is an equal consumer
Capture logic lives in the UI, reimplemented per platform
For AI
The CLI defaults to JSON with semantic exit codes, so agents read traffic directly
Humans eyeball the UI; AI gets no structured data
Debugging method
Breakpoint suspension + live rewriting + mock responses, with no scripts
Rewriting means writing interception scripts or redeploying code
Search capability
Server-side FTS full-text search; locate by body keyword
Scrolling a list by eye; once traffic grows, things go missing
Team collaboration
Full HAR export + cURL replay; the scene is reproducible and shareable
“Try it again on your side and see if it reproduces”
Commands

Commands at a glance

For the full manual, see the CLI reference page. All commands output structured results by default.

Full command table
pxc status

Kernel status, listening ports and license info

--json
pxc sessions

Search captured traffic with combined filters

--host--status--method--limit--q
pxc body <id>

Read the full request and response bodies of a session

--req--res--raw
pxc curl <id>

Export as a replayable cURL command

--no-headers
In Practice

Actual output

pxc
01$ pxc sessions --host api.github.com --status 500 --limit 20
02[ { "id": 42, "method": "POST", "path": "/v1/pay", "status": 500 } ]
03
04$ pxc bp respond 7 --status 201 --body '{"ok":true}'
05{ "released": true, "mode": "mock" }
Source

Modules

3 groups, 15 modules — all from the repository’s real directory structure.

Go · Swift · WinUI · Flutter · WebSocket · HAR · FTS
Kernel

pxc-core, written in Go, is the single source of truth.

internal/engine

Traffic capture and the proxy engine; the executor behind breakpoint suspension and release

kernel/internal/engine
internal/store

Traffic persistence and search; FTS full-text search locates by body keyword

kernel/internal/store
internal/rules

The rules engine: text DSL rules, hot-reloaded within 1s of saving

kernel/internal/rules
internal/api

The /v1 HTTP + WebSocket contract — the kernel’s only outward interface

kernel/internal/api
internal/scripting

Scripted extension capability

kernel/internal/scripting
internal/pairing / discovery

Device pairing and instance discovery, enabling collaborative debugging across clients

kernel/internal/{pairing,discovery}
internal/license / instance

Licensing and instance management

kernel/internal/{license,instance}
Commands & clients

The kernel speaks only /v1; every client is an equal consumer.

cmd/pxc

CLI: JSON output by default, semantic exit codes (0/1/2), automatic token resolution

kernel/cmd/pxc
cmd/pxc-core

The kernel service process

kernel/cmd/pxc-core
cmd/pxc-mobile / pxc-license

Mobile and licensing commands

kernel/cmd/
apps/desktop

Desktop shells (macOS Swift / Windows WinUI)

apps/desktop
apps/mobile / webui

The Flutter mobile app and Web UI

apps/{mobile,webui}
Contract & bindings

What keeps cross-platform behaviour identical.

shared/api-spec

The /v1 API spec; the kernel and every client align on it

shared/api-spec
kernel/bindings

The mobile bindings layer

kernel/bindings
kernel/web

The web UI build shipped with the kernel

kernel/web
Other tools
Get in touch

Hand the complexity of identity, agents and private domain to one governable kernel

Whether you are replacing an existing IAM, building an agent platform, or trying to make private-domain operations actually work — start with a 30-minute architecture call. We will first judge whether this is the kind of problem we are good at, and say so plainly if it is not.