diff options
author | Sandor Nemes <sandor.nemes@gmail.com> | 2016-01-08 15:46:59 +0100 |
---|---|---|
committer | Sandor Nemes <sandor.nemes@gmail.com> | 2016-01-08 18:55:13 +0100 |
commit | fe77dd35c67a0dfbd3004fefe97c689f8cfd3291 (patch) | |
tree | bec6c002a4db4ac019d9dfe5cf735db3375378c4 /libmproxy/models | |
parent | 11215e46ecc5c3a4272893d4b06f71920ff126f5 (diff) | |
download | mitmproxy-fe77dd35c67a0dfbd3004fefe97c689f8cfd3291.tar.gz mitmproxy-fe77dd35c67a0dfbd3004fefe97c689f8cfd3291.tar.bz2 mitmproxy-fe77dd35c67a0dfbd3004fefe97c689f8cfd3291.zip |
Fixed a problem with the bind address not being used as the source address on outgoing TCP packets
Diffstat (limited to 'libmproxy/models')
-rw-r--r-- | libmproxy/models/connections.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libmproxy/models/connections.py b/libmproxy/models/connections.py index 0991955d..0cfc17d4 100644 --- a/libmproxy/models/connections.py +++ b/libmproxy/models/connections.py @@ -88,8 +88,10 @@ class ClientConnection(tcp.BaseHandler, stateobject.StateObject): class ServerConnection(tcp.TCPClient, stateobject.StateObject): - def __init__(self, address): - tcp.TCPClient.__init__(self, address) + def __init__(self, address, source_address=None): + if source_address: + source_address = (source_address, 0) + tcp.TCPClient.__init__(self, address, source_address) self.via = None self.timestamp_start = None |