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

Method setup_servers

mitmproxy/addons/proxyserver.py:306–310  ·  view source on GitHub ↗

Setup proxy servers. This may take an indefinite amount of time to complete (e.g. on permission prompts).

(self)

Source from the content-addressed store, hash-verified

304 )
305
306 async def setup_servers(self) -> bool:
307 """Setup proxy servers. This may take an indefinite amount of time to complete (e.g. on permission prompts)."""
308 return await self.servers.update(
309 [mode_specs.ProxyMode.parse(m) for m in ctx.options.mode]
310 )
311
312 def listen_addrs(self) -> list[Address]:
313 return [addr for server in self.servers for addr in server.listen_addrs]

Callers 13

test_asgi_fullFunction · 0.95
test_start_stopFunction · 0.95
test_injectFunction · 0.95
test_warn_no_nextlayerFunction · 0.95
test_self_connectFunction · 0.95
test_startup_errFunction · 0.95
test_shutdown_errFunction · 0.95
test_dnsFunction · 0.95
test_udpFunction · 0.95
test_regular_http3Function · 0.95

Calls 2

updateMethod · 0.45
parseMethod · 0.45

Tested by 12

test_asgi_fullFunction · 0.76
test_start_stopFunction · 0.76
test_injectFunction · 0.76
test_warn_no_nextlayerFunction · 0.76
test_self_connectFunction · 0.76
test_startup_errFunction · 0.76
test_shutdown_errFunction · 0.76
test_dnsFunction · 0.76
test_udpFunction · 0.76
test_regular_http3Function · 0.76