diff options
author | Maximilian Hils <git@maximilianhils.com> | 2017-07-17 20:47:44 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2017-07-20 15:27:41 +0200 |
commit | b7bda8f4b216fb278fb688cc656e4e6e5f6423a0 (patch) | |
tree | b9425b1039e74ba47dd285b3ddffbfffda8d577d /mitmproxy/eventsequence.py | |
parent | a81cd18d92be3ec6e326fc039a5282dd927ccc3a (diff) | |
download | mitmproxy-b7bda8f4b216fb278fb688cc656e4e6e5f6423a0.tar.gz mitmproxy-b7bda8f4b216fb278fb688cc656e4e6e5f6423a0.tar.bz2 mitmproxy-b7bda8f4b216fb278fb688cc656e4e6e5f6423a0.zip |
shorten option help
We can have longer versions in the docs, but this makes the
options pages quite hard to parse.
Diffstat (limited to 'mitmproxy/eventsequence.py')
-rw-r--r-- | mitmproxy/eventsequence.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/mitmproxy/eventsequence.py b/mitmproxy/eventsequence.py index c2455f24..09322a8f 100644 --- a/mitmproxy/eventsequence.py +++ b/mitmproxy/eventsequence.py @@ -1,7 +1,8 @@ import typing -from mitmproxy import controller, flow +from mitmproxy import controller from mitmproxy import http +from mitmproxy import flow from mitmproxy import tcp from mitmproxy import websocket @@ -10,21 +11,25 @@ Events = frozenset([ "clientdisconnect", "serverconnect", "serverdisconnect", + # TCP "tcp_start", "tcp_message", "tcp_error", "tcp_end", + # HTTP "http_connect", "request", "requestheaders", "response", "responseheaders", "error", + # WebSocket "websocket_handshake", "websocket_start", "websocket_message", "websocket_error", "websocket_end", + # misc "next_layer", "configure", "done", @@ -75,11 +80,11 @@ def _iterate_tcp(f: tcp.TCPFlow): TEventGenerator = typing.Iterator[typing.Tuple[str, typing.Any]] -_iterate_map: typing.Dict[flow.Flow, typing.Callable[[flow.Flow], TEventGenerator]] = { +_iterate_map = { http.HTTPFlow: _iterate_http, websocket.WebSocketFlow: _iterate_websocket, tcp.TCPFlow: _iterate_tcp -} +} # type: typing.Dict[flow.Flow, typing.Callable[[flow.Flow], TEventGenerator]] def iterate(f: flow.Flow) -> TEventGenerator: |