aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/proxy.py
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2014-01-10 01:38:28 +0100
committerMaximilian Hils <git@maximilianhils.com>2014-01-10 01:38:28 +0100
commit24fc8ff2920c027ddba5445d037cde6cba4a807d (patch)
treedbbdd1bf666a541a76894e195daf45798a149647 /libmproxy/proxy.py
parentefdb25ef686f82f5c3a1cd83cd10f302cf6346a0 (diff)
downloadmitmproxy-24fc8ff2920c027ddba5445d037cde6cba4a807d.tar.gz
mitmproxy-24fc8ff2920c027ddba5445d037cde6cba4a807d.tar.bz2
mitmproxy-24fc8ff2920c027ddba5445d037cde6cba4a807d.zip
fix header assembly, other improvements
Diffstat (limited to 'libmproxy/proxy.py')
-rw-r--r--libmproxy/proxy.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/libmproxy/proxy.py b/libmproxy/proxy.py
index 4ce14491..6a2da7d2 100644
--- a/libmproxy/proxy.py
+++ b/libmproxy/proxy.py
@@ -184,9 +184,8 @@ class ConnectionHandler:
continue
self.del_server_connection()
- except (ProxyError, protocol.ProtocolError), e:
+ except ProxyError, e:
self.log(str(e))
- protocol.handle_error(self.conntype, self, e)
# FIXME: We need to persist errors
self.log("disconnect")
@@ -223,8 +222,13 @@ class ConnectionHandler:
self.channel.tell("serverconnect", self)
def establish_ssl(self, client, server):
+ """
+ Establishes SSL on the existing connection(s) to the server or the client,
+ as specified by the parameters. If the target server is on the pass-through list,
+ the conntype attribute will be changed and no the SSL connection won't be wrapped.
+ 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.host == "ycombinator.com":
self.conntype = "tcp"