# Replaying Saved Traffic via Proxy

**URL:** <https://discourse.mitmproxy.org/t/replaying-saved-traffic-via-proxy/81>\
**Category:** help\
**Created:** [July 12, 2016, 4:48pm UTC](https://discourse.mitmproxy.org/t/replaying-saved-traffic-via-proxy/81 "2016-07-12T16:48:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![drdrwhite](https://avatars.discourse-cdn.com/v4/letter/d/85f322/32.png) [@drdrwhite](https://discourse.mitmproxy.org/u/drdrwhite)\
**Post date:** [July 12, 2016, 4:48pm UTC](https://discourse.mitmproxy.org/t/replaying-saved-traffic-via-proxy/81/1 "2016-07-12T16:48:57Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![mhils](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mitmproxy.org/mhils/32/7_2.png) [@mhils](https://discourse.mitmproxy.org/u/mhils)\
**Post date:** [July 14, 2016, 1:29am UTC](https://discourse.mitmproxy.org/t/replaying-saved-traffic-via-proxy/81/2 "2016-07-14T01:29:32Z")

</div>

Hi @drdrwhite,

Did you take a look at the upstream proxy mode?  
[http://docs.mitmproxy.org/en/stable/modes.html](http://docs.mitmproxy.org/en/stable/modes.html)

---

<div class="post-metadata">

**Author:** ![drdrwhite](https://avatars.discourse-cdn.com/v4/letter/d/85f322/32.png) [@drdrwhite](https://discourse.mitmproxy.org/u/drdrwhite)\
**Post date:** [August 8, 2016, 9:49am UTC](https://discourse.mitmproxy.org/t/replaying-saved-traffic-via-proxy/81/3 "2016-08-08T09:49:42Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![mhils](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mitmproxy.org/mhils/32/7_2.png) [@mhils](https://discourse.mitmproxy.org/u/mhils)\
**Post date:** [August 9, 2016, 1:19am UTC](https://discourse.mitmproxy.org/t/replaying-saved-traffic-via-proxy/81/4 "2016-08-09T01:19:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![drdrwhite](https://avatars.discourse-cdn.com/v4/letter/d/85f322/32.png) [@drdrwhite](https://discourse.mitmproxy.org/u/drdrwhite)\
**Post date:** [August 9, 2016, 9:11am UTC](https://discourse.mitmproxy.org/t/replaying-saved-traffic-via-proxy/81/5 "2016-08-09T09:11:58Z")

</div>

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