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

Class HttpConnectHook

mitmproxy/proxy/layers/http/_hooks.py:70–83  ·  view source on GitHub ↗

An HTTP CONNECT request was received. This event can be ignored for most practical purposes. This event only occurs in regular and upstream proxy modes when the client instructs mitmproxy to open a connection to an upstream host. Setting a non 2xx response on the flow will return t

Source from the content-addressed store, hash-verified

68
69@dataclass
70class HttpConnectHook(commands.StartHook):
71 """
72 An HTTP CONNECT request was received. This event can be ignored for most practical purposes.
73
74 This event only occurs in regular and upstream proxy modes
75 when the client instructs mitmproxy to open a connection to an upstream host.
76 Setting a non 2xx response on the flow will return the response to the client and abort the connection.
77
78 CONNECT requests are HTTP proxy instructions for mitmproxy itself
79 and not forwarded. They do not generate the usual HTTP handler events,
80 but all requests going over the newly opened connection will.
81 """
82
83 flow: http.HTTPFlow
84
85
86@dataclass

Callers 1

handle_connectMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…