MCPcopy Create free account
hub / github.com/mitmproxy/mitmproxy / tserver_conn

Function tserver_conn

mitmproxy/test/tflow.py:241–263  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

239
240
241def tserver_conn() -> connection.Server:
242 c = connection.Server(
243 id=str(uuid.uuid4()),
244 address=("address", 22),
245 peername=("192.168.0.1", 22),
246 sockname=("address", 22),
247 timestamp_start=946681202,
248 timestamp_tcp_setup=946681203,
249 timestamp_tls_setup=946681204,
250 timestamp_end=946681205,
251 sni="address",
252 alpn=None,
253 tls_version="TLSv1.2",
254 via=None,
255 state=ConnectionState.CLOSED,
256 error=None,
257 tls=False,
258 certificate_list=[],
259 alpn_offers=[],
260 cipher=None,
261 cipher_list=[],
262 )
263 return c
264
265
266def terr(content: str = "error") -> flow.Error:

Callers 8

test_stateMethod · 0.90
test_self_connectFunction · 0.90
ttcpflowFunction · 0.85
tudpflowFunction · 0.85
twebsocketflowFunction · 0.85
tdnsflowFunction · 0.85
tflowFunction · 0.85
tdummyflowFunction · 0.85

Calls

no outgoing calls

Tested by 2

test_stateMethod · 0.72
test_self_connectFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…