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

Method make

mitmproxy/proxy/mode_servers.py:110–122  ·  view source on GitHub ↗
(
        cls,
        mode: mode_specs.ProxyMode | str,
        manager: ServerManager,
    )

Source from the content-addressed store, hash-verified

108
109 @classmethod
110 def make(
111 cls,
112 mode: mode_specs.ProxyMode | str,
113 manager: ServerManager,
114 ) -> Self:
115 if isinstance(mode, str):
116 mode = mode_specs.ProxyMode.parse(mode)
117 inst = ServerInstance.__modes[mode.type_name](mode, manager)
118
119 if not isinstance(inst, cls):
120 raise ValueError(f"{mode!r} is not a spec for a {cls.__name__} server.")
121
122 return inst
123
124 @property
125 @abstractmethod

Callers 14

show_quickhelpMethod · 0.45
edit_focusMethod · 0.45
EBFunction · 0.45
requestFunction · 0.45
request_to_flowFunction · 0.45
requestMethod · 0.45
createMethod · 0.45
requestMethod · 0.45
updateMethod · 0.45
requestMethod · 0.45
sendFunction · 0.45

Calls 1

parseMethod · 0.45

Tested by

no test coverage detected