MCPcopy
hub / github.com/mitmproxy/mitmproxy / __str__

Method __str__

mitmproxy/connection.py:196–205  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

194 """*Timestamp:* TCP SYN received"""
195
196 def __str__(self):
197 if self.alpn:
198 tls_state = f", alpn={self.alpn.decode(errors='replace')}"
199 elif self.tls_established:
200 tls_state = ", tls"
201 else:
202 tls_state = ""
203 state = self.state.name
204 assert state
205 return f"Client({human.format_address(self.peername)}, state={state.lower()}{tls_state})"
206
207 @property
208 def address(self): # pragma: no cover

Callers

nothing calls this directly

Calls 1

decodeMethod · 0.45

Tested by

no test coverage detected