mirror of
https://github.com/vee1e/mitmproxy.git
synced 2026-09-02 10:47:14 +00:00
[dns] set DNS test port > 1024
This commit is contained in:
parent
ec1f736171
commit
383dd67a61
1 changed files with 3 additions and 3 deletions
|
|
@ -234,7 +234,7 @@ async def test_dns_simple() -> None:
|
|||
flow = tdnsflow(resp=False)
|
||||
ps = Proxyserver()
|
||||
with taddons.context(ps) as tctx:
|
||||
tctx.configure(ps, server=False, dns_server=True, dns_mode="simple")
|
||||
tctx.configure(ps, server=False, dns_server=True, dns_listen_port=5353, dns_mode="simple")
|
||||
await ps.running()
|
||||
await tctx.master.await_log("DNS server listening at", level="info")
|
||||
await ps.dns_request(flow)
|
||||
|
|
@ -246,7 +246,7 @@ async def test_dns_not_simple() -> None:
|
|||
flow = tdnsflow(resp=False)
|
||||
ps = Proxyserver()
|
||||
with taddons.context(ps) as tctx:
|
||||
tctx.configure(ps, server=False, dns_server=True, dns_mode="custom")
|
||||
tctx.configure(ps, server=False, dns_server=True, dns_listen_port=5353, dns_mode="custom")
|
||||
await ps.running()
|
||||
await tctx.master.await_log("DNS server listening at", level="info")
|
||||
await ps.dns_request(flow)
|
||||
|
|
@ -257,7 +257,7 @@ async def test_dns_not_simple() -> None:
|
|||
async def test_dns() -> None:
|
||||
ps = Proxyserver()
|
||||
with taddons.context(ps) as tctx:
|
||||
tctx.configure(ps, server=False, dns_server=True, dns_mode="simple")
|
||||
tctx.configure(ps, server=False, dns_server=True, dns_listen_port=5353, dns_mode="simple")
|
||||
await ps.running()
|
||||
await tctx.master.await_log("DNS server listening at", level="info")
|
||||
assert ps.dns_server
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue