#mitmproxy has gotten super cool. It has become my swiss army knife for security assessments as of late.

Sometimes you can't set HTTP or SOCKS proxy, nor can you easily get MiTM to forward packets. But if you can DNS spoof (or set the endpoint address directly) you can redirect the traffic to to mitmproxy.

The reverse proxy mode supports wide range of protocols (among all kinds of http(s)). See https://docs.mitmproxy.org/stable/concepts/modes/#reverse-proxy

There are multitudes of applications for this: Debugging, recording and replaying traffic, applying realtime transformations (such as fuzzing) on the fly etc. Love it!

Proxy Modes

Here's are some examples of neat things you can do to the traffic with simple python scripts: https://docs.mitmproxy.org/stable/addons/examples/

#mitmproxy

Examples