Sessions and sharing
Export
Export captured requests from Cloak Proxy as HAR, CSV, a Postman collection, OpenAPI YAML or a session file, or copy them as cURL and code.
Export turns captured traffic into files other people and tools can use: HAR for browsers and other debuggers, CSV for a spreadsheet, a Postman collection to replay requests, OpenAPI to document an API, or a Cloak Proxy session for a complete copy. For a single request, Copy as puts it on the clipboard as cURL, code in one of 21 other languages, or Markdown.
Export requests
Section titled “Export requests”- Choose what to export:
- Select two or more requests in the traffic list to export just those.
- Select one request or none to export everything the main window shows, after its sidebar selection and filters.
- Choose File › Export and a format: Cloak Proxy Session…, HAR…, CSV…, Postman Collection… or OpenAPI (YAML)…. The bottom of the menu says which requests will be exported, for example “Exports the 3 selected requests” or “Exports all visible requests”.
- In the save panel, check the name. It defaults to
Cloak Proxywith the date and time and the format’s extension. - Turn on Redact secrets: tokens, cookies, passwords, API keys and card numbers if the file will leave your Mac. See Redaction.
- Click Save.
The save panel’s message confirms the count and format, such as “Export 12 requests as HAR”. If nothing matches, Cloak Proxy shows There are no requests to export. If writing fails, it shows Export failed: with the reason.
Other ways to export
Section titled “Other ways to export”| Where | What it exports |
|---|---|
| Right-click requests › Export Request or Export N Requests | The requests you right-clicked: the selection if the clicked row is part of it, otherwise just the clicked row. Has the same five formats. |
| File › Save Session… (⌘ S) | Every captured request as a session, ignoring filters and selection. See Save and open sessions. |
| Search Everything (⇧ ⌘ A) | Export as HAR… and the other formats, with the same rules as the File menu. |
| Insights › Endpoints › Export OpenAPI… | The requests behind the endpoints listed in the catalog. See Endpoints. |
| Right-click requests › Publish to GitHub Gist… | HAR, cURL commands or a Postman collection, uploaded as a gist. See Publish to Gist. |
The Redact secrets checkbox is off the first time and then remembers your last choice for every export and Save Session.
Formats
Section titled “Formats”| Format | Extension | Opens in | Best for |
|---|---|---|---|
| Cloak Proxy Session | .cloaksession |
Cloak Proxy | A complete copy, exactly as captured |
| HAR | .har |
Browser developer tools and most HTTP tools | Sharing with people who use other tools |
| CSV | .csv |
Numbers, Excel, Google Sheets | A list of requests with status, timing and size |
| Postman Collection | .postman_collection.json |
Postman and the Cloak Proxy API client | Replaying requests |
| OpenAPI (YAML) | .yaml |
Swagger tools, API gateways, the API client’s spec editor | Documenting an API |
Cloak Proxy Session
Section titled “Cloak Proxy Session”Every request and response with headers, bodies exactly as captured, timing, the client app, the tools that touched it, WebSocket messages, undecrypted tunnels, and your highlights and comments. See Save and open sessions.
A HAR 1.2 file with creator set to Cloak Proxy. For each request:
| Included | Details |
|---|---|
| Request | Method, URL, HTTP version, headers, query string, body size and the decoded body as postData. |
| Response | Status, status text, HTTP version, headers, redirectURL from the Location header, body size, and the decoded body as content.text with its MIME type and decoded size. |
| Cookies Since 0.5.1 | The request’s cookies list every name and value from its Cookie headers. The response’s list each Set-Cookie with its path, domain, expires (ISO 8601; a Max-Age becomes a date counted from when the response arrived), httpOnly, secure and sameSite. The headers stay as they were. |
| Binary bodies | Base64 with "encoding": "base64". |
| Cut bodies Since 0.5.1 | A body cut at the capture limit has "_cloakTruncated": true and a comment such as “Truncated: Cloak Proxy captured the first 33554432 bytes of 104857600” on its postData or content, and _cloakOriginalSize when the full size is known. |
| Timing | startedDateTime and time in milliseconds. Since 0.5.1 timings holds what Cloak Proxy measured: blocked until the request went on to the server (reading it from the app, rules and breakpoints), dns for the lookup, wait until the response headers arrived (the upload to the server is included) and receive for the body; connect and ssl are -1, since connections to servers are reused. Requests from apps using CloakProxyKit have the app’s own timings and the server’s address instead. Up to 0.5.0, the whole duration was reported as wait. |
| WebSocket messages Since 0.5.1 | _webSocketMessages on the connection’s entry, in the form Chrome writes: type (send or receive), time (seconds since 1970), opcode and data (base64 for binary frames). A message cut at the 1 MB capture limit has _cloakOriginalSize. Chrome’s developer tools and other tools that read Chrome’s HAR files show them. |
| Comment Since 0.2.0 | The request’s comment, in the entry’s standard HAR comment field. Other HAR tools can show it. |
| Cloak Proxy extras | _cloakClient, the app that sent the request; _cloakHighlight, its highlight color (such as red); and _error on the response for failed requests. Other tools ignore these fields. Cloak Proxy reads them, and the comment, back on import. |
Undecrypted tunnels (CONNECT requests) have no request to export, so they aren’t entries. Since 0.5.1 When an export leaves tunnels out, the log’s comment says how many (“2 encrypted tunnels aren’t included: …”) and _cloakSkippedTunnels counts them. Up to 0.5.0, WebSocket messages weren’t included and the HAR cookies arrays were empty.
One row per request, with a header row:
| Column | Contents |
|---|---|
ID |
The request number. |
Start |
Start time in ISO 8601. |
Client |
The app that sent it. |
Method |
HTTP method. |
URL |
Full URL. |
Status |
Status code, tunnel for an undecrypted tunnel, or error for a failed request. |
Duration (ms) |
Total time in whole milliseconds. |
Request Size |
Request body size in bytes. |
Response Size |
Response body size in bytes, as received. |
Content Type |
The response Content-Type. |
Tools |
Debugging tools that touched the request, separated by ; . |
Fields with commas, quotes or line breaks are quoted. CSV has no headers or bodies, so it’s the safest format to share, but URLs can still contain tokens in query strings.
Postman Collection
Section titled “Postman Collection”A Postman Collection v2.1 named Cloak Proxy Export, with one request per exported request (tunnels are skipped) and no folders.
| Included | Details |
|---|---|
| Name | The method and path, such as GET /v1/users. |
| Request | Method, URL split into protocol, host, port, path and query, and every header except Host, Content-Length and Connection. |
| Body | The decoded text body in raw mode, marked as JSON when the Content-Type is JSON. Binary bodies are left out. |
| Saved response | The captured response as an example named Captured response, with status, headers and body. |
Import the file into Postman, or into the Cloak Proxy API client. To turn captured requests into an API client collection directly, see Capture to client.
OpenAPI (YAML)
Section titled “OpenAPI (YAML)”An OpenAPI 3.0.3 document titled Captured API, version 1.0.0, described as “Generated by Cloak Proxy from captured traffic.”
| Part | How it’s built |
|---|---|
servers |
One per scheme, host and port seen. |
paths |
One per templated path. A segment that’s all digits, a UUID, or 16 or more hex characters becomes a parameter named after the segment before it, with a trailing s dropped: /users/42 becomes /users/{userId}. With no usable segment before it, the parameter is {id}. |
| Operations | get, post, put, patch, delete, head and options. Other methods are skipped. Each has a summary like GET /users/{userId}. |
| Parameters | Path parameters, required, with an example from the first request. Query parameters, optional strings, with an example value. |
requestBody |
For JSON request bodies: an inferred schema and the body as an example. |
responses |
One per status code, using the first response seen with that code: its reason phrase as the description and, for JSON, an inferred schema. |
Schemas are inferred from the JSON: objects with their properties, arrays from their first item, string, integer or number, boolean, and nullable for null. They describe what was seen, not every possible value, so review them before publishing. The API client’s spec editor can open and lint the result.
Copy as cURL and code
Section titled “Copy as cURL and code”To put requests on the clipboard instead of in a file, right-click them in the traffic list:
| Menu item | What’s copied |
|---|---|
| Copy URL | The URLs, one per line. |
| Copy as cURL | A curl command for each request. |
| Copy as › language | Code that sends each request, in the language you pick. |
| Copy Response Body | The decoded response body of the last request in the selection, as text. Shown when it has one. |
| Copy Request Body | The decoded request body of the last request in the selection, as text. Shown when it has one. |
When several requests are selected, their commands are separated by a blank line. Undecrypted tunnels are skipped.
Copy as offers: cURL, Swift, JavaScript, Python, Go, HTTPie, Shell – wget, HTTP, NodeJS – Axios, Python – http.client, Java – OkHttp, Kotlin – OkHttp, C# – HttpClient, PHP – cURL, Ruby – Net::HTTP, Rust – reqwest, Dart – http, PowerShell, C – libcurl and Markdown. See Copy as code for what each one produces.
In the inspector, the ⋯ menu also has Copy URL, Copy as cURL, Copy Request and Copy Response, which copy the raw HTTP message with decoded bodies.
Export from the command line and MCP
Section titled “Export from the command line and MCP”| Tool | What it does |
|---|---|
cloakctl export [--out FILE] |
Asks the running app for the requests its proxy captured and writes them as HAR to a file, or to standard output without --out. Not redacted, and without highlights or comments. See cloakctl. |
cloakctl run --record FILE [--redact] |
Records a headless run to HAR (.har) or a session (any other extension), optionally redacted. See Headless and CI. |
MCP export_session |
Writes requests as a session, HAR, CSV, Postman collection or OpenAPI, optionally only some request ids and optionally redacted. Session and HAR files include highlights and comments, as from the app. See MCP tools reference. |
cloakctl export --out capture.har