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/proxy/modes/socks_proxy.py | |
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/proxy/modes/socks_proxy.py')
-rw-r--r-- | libmproxy/proxy/modes/socks_proxy.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libmproxy/proxy/modes/socks_proxy.py b/libmproxy/proxy/modes/socks_proxy.py index 264c734a..6e0b927b 100644 --- a/libmproxy/proxy/modes/socks_proxy.py +++ b/libmproxy/proxy/modes/socks_proxy.py @@ -8,6 +8,10 @@ from ...protocol import Layer, ServerConnectionMixin class Socks5Proxy(Layer, ServerConnectionMixin): + def __init__(self, ctx): + super(Socks5Proxy, self).__init__(ctx) + self.server_conn.source_address = (ctx.config.host, 0) + def __call__(self): try: # Parse Client Greeting |