switch to stock aioquic (#6573)
This commit is contained in:
parent
89189849c0
commit
95c5bf9d5d
|
@ -31,7 +31,7 @@ classifiers = [
|
|||
# https://packaging.python.org/en/latest/discussions/install-requires-vs-requirements/#install-requires
|
||||
# It is not considered best practice to use install_requires to pin dependencies to specific versions.
|
||||
dependencies = [
|
||||
"aioquic_mitmproxy>=0.9.21,<0.10",
|
||||
"aioquic>=0.9.24,<0.10",
|
||||
"asgiref>=3.2.10,<3.8",
|
||||
"Brotli>=1.0,<1.2",
|
||||
"certifi>=2019.9.11", # no semver here - this should always be on the last release!
|
||||
|
|
|
@ -196,8 +196,8 @@ def test_reverse_dns(tctx):
|
|||
def test_quic(tctx: Context, keep_host_header: bool):
|
||||
with taddons.context():
|
||||
tctx.options.keep_host_header = keep_host_header
|
||||
tctx.server.sni = "other"
|
||||
tctx.client.proxy_mode = ProxyMode.parse("reverse:quic://1.2.3.4:5")
|
||||
tctx.server.sni = "other.example.com"
|
||||
tctx.client.proxy_mode = ProxyMode.parse("reverse:quic://example.org:443")
|
||||
client_hello = Placeholder(bytes)
|
||||
|
||||
def set_settings(data: quic.QuicTlsData):
|
||||
|
@ -215,9 +215,9 @@ def test_quic(tctx: Context, keep_host_header: bool):
|
|||
<< SendData(tctx.server, client_hello)
|
||||
<< RequestWakeup(Placeholder(float))
|
||||
)
|
||||
assert tctx.server.address == ("1.2.3.4", 5)
|
||||
assert tctx.server.address == ("example.org", 443)
|
||||
assert quic.quic_parse_client_hello(client_hello()).sni == (
|
||||
"other" if keep_host_header else "1.2.3.4"
|
||||
"other.example.com" if keep_host_header else "example.org"
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -840,7 +840,9 @@ class TestServerTLS:
|
|||
playbook
|
||||
>> events.Wakeup(playbook.actual[9])
|
||||
<< commands.Log(
|
||||
"Server QUIC handshake failed. Certificate does not match hostname 'wrong.host.mitmproxy.org'",
|
||||
tutils.StrMatching(
|
||||
"Server QUIC handshake failed. hostname 'wrong.host.mitmproxy.org' doesn't match"
|
||||
),
|
||||
WARNING,
|
||||
)
|
||||
<< tls.TlsFailedServerHook(tls_hook_data)
|
||||
|
@ -848,12 +850,13 @@ class TestServerTLS:
|
|||
<< commands.CloseConnection(tctx.server)
|
||||
<< commands.SendData(
|
||||
tctx.client,
|
||||
b"open-connection failed: Certificate does not match hostname 'wrong.host.mitmproxy.org'",
|
||||
tutils.BytesMatching(
|
||||
b"open-connection failed: hostname 'wrong.host.mitmproxy.org' doesn't match"
|
||||
),
|
||||
)
|
||||
)
|
||||
assert (
|
||||
tls_hook_data().conn.error
|
||||
== "Certificate does not match hostname 'wrong.host.mitmproxy.org'"
|
||||
assert tls_hook_data().conn.error.startswith(
|
||||
"hostname 'wrong.host.mitmproxy.org' doesn't match"
|
||||
)
|
||||
assert not tctx.server.tls_established
|
||||
|
||||
|
@ -1133,7 +1136,9 @@ class TestClientTLS:
|
|||
playbook
|
||||
>> events.Wakeup(playbook.actual[7])
|
||||
<< commands.Log(
|
||||
"Client QUIC handshake failed. Certificate does not match hostname 'wrong.host.mitmproxy.org'",
|
||||
tutils.StrMatching(
|
||||
"Client QUIC handshake failed. hostname 'wrong.host.mitmproxy.org' doesn't match"
|
||||
),
|
||||
WARNING,
|
||||
)
|
||||
<< tls.TlsFailedClientHook(tls_hook_data)
|
||||
|
|
Loading…
Reference in New Issue