aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/proxy.py
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2014-01-31 03:01:51 +0100
committerMaximilian Hils <git@maximilianhils.com>2014-01-31 03:01:51 +0100
commit7d96ff00efd80b11ab35f7f1c9c7dd6aff9c9032 (patch)
tree28ff60b0d106822ff45803c4af8788d2f9173b7c /libmproxy/proxy.py
parent30a44cbb41fab51a30e609ba6318e1e8c062f73a (diff)
downloadmitmproxy-7d96ff00efd80b11ab35f7f1c9c7dd6aff9c9032.tar.gz
mitmproxy-7d96ff00efd80b11ab35f7f1c9c7dd6aff9c9032.tar.bz2
mitmproxy-7d96ff00efd80b11ab35f7f1c9c7dd6aff9c9032.zip
remove _flow_map from state, improve logging
Diffstat (limited to 'libmproxy/proxy.py')
-rw-r--r--libmproxy/proxy.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/libmproxy/proxy.py b/libmproxy/proxy.py
index e63573fb..e69bb6da 100644
--- a/libmproxy/proxy.py
+++ b/libmproxy/proxy.py
@@ -291,8 +291,20 @@ class ConnectionHandler:
A protocol handler must raise a ConnTypeChanged exception if it detects that this is happening
"""
# TODO: Implement SSL pass-through handling and change conntype
- if self.server_conn.address.host == "news.ycombinator.com":
+ passthrough = ["echo.websocket.org",
+ "174.129.224.73" # echo.websocket.org, transparent mode
+ ]
+ if self.server_conn.address.host in passthrough or self.sni in passthrough:
self.conntype = "tcp"
+ return
+
+ if client or server:
+ subs = []
+ if client:
+ subs.append("with client")
+ if server:
+ subs.append("with server (sni: %s)" % self.sni)
+ self.log("Establish SSL", subs)
if server:
if self.server_conn.ssl_established:
@@ -307,7 +319,7 @@ class ConnectionHandler:
def server_reconnect(self, no_ssl=False):
had_ssl, sni = self.server_conn.ssl_established, self.sni
- self.log("server reconnect (ssl: %s, sni: %s)" % (had_ssl, sni))
+ self.log("(server reconnect follows)")
self.establish_server_connection(self.server_conn.address())
if had_ssl and not no_ssl:
self.sni = sni