Skip to content

PATTERN Cited by 1 source

Unified protocol debugging CLI

Pattern

When a team operates multiple related protocols (especially multi-party, multi-step protocols with binary encodings), consolidate debugging into a single CLI tool with a familiar interface (curl-style flags), verbose step-by-step logging, and automatic handling of encoding/encryption/routing. The tool should:

  1. Handle all protocol steps end-to-end — key fetching, encoding, encryption, multi-hop routing, decryption
  2. Show every intermediate step via verbose flags (-v, -vvv) — decoded binary, hex dumps, parsed key configs
  3. Mirror a well-known tool's UX — reduce learning curve by borrowing conventions from curl or similar
  4. Support multiple protocols in one binary — planned or shipping (OHTTP, CONNECT, MASQUE, Privacy Pass in pvcli's case)
  5. Serve as both debugging tool and test harness — customers can use it for live end-to-end testing without writing bespoke clients

Motivation

Multi-party privacy protocols like OHTTP involve binary encodings spread across multiple RFC specifications, encryption across trust boundaries, and multiple network hops. Without a unified tool:

  • Debugging requires hand-parsing binary hex against RFC specifications
  • Each customer deployment needs a custom client script
  • A single misplaced byte in Binary HTTP encoding corrupts the message silently
  • Figuring out which step (of 8) caused a failure is time-consuming

Canonical instance

systems/pvcli — Cloudflare's open-source Rust CLI for OHTTP, CONNECT proxying, and HTTP/3, born from operational pain at millions of requests per second across iCloud Private Relay, Microsoft Edge Secure Network VPN, and Flo Health. (Source: sources/2026-07-27-cloudflare-open-sourcing-privacy-proxy-cli)

Last updated · 598 distilled / 1,814 read