aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2018-05-12 13:38:15 +1200
committerAldo Cortesi <aldo@nullcube.com>2018-05-12 13:38:15 +1200
commit4b4d97412ba2b58ee9a5f61751c14ceccacf608d (patch)
tree05e5457b5b92a16e650c2337b7ab78eb0b849176
parent94428b2ffdcb5780a7a12373472b6a21eb9fd83e (diff)
downloadmitmproxy-4b4d97412ba2b58ee9a5f61751c14ceccacf608d.tar.gz
mitmproxy-4b4d97412ba2b58ee9a5f61751c14ceccacf608d.tar.bz2
mitmproxy-4b4d97412ba2b58ee9a5f61751c14ceccacf608d.zip
clientreplay: don't restrict outbound replay address to listen host
Fixes #2647
-rw-r--r--mitmproxy/addons/clientplayback.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/mitmproxy/addons/clientplayback.py b/mitmproxy/addons/clientplayback.py
index e9fbadce..99ba1d8d 100644
--- a/mitmproxy/addons/clientplayback.py
+++ b/mitmproxy/addons/clientplayback.py
@@ -59,9 +59,7 @@ class RequestReplayThread(basethread.BaseThread):
# In all modes, we directly connect to the server displayed
if self.options.mode.startswith("upstream:"):
server_address = server_spec.parse_with_mode(self.options.mode)[1].address
- server = connections.ServerConnection(
- server_address, (self.options.listen_host, 0)
- )
+ server = connections.ServerConnection(server_address)
server.connect()
if r.scheme == "https":
connect_request = http.make_connect_request((r.data.host, r.port))
@@ -85,10 +83,7 @@ class RequestReplayThread(basethread.BaseThread):
r.first_line_format = "absolute"
else:
server_address = (r.host, r.port)
- server = connections.ServerConnection(
- server_address,
- (self.options.listen_host, 0)
- )
+ server = connections.ServerConnection(server_address)
server.connect()
if r.scheme == "https":
server.establish_tls(