# Trying to get Ignore Expression to work

**URL:** <https://discourse.mitmproxy.org/t/trying-to-get-ignore-expression-to-work/519>\
**Category:** Uncategorized\
**Created:** [June 17, 2017, 6:18am UTC](https://discourse.mitmproxy.org/t/trying-to-get-ignore-expression-to-work/519 "2017-06-17T06:18:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mradr1](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mitmproxy.org/mradr1/32/211_2.png) [@Mradr1](https://discourse.mitmproxy.org/u/Mradr1)\
**Post date:** [June 17, 2017, 6:18am UTC](https://discourse.mitmproxy.org/t/trying-to-get-ignore-expression-to-work/519/1 "2017-06-17T06:18:38Z")

</div>

Hello everyone. I been trying my butt off to make this work, but going off the wiki I should be about to do something like this on the ignore list base off what it says. Personally, I think there should be more examples as they are kind of all over the place really. Then again, maybe this isn’t something that can be done just yet.

–ignore -src IP\_Address & -dst [google.com](http://google.com)

What I am looking to do is from source IP - if they are trying to head to [google.com](http://google.com) - simply ignore it and allow the connection to be made. Other src locations would still be control by the proxy like normal.

What I would like to do is still have some control over it before it ignore it completely. For example, I would still like to log said dst url so I might still be able to track where it was ignore if at all possible… If it can’t be done by the ignore list - I would still like to be able to do something like this as a work around. I already expose self.master.options.ignore\_hosts to the script so I might add items in and out as needed.

Thanks for any help!

---

<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:** [June 20, 2017, 10:42am UTC](https://discourse.mitmproxy.org/t/trying-to-get-ignore-expression-to-work/519/2 "2017-06-20T10:42:25Z")

</div>

Hi,

The syntax for `--ignore` is much simpler and does not allow a distinction by source IP: [http://docs.mitmproxy.org/en/stable/features/passthrough.html#how-it-works](http://docs.mitmproxy.org/en/stable/features/passthrough.html#how-it-works),

---

<div class="post-metadata">

**Author:** ![Mradr1](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mitmproxy.org/mradr1/32/211_2.png) [@Mradr1](https://discourse.mitmproxy.org/u/Mradr1)\
**Post date:** [June 20, 2017, 1:15pm UTC](https://discourse.mitmproxy.org/t/trying-to-get-ignore-expression-to-work/519/3 "2017-06-20T13:15:20Z")

</div>

I see. Yea I was looking into the code myself and seeing what I was doing wrong. I guess the talk between the two filter and ignore is a bit confusing base off what the site says. Ignore could be fix to be a lot more powerful/flexible in that case and maybe something we could look into the future to improve on.

For now, I would still like to make this work in a way that might be possible to pass both a dst and a src location. I think I might have a work around for now.

---

<div class="post-metadata">

**Author:** ![Mradr1](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mitmproxy.org/mradr1/32/211_2.png) [@Mradr1](https://discourse.mitmproxy.org/u/Mradr1)\
**Post date:** [June 26, 2017, 6:29am UTC](https://discourse.mitmproxy.org/t/trying-to-get-ignore-expression-to-work/519/4 "2017-06-26T06:29:58Z")

</div>

Just adding onto this - what is the logic behind updating variables when calling them on updates. I’m a bit confused when I add in a vairable under the options file - it seems that the option doesn’t update to the rest of the project unless I update the vairable by replacing the whole vairable.

For example:  
My\_List = My\_List[:4] + My\_List[5:]

But if I do:  
My\_List.append()  
OR  
My\_Dict[“ip”] = {}

It doesn’t update through out the project? Is there a way to force an update on changes like these? Why not just have it update anyways without this caching idea?
