diff --git a/MANIFEST.in b/MANIFEST.in index efe18f43c..cc048b614 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -2,10 +2,7 @@ include mitmproxy mitmdump include LICENSE CHANGELOG CONTRIBUTORS README.txt exclude README.mkd recursive-include examples * -recursive-exclude examples *.pyc *.pyo *.swo *.swp recursive-include doc * -recursive-exclude doc *.pyc *.pyo *.swo *.swp recursive-include test * -recursive-exclude test *.pyc *.pyo *.swo *.swp recursive-include libmproxy * -recursive-exclude libmproxy *.pyc *.pyo *.swo *.swp \ No newline at end of file +recursive-exclude * *.pyc *.pyo *.swo *.swp \ No newline at end of file diff --git a/libmproxy/protocol/http.py b/libmproxy/protocol/http.py index de5f99501..0bb014a2c 100644 --- a/libmproxy/protocol/http.py +++ b/libmproxy/protocol/http.py @@ -1304,7 +1304,7 @@ class RequestReplayThread(threading.Thread): server.connect() if r.scheme == "https": send_connect_request(server, r.host, r.port) - server.establish_ssl(self.config.clientcerts, sni=r.host) + server.establish_ssl(self.config.clientcerts, sni=self.flow.server_conn.sni) r.form_out = "relative" else: r.form_out = "absolute" @@ -1313,10 +1313,11 @@ class RequestReplayThread(threading.Thread): server = ServerConnection(server_address) server.connect() if r.scheme == "https": - server.establish_ssl(self.config.clientcerts, sni=r.host) + server.establish_ssl(self.config.clientcerts, sni=self.flow.server_conn.sni) r.form_out = "relative" server.send(r.assemble()) + self.flow.server_conn = server self.flow.response = HTTPResponse.from_stream(server.rfile, r.method, body_size_limit=self.config.body_size_limit) self.channel.ask("response", self.flow)