# 3.0 flow.client\_conn.ip\_address returns something different than before

**URL:** <https://discourse.mitmproxy.org/t/3-0-flow-client-conn-ip-address-returns-something-different-than-before/777>\
**Category:** development\
**Created:** [December 29, 2017, 10:32pm UTC](https://discourse.mitmproxy.org/t/3-0-flow-client-conn-ip-address-returns-something-different-than-before/777 "2017-12-29T22:32:19Z")\
**Posts on this page:** 2\
**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:** [December 29, 2017, 10:32pm UTC](https://discourse.mitmproxy.org/t/3-0-flow-client-conn-ip-address-returns-something-different-than-before/777/1 "2017-12-29T22:32:19Z")

</div>

Just reporting in with differences here, but why/what reasons was there to change the following code:  
ip, port = str(flow.client\_conn.ip\_address).split(":") #2.0.2  
ip, port = flow.client\_conn.ip\_address[0].split(":")[3], flow.client\_conn.ip\_address[1] #3.0

---

<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:** [December 30, 2017, 8:39pm UTC](https://discourse.mitmproxy.org/t/3-0-flow-client-conn-ip-address-returns-something-different-than-before/777/2 "2017-12-30T20:39:20Z")

</div>

We previously had our own `tcp.Address` class, which was basically a wrapper around an addressinfo tuple that provided a few nice features such as a useful `str` representation. Ultimately we felt it however introduced too many inconsistencies, and we changed it to a simple tuple just like Python’s socket module. If you want a nice string representation, check out [`mitmproxy.utils.human.format_address`](https://github.com/mitmproxy/mitmproxy/blob/master/mitmproxy/utils/human.py#L76).
