Using mitmproxy reverse mode for API testing 0 ▲ LornaJane 8 hours ago · Tech · hide · 0 comments mitmproxy is my preferred proxy for API testing these days. I’m using it mostly in reverse mode though, so I thought I’d capture my setup in case it’s useful for anyone else. My main use case is to inspect the traffic coming into the API server and being returned, mostly when running tests against it. Where mitmproxy is typically used as a proxy to monitor traffic passing into/out of a client application, for this I’m concerned with the server’s handling. Reverse mode lets me inspect and adjust the traffic as I go along. I start up the proxy, configure the tests to point to it instead of the actual server, and I’m all set. Start reverse proxy mode Mitmproxy has a great web UI as well but as a keyboard-only user, I just use the terminal tools – pick what works best for you, but these instructions are CLI-based. Start the reverse proxy and tell it where to send traffic onward to; in this example the API I’m calling is on http://localhost:3000 mitmproxy --mode… No comments yet. Log in to reply on the Fediverse. Comments will appear here.