MCPcopy Index your code
hub / github.com/mitmproxy/mitmproxy / SimpleConnectionHandler

Class SimpleConnectionHandler

mitmproxy/proxy/server.py:488–499  ·  view source on GitHub ↗

Simple handler that does not really process any hooks.

Source from the content-addressed store, hash-verified

486
487
488class SimpleConnectionHandler(LiveConnectionHandler): # pragma: no cover
489 """Simple handler that does not really process any hooks."""
490
491 hook_handlers: dict[str, Callable]
492
493 def __init__(self, reader, writer, options, mode, hook_handlers):
494 super().__init__(reader, writer, options, mode)
495 self.hook_handlers = hook_handlers
496
497 async def handle_hook(self, hook: commands.StartHook) -> None:
498 if hook.name in self.hook_handlers:
499 self.hook_handlers[hook.name](*hook.args())
500
501
502if __name__ == "__main__": # pragma: no cover

Callers 1

handleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…