Configuring Proxies in Postman
Postman is the most popular tool for API testing. Configuring proxies in Postman is necessary for: working in corporate networks with mandatory proxies, testing APIs from different geolocations, debugging traffic through an intercepting proxy (Fiddler, mitmproxy), and bypassing rate limiting.
Proxy Configuration
Via Settings
- Open Postman
- Click the gear icon (Settings) or Ctrl+,
- Go to the "Proxy" tab
System Proxy
By default, Postman uses the system proxy:
1. Enable "Use the system proxy" (enabled by default)
2. Postman automatically uses Windows/macOS proxy settings
3. Requires no additional configuration
Custom Proxy
- Disable "Use the system proxy"
- Enable "Add a custom proxy configuration"
- Enter:
- HTTP Proxy: address and port
- HTTPS Proxy: address and port (can be the same) - Bypass: domains that bypass the proxy
Authentication
If the proxy requires a username/password:
1. In Proxy settings, enable "This proxy requires authentication"
2. Enter Username and Password
3. Postman will automatically send the Proxy-Authorization header
Using Environment Variables
For flexible proxy management, use Postman variables:
- Create an Environment (e.g., "Production via Proxy")
- Add variables: proxy_url, proxy_user, proxy_pass
- Use variables in the Pre-request Script
Working with SSL via Proxy
Disabling SSL Verification
When working through an intercepting proxy (mitmproxy, Fiddler):
1. Settings → General
2. Disable "SSL certificate verification"
3. This allows Postman to accept self-signed proxy certificates
Adding a CA Certificate
For corporate proxies:
1. Settings → Certificates
2. Click "Add CA Certificate"
3. Upload the corporate certificate's PEM file
4. Postman will trust this CA
Client Certificate
Some proxies require a client certificate:
1. Settings → Certificates
2. Click "Add Certificate"
3. Specify Host, CRT file, KEY file
4. Postman will send the certificate upon connection
Postman as a Proxy (Interceptor)
Postman can itself act as a proxy to intercept requests from a browser:
Postman Interceptor
- Install the "Postman Interceptor" extension in Chrome
- Enable Interceptor in Postman
- Requests from Chrome will be intercepted in Postman
- Useful for recording website API calls
Postman Proxy
- Settings → Proxy → Enable Postman as a proxy
- Specify the port (default 5555)
- Configure your device to use localhost:5555 as a proxy
- All requests will be recorded in Postman History
Proxies in Postman CLI (Newman)
Newman is the CLI for Postman, used to run collections from the command line:
# Via environment variable
export HTTP_PROXY=http://proxy_ip:8080
export HTTPS_PROXY=http://proxy_ip:8080
newman run collection.json
# Via flag
newman run collection.json --env-var "proxy_url=http://proxy_ip:8080"
Pre-request Script for Proxy Logic
// Dynamic proxy selection based on environment
const env = pm.environment.get("target_env");
if (env === "production") {
pm.request.proxy = {
match: "https://*.api.com/*",
host: "proxy_ip",
port: 8080
};
}
Debugging
Postman Console
- Open Postman Console (View → Show Postman Console or Ctrl+Alt+C)
- All HTTP requests, including proxy connections, are visible here
- Useful for debugging proxy issues
Network Log
In the Console, you can see:
- Connection to the proxy
- CONNECT request (for HTTPS)
- Proxy response
- Final server response
Common Issues
"Could not get any response"
- Check the proxy address and port
- Ensure the proxy is running
- Check if a firewall is blocking the connection to the proxy
SSL Error via Proxy
- Disable SSL verification in Settings
- Or add the proxy's CA certificate
- For an intercepting proxy (Fiddler), install its CA certificate
407 Proxy Authentication Required
- Enable authentication in proxy settings
- Check username and password
- Ensure the proxy supports Basic auth
Conclusion
Postman offers flexible proxy settings for various scenarios: from corporate proxies to debugging via an intercepting proxy. Support for SSL certificates, environment variables, and CLI (Newman) makes working with proxies convenient both in the GUI and in automated pipelines.