Getting Started
The Extensions API allows external processes to extend powhttp with custom functionality. Extensions can add context menu items, display custom fields in the overview section, intercept connections and access captured session data. Communication happens over a bidirectional JSON-RPC protocol using the extension process's stdin and stdout.
For building extensions in Rust, the powhttp-sdk crate provides a typed SDK that handles the JSON-RPC protocol automatically.
Extension Manifest
Every extension requires an extension.json manifest file in its root directory. This file describes the extension and specifies how to launch it.
{
"name": "My Extension",
"version": "1.0.0",
"description": "A brief description of what this extension does",
"icon": "icon.png",
"command": "node index.js"
}name: Display name of the extensionversion: Semantic version stringdescription(optional): Short description shown in the UIicon(optional): Relative path to an icon filecommand: The command to spawn the extension process
Communication Protocol
Extensions communicate with powhttp over JSON-RPC through stdin (incoming messages) and stdout (outgoing messages). The protocol is bidirectional. Extensions can call methods on powhttp to register context menu items, overview fields or query data. powhttp can also call methods on extensions to invoke registered handlers.
Stderr output from the extension process is captured as logs and can be viewed in the powhttp interface.
Color Coding
Method and type definitions have a colored bar on the left side. The color tells you whether the extension or powhttp is the caller, or if it's a type definition.