# Using mitmproxy with tor

**URL:** <https://discourse.mitmproxy.org/t/using-mitmproxy-with-tor/303>\
**Category:** help\
**Created:** [January 13, 2017, 4:45pm UTC](https://discourse.mitmproxy.org/t/using-mitmproxy-with-tor/303 "2017-01-13T16:45:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![DigiAngel](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@DigiAngel](https://discourse.mitmproxy.org/u/DigiAngel)\
**Post date:** [January 13, 2017, 4:45pm UTC](https://discourse.mitmproxy.org/t/using-mitmproxy-with-tor/303/1 "2017-01-13T16:45:19Z")

</div>

Hello again!

It’s Friday the 13th and I figured I would try to hammer this out once and for all. I have always want to get a proxy that can inspect traffic working with Tor. I’m not even sure this is feasible, so I’m asking here. I have the below type setup:

client \<-\> gateway \<-\> internet

I control both the client and gateway and have a functioning Tor running already on the gateway. Do I Tor first, and then mitmproxy like so:

client \<-\> mitmproxy -\> tor -\> internet

or the other way around:

client \<-\> tor -\> mitmproxy -\> internet

I attempted to use “torify” but that failed with a permission denied (even as root). Any assistance would be great…thank you.

---

<div class="post-metadata">

**Author:** ![grobit](https://avatars.discourse-cdn.com/v4/letter/g/bbce88/32.png) [@grobit](https://discourse.mitmproxy.org/u/grobit)\
**Post date:** [April 28, 2019, 6:44pm UTC](https://discourse.mitmproxy.org/t/using-mitmproxy-with-tor/303/2 "2019-04-28T18:44:01Z")

</div>

go to /etc/tor/torsocks.conf and uncomment “#AllowInbound 1”, then you won’t get the “permission denied” when running “torsocks mitmdump …”
