Replaying Saved Traffic via Proxy

After saving traffic using mitmdump

mitmdump -w scratch/traffic

I then want to replay the GET requests:

mitmdump -nc scratch/traffic “~m GET”

However, I’d like to send these out via a proxy, i.e. I need to be able to configure mitmdump itself to use a proxy when replaying traffic. Is this possible?

Hi @drdrwhite,

Did you take a look at the upstream proxy mode?

Thanks for the reply. Sorry for the delay - I’ve been offline for few weeks.

Yes, I saw the upstream proxy mode, but it appears to me that this only applies when using mitmproxy as a proxy, and not when simply using it to replay traffic. That’s based on the documentation and trying to replay with upstream proxy options. Do you think it should be possible?

mitmproxy respects the upstream proxy setting when replaying traffic, this should work. :slight_smile:

Great, thanks mhils. I must have been doing something else wrong. Thanks for confirming.