Setting up Proxies in Insomnia
Introduction
Insomnia is a popular HTTP client for developers, an alternative to Postman. Proxy support in Insomnia is crucial for working in corporate networks, testing APIs from various geolocations, and debugging traffic via an intercepting proxy.
Basic Configuration
Configuration in Insomnia
- Open Insomnia
- Go to Preferences (Ctrl+,)
- "General" tab → "HTTP Network Proxy" section
- Enable "Enable Proxy"
- Enter the proxy address in the format: http://proxy_ip:port
- For HTTPS: https://proxy_ip:port
- No Proxy: localhost, *.local
Authentication
Insomnia supports proxies with authentication:
- URL format: http://user:pass@proxy_ip:port
- Or via Environment Variables: HTTP_PROXY, HTTPS_PROXY
Environment Variables
Insomnia reads system environment variables:
- HTTP_PROXY / http_proxy
- HTTPS_PROXY / https_proxy
- NO_PROXY / no_proxy
Advanced Configuration
Environment Variables
Most tools support standard environment variables for proxies:
- HTTP_PROXY / http_proxy — proxy for HTTP requests
- HTTPS_PROXY / https_proxy — proxy for HTTPS requests
- NO_PROXY / no_proxy — list of exclusions (addresses that bypass the proxy)
- ALL_PROXY / all_proxy — proxy for all protocols
SSL and Self-Signed Certificates
Corporate proxies often use their own SSL certificates. To work through them, you need to:
1. Obtain the proxy's CA certificate from the administrator
2. Add it to the system certificate store
3. Or disable SSL verification (for testing only)
Authentication
Two main authentication methods are supported:
Username and Password — standard HTTP Basic authentication. Credentials are sent with each request. URL format: http://user:pass@proxy_ip:port
By IP address (whitelist) — your IP is added to a whitelist. No credentials need to be sent.
Verification
After configuration, check:
1. Execute a test request through the proxy
2. Ensure that the IP address has changed
3. Check the connection speed
4. Verify the absence of DNS leaks
Troubleshooting
Proxy Connection Issues
- Check the correctness of the address and port
- Ensure that the firewall is not blocking the connection
- Check the proxy's accessibility from your network
SSL Errors
- For corporate proxies, add the CA certificate
- For testing, temporarily disable SSL verification
- Update SSL libraries to the latest version
Authentication Errors
- Check the username and password
- Ensure the correct format of credentials
- Try URL encoding special characters in the password
Best Practices
- Use environment variables — for flexibility and security
- Do not hardcode credentials — use environment variables or configuration files
- Configure exclusions — do not proxy localhost and internal addresses
- Document settings — in the project's README or team wiki
- Test after changes — any configuration change requires verification
Conclusion
Proper proxy configuration ensures stable tool operation and secure connections. Follow the recommendations in this guide and always verify functionality after setup.