diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2011-02-06 10:52:54 +1300 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2011-02-06 10:52:54 +1300 |
commit | 44dc3a052e724bdf10e9c04e1756db89615f5685 (patch) | |
tree | 992da575144f1886aa5f333c86805a0ef09cca41 /libmproxy/proxy.py | |
parent | d0c2d9480cdf80c680937c97c790add902f718fa (diff) | |
download | mitmproxy-44dc3a052e724bdf10e9c04e1756db89615f5685.tar.gz mitmproxy-44dc3a052e724bdf10e9c04e1756db89615f5685.tar.bz2 mitmproxy-44dc3a052e724bdf10e9c04e1756db89615f5685.zip |
Add option to tell mitmproxy which interfaces to bind to.
Diffstat (limited to 'libmproxy/proxy.py')
-rw-r--r-- | libmproxy/proxy.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libmproxy/proxy.py b/libmproxy/proxy.py index 4c29d747..63f4ceb4 100644 --- a/libmproxy/proxy.py +++ b/libmproxy/proxy.py @@ -471,9 +471,9 @@ ServerBase = SocketServer.ThreadingTCPServer class ProxyServer(ServerBase): request_queue_size = 20 allow_reuse_address = True - def __init__(self, port): - self.port = port - ServerBase.__init__(self, ('', port), ProxyHandler) + def __init__(self, port, address=''): + self.port, self.address = port, address + ServerBase.__init__(self, (address, port), ProxyHandler) self.masterq = None def set_mqueue(self, q): |