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

Function start_h3_proxy

test/mitmproxy/proxy/layers/http/test_http3.py:365–379  ·  view source on GitHub ↗
(tctx: context.Context)

Source from the content-addressed store, hash-verified

363
364
365def start_h3_proxy(tctx: context.Context) -> tuple[tutils.Playbook, FrameFactory]:
366 tctx.client.alpn = b"h3"
367 tctx.client.transport_protocol = "udp"
368 tctx.server.transport_protocol = "udp"
369
370 playbook = tutils.Playbook(layers.HttpLayer(tctx, layers.http.HTTPMode.regular))
371 cff = FrameFactory(conn=tctx.client, is_client=True)
372 assert (
373 playbook
374 << cff.send_init()
375 >> cff.receive_init()
376 << cff.send_encoder()
377 >> cff.receive_encoder()
378 )
379 return playbook, cff
380
381
382def make_h3(open_connection: commands.OpenConnection) -> None:

Callers 15

test_ignore_pushFunction · 0.85
test_invalid_headerFunction · 0.85
test_simpleFunction · 0.85
test_response_trailersFunction · 0.85
test_request_trailersFunction · 0.85
test_upstream_errorFunction · 0.85
test_http3_client_abortsFunction · 0.85
test_rst_then_closeFunction · 0.85
test_stream_concurrencyFunction · 0.85

Calls 5

send_initMethod · 0.95
receive_initMethod · 0.95
send_encoderMethod · 0.95
receive_encoderMethod · 0.95
FrameFactoryClass · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…