How to use Reverse Proxy to capture HTTP/HTTPS from non-HTTP-Proxy apps/clients

Cover Image for How to use Reverse Proxy to capture HTTP/HTTPS from non-HTTP-Proxy apps/clients

This blog demonstrates how to capture HTTP/HTTPS traffic from apps/clients that do not support the HTTP Proxy by using Reverse Proxy Tool.

What is the problem that Reverse Proxy solves?

If your application/client doesn't support HTTP Proxy out of the box, Proxyman could not capture your traffic.

The following list gives an example of what library doesn't support HTTP Proxy or you have to config it.

  • cURL
  • fetch or axios from the NodeJS,
  • request from Python Library
  • Android TV Box
  • Embedded devices
  • Old network C libraries
  • ...

By using the Reverse Proxy, it can be possible.

How to use

Prequiresite

  • Your app/client does not support the HTTP Proxy
  • Proxyman could not capture any traffic from your app/client
  • You can access the source code of your app/client

To demonstrate, I would use the cURL command line.

By default, cURL doesn't use the proxy, so Proxyman could not capture the traffic.

⚠️ NOTE: We choose the cURL, it's for demo purposes. You can use the flag --proxy localhost:9090 to tell the cURL to use the Proxy without using the Reverse Proxy Tool.

Proxyman could not capture HTTP traffic

  1. Assume your server is https://producthunt.com
  2. Open Proxyman -> Tools Menu -> Reverse Proxy
  3. Create a new rule with the following information
  • Name: Map to Production
  • Local Port: 10000
  • Remote Host:
  • Remote Port: 443 (HTTPS)

Setup a Reverse Proxy Rule

  1. Save
  2. Open the source code of your app/client -> Change the Base URL to localhost:10000
  3. Start your app/client app
  4. See the traffic on Proxyman

Capture traffic from app does not support HTTP Proxy

As you can see, Proxyman can capture the traffic of the cURL without using the flag --proxy localhost:9090

  • If you'd like to use HTTPS, please use https://localhost:10000
  • If you'd like to use HTTP, please use http://localhost:10000

Conclusion

Some applications do not support the HTTP Proxy out of the box, so Proxyman might not capture the traffic. However, using the Reverse Proxy can help you to do it.


We hope this mini blog would be helpful for you to keep things organized. Happy coding! 👨‍🚀

Proxyman is a high-performance macOS app, which enables developers to capture and inspect HTTP(s) traffic from apps and domains on iOS devices, iOS Simulators, and Android devices.

Get it at https://proxyman.io/

Noah Tran
Noah Tran