proxy.http.inspector.devtools module#

proxy.py#

⚡⚡⚡ Fast, Lightweight, Pluggable, TLS interception capable proxy server focused on Network monitoring, controls & Application development, testing, debugging.

copyright
  1. 2013-present by Abhinav Singh and contributors.

license

BSD, see LICENSE for more details.

class proxy.http.inspector.devtools.DevtoolsProtocolPlugin(*args: Any, **kwargs: Any)[source]#

Bases: proxy.http.server.plugin.HttpWebServerBasePlugin

Speaks DevTools protocol with client over websocket.

  • It responds to DevTools client request methods and also relay proxy.py core events to the client.

  • Core events are transformed into DevTools protocol format before dispatching to client.

  • Core events unrelated to DevTools protocol are dropped.

_abc_impl = <_abc._abc_data object>#
handle_devtools_message(message: Dict[str, Any]) None[source]#
handle_request(request: proxy.http.parser.parser.HttpParser) None[source]#

Handle the request and serve response.

on_client_connection_close() None[source]#

Client has closed the connection, do any clean up task now.

on_websocket_message(frame: proxy.http.websocket.frame.WebsocketFrame) None[source]#

Handle websocket frame.

on_websocket_open() None[source]#

Called when websocket handshake has finished.

routes() List[Tuple[int, str]][source]#

Return List(protocol, path) that this plugin handles.