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

Method event_to_child

mitmproxy/proxy/layers/tls.py:496–508  ·  view source on GitHub ↗
(self, event: events.Event)

Source from the content-addressed store, hash-verified

494 yield from self.receive_handshake_data(b"")
495
496 def event_to_child(self, event: events.Event) -> layer.CommandGenerator[None]:
497 if self.wait_for_clienthello:
498 for command in super().event_to_child(event):
499 if (
500 isinstance(command, commands.OpenConnection)
501 and command.connection == self.conn
502 ):
503 self.wait_for_clienthello = False
504 # swallow OpenConnection here by not re-yielding it.
505 else:
506 yield command
507 else:
508 yield from super().event_to_child(event)
509
510 def on_handshake_error(self, err: str) -> layer.CommandGenerator[None]:
511 yield commands.Log(f"Server TLS handshake failed. {err}", level=WARNING)

Callers 2

receive_dataMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected