aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphackt <phackt@protonmail.com>2016-11-08 15:39:24 +0100
committerphackt <phackt@protonmail.com>2016-11-08 15:39:24 +0100
commitdc44465c9216a241246c290222ccf4aa17e9d407 (patch)
tree90bbd87d5374fa1dc88f6663677efd9435f1c5b9
parent184e29e119a56762af7cb71cc872af12f92778e8 (diff)
downloadmitmproxy-dc44465c9216a241246c290222ccf4aa17e9d407.tar.gz
mitmproxy-dc44465c9216a241246c290222ccf4aa17e9d407.tar.bz2
mitmproxy-dc44465c9216a241246c290222ccf4aa17e9d407.zip
fix SNI for transparent mode - #1638
In transparent mode host is set with the target server ip. Attribute flow.request.host is used as SNI while mitmproxy is initiating TLS handshake, so it should be set with the pretty_host.
-rw-r--r--examples/sslstrip.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/sslstrip.py b/examples/sslstrip.py
index b5e46397..5e1eb56f 100644
--- a/examples/sslstrip.py
+++ b/examples/sslstrip.py
@@ -16,6 +16,7 @@ def request(flow):
if flow.request.pretty_host in secure_hosts:
flow.request.scheme = 'https'
flow.request.port = 443
+ flow.request.host = flow.request.pretty_host
def response(flow):