mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-27 02:24:18 +00:00
fix non-alpn clients
This commit is contained in:
parent
778644d4b8
commit
2cfc1b1b40
@ -162,7 +162,10 @@ class TlsLayer(Layer):
|
|||||||
# If the server only supports spdy (next to http/1.1), it may select that
|
# If the server only supports spdy (next to http/1.1), it may select that
|
||||||
# and mitmproxy would enter TCP passthrough mode, which we want to avoid.
|
# and mitmproxy would enter TCP passthrough mode, which we want to avoid.
|
||||||
deprecated_http2_variant = lambda x: x.startswith("h2-") or x.startswith("spdy")
|
deprecated_http2_variant = lambda x: x.startswith("h2-") or x.startswith("spdy")
|
||||||
|
if self.client_alpn_protocols:
|
||||||
alpn = filter(lambda x: not deprecated_http2_variant(x), self.client_alpn_protocols)
|
alpn = filter(lambda x: not deprecated_http2_variant(x), self.client_alpn_protocols)
|
||||||
|
else:
|
||||||
|
alpn = None
|
||||||
|
|
||||||
self.server_conn.establish_ssl(
|
self.server_conn.establish_ssl(
|
||||||
self.config.clientcerts,
|
self.config.clientcerts,
|
||||||
|
Loading…
Reference in New Issue
Block a user