diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2013-03-02 15:06:49 +1300 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2013-03-02 15:06:49 +1300 |
commit | a95d78438c7197b0b6643a61899914083de70da9 (patch) | |
tree | 9d603470aa91a4a570234cfeeeb3030f9fa5ae6b /libmproxy/proxy.py | |
parent | 10db82e9a030235ab884e70d1809ad6d673c2d13 (diff) | |
download | mitmproxy-a95d78438c7197b0b6643a61899914083de70da9.tar.gz mitmproxy-a95d78438c7197b0b6643a61899914083de70da9.tar.bz2 mitmproxy-a95d78438c7197b0b6643a61899914083de70da9.zip |
Test SNI for transparent mode.
Diffstat (limited to 'libmproxy/proxy.py')
-rw-r--r-- | libmproxy/proxy.py | 8 |
1 files changed, 7 insertions, 1 deletions
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 |