MCPcopy
hub / github.com/mitmproxy/mitmproxy / test_tcp

Function test_tcp

test/mitmproxy/addons/test_intercept.py:66–77  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

64
65
66async def test_tcp():
67 r = intercept.Intercept()
68 with taddons.context(r) as tctx:
69 tctx.configure(r, intercept="~tcp")
70 f = tflow.ttcpflow()
71 await tctx.cycle(r, f)
72 assert f.intercepted
73
74 tctx.configure(r, intercept_active=False)
75 f = tflow.ttcpflow()
76 await tctx.cycle(r, f)
77 assert not f.intercepted
78
79
80async def test_udp():

Callers

nothing calls this directly

Calls 3

contextMethod · 0.80
configureMethod · 0.45
cycleMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…