See your HTTPS API calls without installing a certificate
Start Buggregator, set HTTPS_PROXY=http://127.0.0.1:8080 for your app, and turn off certificate verification in its HTTP client. Every outgoing HTTPS call then passes through Buggregator's HTTP proxy, and the UI shows the request, the response, the status code and the time it took. You install no certificate: the client simply does not check it. Use this in development only.
Steps
1. Start Buggregator with the proxy port
Port 8000 is the UI, port 8080 is the HTTP proxy. Bind the proxy to 127.0.0.1: it forwards to any host.
docker run --pull always \
-p 127.0.0.1:8000:8000 \
-p 127.0.0.1:8080:8080 \
ghcr.io/buggregator/server:latestPort 8080 is taken on your machine, for example by a WebSocket server? Move the proxy with -e PROXY_ADDR=:8081 and publish 127.0.0.1:8081:8081 instead. PROXY_ADDR is a Buggregator setting, not one for your app.
2. Point your app at the proxy
Set these variables in the shell or container where your app runs. Most HTTP clients read them.
export HTTP_PROXY=http://127.0.0.1:8080
export HTTPS_PROXY=http://127.0.0.1:8080In Docker Compose, replace 127.0.0.1 with the Buggregator service name, for example http://buggregator:8080.
3. Skip the certificate check in the client
The proxy signs each site's certificate itself, so the client must not verify it. Each language has its own switch:
# curl
curl -x http://127.0.0.1:8080 -k https://api.example.com/users
# Node.js: built-in fetch and http read the proxy variables only with NODE_USE_ENV_PROXY=1
NODE_USE_ENV_PROXY=1 NODE_TLS_REJECT_UNAUTHORIZED=0 node app.js# Python requests
requests.get('https://api.example.com/users', verify=False)// Go: a transport that reads HTTPS_PROXY and skips the check
client := &http.Client{Transport: &http.Transport{
Proxy: http.ProxyFromEnvironment,
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
}}// PHP Guzzle
$client = new \GuzzleHttp\Client(['verify' => false]);4. Read the calls
Run your app and open http://127.0.0.1:8000. Each proxied call shows the full URL, the request and response headers and bodies, a color-coded status code and the response time in milliseconds. JSON responses open as a tree. The detail page has Response, Request and Raw tabs.
Why it works
For an HTTPS call, the client asks the proxy to open a tunnel (CONNECT). Buggregator answers with a certificate for the target host, signed by a CA it creates in memory at startup and never writes to disk. It reads the request, sends it on to the real server and stores both directions as one HTTP event. Because the client skips verification, there is nothing to trust or install.
Related tips
- HTTP
See every API call your Python script makes
Route Python requests through Buggregator's HTTP proxy on port 8080. See each request and response with status code and timing. Dev only.
- HTTP
See every request axios sends
Pass an HttpsProxyAgent to axios and turn off its own proxy. Each outgoing request and its response shows up in Buggregator. For local work only.
- HTTP
See every API call your Go service makes
Give your Go http.Client a Transport that uses Buggregator's proxy on port 8080. See each request and response with status code and timing. Dev only.
- HTTP
See every API call your Laravel app sends
Set global proxy options for Laravel's HTTP client in AppServiceProvider. Every Http:: request and response shows up in Buggregator. Local only.
Checked on with Buggregator v2.13.0