diff options
author | Maximilian Hils <git@maximilianhils.com> | 2015-08-31 17:05:52 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2015-08-31 17:05:52 +0200 |
commit | b04e6e56ab1e69853abebfb950539e3a3aefbdf2 (patch) | |
tree | c1907cda3384aee854dbeb5132bed029ae26e595 /libmproxy/protocol/base.py | |
parent | 41e6e538dfa758b7d9f867f85f62e881ae408684 (diff) | |
download | mitmproxy-b04e6e56ab1e69853abebfb950539e3a3aefbdf2.tar.gz mitmproxy-b04e6e56ab1e69853abebfb950539e3a3aefbdf2.tar.bz2 mitmproxy-b04e6e56ab1e69853abebfb950539e3a3aefbdf2.zip |
update inline script hooks
Diffstat (limited to 'libmproxy/protocol/base.py')
-rw-r--r-- | libmproxy/protocol/base.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libmproxy/protocol/base.py b/libmproxy/protocol/base.py index 4eb843e4..40ec0536 100644 --- a/libmproxy/protocol/base.py +++ b/libmproxy/protocol/base.py @@ -48,9 +48,11 @@ class _LayerCodeCompletion(object): if True: return self.config = None - """@type: libmproxy.proxy.config.ProxyConfig""" + """@type: libmproxy.proxy.ProxyConfig""" self.client_conn = None - """@type: libmproxy.proxy.connection.ClientConnection""" + """@type: libmproxy.models.ClientConnection""" + self.server_conn = None + """@type: libmproxy.models.ServerConnection""" self.channel = None """@type: libmproxy.controller.Channel""" @@ -62,6 +64,7 @@ class Layer(_LayerCodeCompletion): ctx: The (read-only) higher layer. """ self.ctx = ctx + """@type: libmproxy.protocol.Layer""" super(Layer, self).__init__(*args, **kwargs) def __call__(self): @@ -149,13 +152,14 @@ class ServerConnectionMixin(object): self.log("serverdisconnect", "debug", [repr(self.server_conn.address)]) self.server_conn.finish() self.server_conn.close() - # self.channel.tell("serverdisconnect", self) + self.channel.tell("serverdisconnect", self.server_conn) self.server_conn = ServerConnection(None) def connect(self): if not self.server_conn.address: raise ProtocolException("Cannot connect to server, no server address given.") self.log("serverconnect", "debug", [repr(self.server_conn.address)]) + self.channel.ask("serverconnect", self.server_conn) try: self.server_conn.connect() except tcp.NetLibError as e: |