diff options
| -rw-r--r-- | libmproxy/protocol/base.py | 2 | ||||
| -rw-r--r-- | libmproxy/proxy/modes/http_proxy.py | 1 | ||||
| -rw-r--r-- | libmproxy/proxy/modes/reverse_proxy.py | 1 | ||||
| -rw-r--r-- | libmproxy/proxy/modes/socks_proxy.py | 1 | ||||
| -rw-r--r-- | libmproxy/proxy/modes/transparent_proxy.py | 1 | 
5 files changed, 1 insertions, 5 deletions
| diff --git a/libmproxy/protocol/base.py b/libmproxy/protocol/base.py index cf8771e0..d984cadb 100644 --- a/libmproxy/protocol/base.py +++ b/libmproxy/protocol/base.py @@ -111,7 +111,7 @@ class ServerConnectionMixin(object):      def __init__(self, server_address=None):          super(ServerConnectionMixin, self).__init__() -        self.server_conn = ServerConnection(server_address) +        self.server_conn = ServerConnection(server_address, (self.config.host, 0))          self.__check_self_connect()      def __check_self_connect(self): diff --git a/libmproxy/proxy/modes/http_proxy.py b/libmproxy/proxy/modes/http_proxy.py index 27da57dd..c7502c24 100644 --- a/libmproxy/proxy/modes/http_proxy.py +++ b/libmproxy/proxy/modes/http_proxy.py @@ -16,7 +16,6 @@ class HttpProxy(Layer, ServerConnectionMixin):  class HttpUpstreamProxy(Layer, ServerConnectionMixin):      def __init__(self, ctx, server_address):          super(HttpUpstreamProxy, self).__init__(ctx, server_address=server_address) -        self.server_conn.source_address = (ctx.config.host, 0)      def __call__(self):          layer = self.ctx.next_layer(self) diff --git a/libmproxy/proxy/modes/reverse_proxy.py b/libmproxy/proxy/modes/reverse_proxy.py index 3ff22b6c..28f4e6f8 100644 --- a/libmproxy/proxy/modes/reverse_proxy.py +++ b/libmproxy/proxy/modes/reverse_proxy.py @@ -6,7 +6,6 @@ from ...protocol import Layer, ServerConnectionMixin  class ReverseProxy(Layer, ServerConnectionMixin):      def __init__(self, ctx, server_address, server_tls):          super(ReverseProxy, self).__init__(ctx, server_address=server_address) -        self.server_conn.source_address = (ctx.config.host, 0)          self.server_tls = server_tls      def __call__(self): diff --git a/libmproxy/proxy/modes/socks_proxy.py b/libmproxy/proxy/modes/socks_proxy.py index 6e0b927b..90788e37 100644 --- a/libmproxy/proxy/modes/socks_proxy.py +++ b/libmproxy/proxy/modes/socks_proxy.py @@ -10,7 +10,6 @@ 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: diff --git a/libmproxy/proxy/modes/transparent_proxy.py b/libmproxy/proxy/modes/transparent_proxy.py index 995e4bd9..da1d4632 100644 --- a/libmproxy/proxy/modes/transparent_proxy.py +++ b/libmproxy/proxy/modes/transparent_proxy.py @@ -8,7 +8,6 @@ from ...protocol import Layer, ServerConnectionMixin  class TransparentProxy(Layer, ServerConnectionMixin):      def __init__(self, ctx):          super(TransparentProxy, self).__init__(ctx) -        self.server_conn.source_address = (ctx.config.host, 0)          self.resolver = platform.resolver()      def __call__(self): | 
