From 0404ad239ff8d67a8a3263719dd7e16f80d84c94 Mon Sep 17 00:00:00 2001 From: Vangelis Banos Date: Tue, 20 Mar 2018 07:35:49 +0000 Subject: [PATCH] Fix SOCKS connection error --- warcprox/mitmproxy.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/warcprox/mitmproxy.py b/warcprox/mitmproxy.py index e87975c..5a47398 100644 --- a/warcprox/mitmproxy.py +++ b/warcprox/mitmproxy.py @@ -260,6 +260,8 @@ class MitmProxyHandler(http_server.BaseHTTPRequestHandler): self._remote_server_conn.sock.set_proxy( socks.SOCKS5, addr=self.onion_tor_socks_proxy_host, port=self.onion_tor_socks_proxy_port, rdns=True) + self._remote_server_conn.timeout = self._socket_timeout + self._remote_server_conn.sock.connect((self.hostname, int(self.port))) else: self._remote_server_conn.timeout = self._socket_timeout self._remote_server_conn.connect()