diff options
author | Jim Shaver <dcypherd@gmail.com> | 2015-05-31 01:21:44 -0400 |
---|---|---|
committer | Jim Shaver <dcypherd@gmail.com> | 2015-05-31 01:21:44 -0400 |
commit | b51363b3ca43f6572acb673186e6ae78a1f48434 (patch) | |
tree | a7488b32871c142141a813dc6ff2ede172672c31 /examples/stub.py | |
parent | 4fe2c069cca07aadf983f54e18dac4de492d5d69 (diff) | |
parent | 06fba18106a8f759ec6f08453e86772a170c653b (diff) | |
download | mitmproxy-b51363b3ca43f6572acb673186e6ae78a1f48434.tar.gz mitmproxy-b51363b3ca43f6572acb673186e6ae78a1f48434.tar.bz2 mitmproxy-b51363b3ca43f6572acb673186e6ae78a1f48434.zip |
Merge remote-tracking branch 'upstream/master' into print-bracket-fix
Conflicts:
examples/har_extractor.py
examples/nonblocking.py
examples/read_dumpfile
libmproxy/web/app.py
Diffstat (limited to 'examples/stub.py')
-rw-r--r-- | examples/stub.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/examples/stub.py b/examples/stub.py index c5cdad9c..d5502a47 100644 --- a/examples/stub.py +++ b/examples/stub.py @@ -1,12 +1,15 @@ """ This is a script stub, with definitions for all events. """ + + def start(context, argv): """ Called once on script startup, before any other events. """ context.log("start") + def clientconnect(context, conn_handler): """ Called when a client initiates a connection to the proxy. Note that a @@ -14,6 +17,7 @@ def clientconnect(context, conn_handler): """ context.log("clientconnect") + def serverconnect(context, conn_handler): """ Called when the proxy initiates a connection to the target server. Note that a @@ -21,6 +25,7 @@ def serverconnect(context, conn_handler): """ context.log("serverconnect") + def request(context, flow): """ Called when a client request has been received. @@ -36,12 +41,14 @@ def responseheaders(context, flow): """ context.log("responseheaders") + def response(context, flow): """ Called when a server response has been received. """ context.log("response") + def error(context, flow): """ Called when a flow error has occured, e.g. invalid server responses, or @@ -50,12 +57,14 @@ def error(context, flow): """ context.log("error") + def clientdisconnect(context, conn_handler): """ Called when a client disconnects from the proxy. """ context.log("clientdisconnect") + def done(context): """ Called once on script shutdown, after any other events. |