From fe77dd35c67a0dfbd3004fefe97c689f8cfd3291 Mon Sep 17 00:00:00 2001 From: Sandor Nemes Date: Fri, 8 Jan 2016 15:46:59 +0100 Subject: Fixed a problem with the bind address not being used as the source address on outgoing TCP packets --- libmproxy/models/connections.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libmproxy/models') 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 -- cgit v1.2.3 From 918a457f5a6e4b3281f86ba31107d0a05082fb5e Mon Sep 17 00:00:00 2001 From: Sandor Nemes Date: Mon, 18 Jan 2016 09:55:46 +0100 Subject: Minor aesthetic fixes. --- libmproxy/models/connections.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'libmproxy/models') diff --git a/libmproxy/models/connections.py b/libmproxy/models/connections.py index 0cfc17d4..f5dabe4e 100644 --- a/libmproxy/models/connections.py +++ b/libmproxy/models/connections.py @@ -89,8 +89,6 @@ class ClientConnection(tcp.BaseHandler, stateobject.StateObject): class ServerConnection(tcp.TCPClient, stateobject.StateObject): 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 -- cgit v1.2.3