# Is there a way to block request using mitmproxy UI?

**URL:** https://discourse.mitmproxy.org/t/is-there-a-way-to-block-request-using-mitmproxy-ui/130
**Category:** help
**Created:** [August 5, 2016, 3:39am UTC](https://discourse.mitmproxy.org/t/is-there-a-way-to-block-request-using-mitmproxy-ui/130 "2016-08-05T03:39:02Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ndhydev](https://avatars.discourse-cdn.com/v4/letter/n/b77776/32.png) [@ndhydev](https://discourse.mitmproxy.org/u/ndhydev)
#### Post date: [August 5, 2016, 3:39am UTC](https://discourse.mitmproxy.org/t/is-there-a-way-to-block-request-using-mitmproxy-ui/130/1 "2016-08-05T03:39:02Z")

</div>

Hi the Team, or hi Max.

I am just install version 0.18 success. I know that mitmproxy is able to monitoring traffic. But I wonder if mitmproxy UI have some feature allow me do deny/block request by pattern, such as block [facebook.com](http://facebook.com) pass throught my mitmproxy?

I found some google post here:  
[https://groups.google.com/forum/#!topic/mitmproxy/2UqdZb6-Gmg](https://groups.google.com/forum/#!topic/mitmproxy/2UqdZb6-Gmg)  
Tell me to dig in to the code. But before I do that, I want to ask you if any UI solution is out there? 🙂  
If not, please tell me, and I have to dive in the code nơw 😉  
I am not familiar with Python very much.

PS: The py.test is run very slow in my system wtih sudo mode, I don’t knơw why. But I made mitmproxy 0.18 running in my system so its not important nơw ☀ D

---

<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:27am UTC](https://discourse.mitmproxy.org/t/is-there-a-way-to-block-request-using-mitmproxy-ui/130/2 "2016-08-09T01:27:05Z")

</div>

You can (1) filter traffic by specifying a view filter (in mitmproxy 0.17 and before, this was called limit) or use the ignore domains feature: [http://docs.mitmproxy.org/en/stable/features/passthrough.html](http://docs.mitmproxy.org/en/stable/features/passthrough.html).

---

<div class="post-metadata">

### Author: ![ndhydev](https://avatars.discourse-cdn.com/v4/letter/n/b77776/32.png) [@ndhydev](https://discourse.mitmproxy.org/u/ndhydev)
#### Post date: [August 9, 2016, 2:40am UTC](https://discourse.mitmproxy.org/t/is-there-a-way-to-block-request-using-mitmproxy-ui/130/3 "2016-08-09T02:40:53Z")

</div>

Hi Max

Thanks for your reply. I did it on the UI.

Now I want to modify some mitmproxy code to block the request pass through  
the proxy, without the mitmproxy UI. Can you give me some tip to find where  
to do it in the code.

Thankyou.

Vào 09-08-2016 08:37, “Maximilian Hils” [mitmproxy1@discoursemail.com](mailto:mitmproxy1@discoursemail.com) đã  
viết:
