From a95d78438c7197b0b6643a61899914083de70da9 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Sat, 2 Mar 2013 15:06:49 +1300 Subject: Test SNI for transparent mode. --- libmproxy/proxy.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'libmproxy') diff --git a/libmproxy/proxy.py b/libmproxy/proxy.py index 54cb6f8e..964c15a9 100644 --- a/libmproxy/proxy.py +++ b/libmproxy/proxy.py @@ -140,6 +140,13 @@ class ProxyHandler(tcp.BaseHandler): tcp.BaseHandler.__init__(self, connection, client_address, server) def get_server_connection(self, cc, scheme, host, port, sni): + """ + When SNI is in play, this means we have an SSL-encrypted + connection, which means that the entire handler is dedicated to a + single server connection - no multiplexing. If this assumption ever + breaks, we'll have to do something different with the SNI host + variable on the handler object. + """ sc = self.server_conn if not sni: sni = host @@ -329,7 +336,6 @@ class ProxyHandler(tcp.BaseHandler): raise ProxyError(400, str(v)) else: scheme = "http" - host = self.sni or host line = self.get_line(self.rfile) if line == "": return None -- cgit v1.2.3