| name | proxy-record |
| description | Record HTTP/HTTPS traffic through the dev-proxy-recorder. Covers starting the proxy, session management, proxy.yaml routes, and HTTPS interception setup. |
proxy-record skill
Use this skill when the user wants to:
- Capture HTTP or HTTPS traffic from an application
- Create named recording sessions for different test scenarios
- Configure which hosts to record via proxy.yaml
- Set up HTTPS interception with the local CA
Starting the proxy (record mode)
dpr start
Default output on startup:
Configuring routes (proxy.yaml)
routes:
- match: "api.stripe.com"
upstream: https://api.stripe.com
record: true
replay: true
- match: "api.sendgrid.com"
upstream: https://api.sendgrid.com
record: true
replay: true
- match: "*"
upstream: ""
record: false
replay: false
match is an exact hostname or hostname:port. Subdomains are matched if the host ends with .match.
Named sessions
Each recording is grouped into a session. Create named sessions for different scenarios:
dpr sessions new stripe-checkout-flow
dpr sessions
Via API:
POST /api/sessions
{ "name": "stripe-checkout-flow" }
Configuring your client
curl
curl -x http://127.0.0.1:8080 https://api.stripe.com/v1/customers \
-H "Authorization: Bearer sk_test_..."
Node.js (global proxy env vars)
HTTP_PROXY=http://127.0.0.1:8080 \
HTTPS_PROXY=http://127.0.0.1:8080 \
node your-app.js
Node.js (axios)
const axios = require('axios');
const { HttpProxyAgent } = require('http-proxy-agent');
const { HttpsProxyAgent } = require('https-proxy-agent');
const agent = new HttpsProxyAgent('http://127.0.0.1:8080');
const res = await axios.get('https://api.stripe.com/v1/customers', {
httpsAgent: agent,
});
HTTPS interception
Required to record HTTPS traffic:
- Generate and trust the local CA:
sudo security add-trusted-cert -d -r trustRoot \
-k /Library/Keychains/System.keychain \
~/.dpr/ca.crt
-
The CA cert path is ~/.dpr/ca.crt. Generated automatically on first dpr start.
-
For Node.js, you may also need:
NODE_EXTRA_CA_CERTS=~/.dpr/ca.crt node app.js
Exporting recordings
dpr export stripe-checkout-flow
dpr export stripe-checkout-flow > session.har
Or in web UI: Session detail -> Export HAR button.
Environment variables
DPR_PROXY_PORT=8080 Proxy port
DPR_API_PORT=3400 Management API port
DPR_SESSION=my-session Active session name
DPR_WEB_ENABLED=1 1=show web UI