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

Function test_ignores_reverse_mode

test/mitmproxy/addons/test_dns_resolver.py:19–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17
18
19async def test_ignores_reverse_mode():
20 dr = dns_resolver.DnsResolver()
21 with taddons.context(dr, proxyserver.Proxyserver()):
22 f = tflow.tdnsflow()
23 f.client_conn.proxy_mode = ProxyMode.parse("dns")
24 assert dr._should_resolve(f)
25
26 f.client_conn.proxy_mode = ProxyMode.parse("wireguard")
27 f.server_conn.address = ("10.0.0.53", 53)
28 assert dr._should_resolve(f)
29
30 f.client_conn.proxy_mode = ProxyMode.parse("reverse:dns://8.8.8.8")
31 assert not dr._should_resolve(f)
32
33
34def _err():

Callers

nothing calls this directly

Calls 3

_should_resolveMethod · 0.95
contextMethod · 0.80
parseMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…