mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 00:01:36 +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
|
||||
# and mitmproxy would enter TCP passthrough mode, which we want to avoid.
|
||||
deprecated_http2_variant = lambda x: x.startswith("h2-") or x.startswith("spdy")
|
||||
alpn = filter(lambda x: not deprecated_http2_variant(x), self.client_alpn_protocols)
|
||||
if 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.config.clientcerts,
|
||||
|
Loading…
Reference in New Issue
Block a user