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 /examples/stub.py | |
parent | 41e6e538dfa758b7d9f867f85f62e881ae408684 (diff) | |
download | mitmproxy-b04e6e56ab1e69853abebfb950539e3a3aefbdf2.tar.gz mitmproxy-b04e6e56ab1e69853abebfb950539e3a3aefbdf2.tar.bz2 mitmproxy-b04e6e56ab1e69853abebfb950539e3a3aefbdf2.zip |
update inline script hooks
Diffstat (limited to 'examples/stub.py')
-rw-r--r-- | examples/stub.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/examples/stub.py b/examples/stub.py index d5502a47..bd3e7cd0 100644 --- a/examples/stub.py +++ b/examples/stub.py @@ -10,7 +10,7 @@ def start(context, argv): context.log("start") -def clientconnect(context, conn_handler): +def clientconnect(context, root_layer): """ Called when a client initiates a connection to the proxy. Note that a connection can correspond to multiple HTTP requests @@ -18,7 +18,7 @@ def clientconnect(context, conn_handler): context.log("clientconnect") -def serverconnect(context, conn_handler): +def serverconnect(context, server_connection): """ Called when the proxy initiates a connection to the target server. Note that a connection can correspond to multiple HTTP requests @@ -58,7 +58,14 @@ def error(context, flow): context.log("error") -def clientdisconnect(context, conn_handler): +def serverdisconnect(context, server_connection): + """ + Called when the proxy closes the connection to the target server. + """ + context.log("serverdisconnect") + + +def clientdisconnect(context, root_layer): """ Called when a client disconnects from the proxy. """ |