# Mitmproxy/mitmdump multiple processes using same proxy port

**URL:** <https://discourse.mitmproxy.org/t/mitmproxy-mitmdump-multiple-processes-using-same-proxy-port/1697>\
**Category:** help\
**Created:** [October 18, 2019, 7:48am UTC](https://discourse.mitmproxy.org/t/mitmproxy-mitmdump-multiple-processes-using-same-proxy-port/1697 "2019-10-18T07:48:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mitmj](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mitmproxy.org/mitmj/32/480_2.png) [@mitmj](https://discourse.mitmproxy.org/u/mitmj)\
**Post date:** [October 18, 2019, 7:48am UTC](https://discourse.mitmproxy.org/t/mitmproxy-mitmdump-multiple-processes-using-same-proxy-port/1697/1 "2019-10-18T07:48:47Z")

</div>

Hi.

I noticed that it is possible to run multiple mitmproxy/mitmdump instances on the same proxy port.  
As I don’t think that this is a valid scenario (as it is totally indeterministic which process processes a request) so why doe mitmproxy not lock the used TCP port so that the second and third instance is getting an error - or is there an option to enable such a behavior?

Edit: I noticed that this behavior is hard-coded and cant be changed without modifying the code:

> <https://github.com/mitmproxy/mitmproxy/blob/e74e97bcd96346a1ae8c372a94149100a755739a/mitmproxy/proxy/server.py#L36>
