mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 10:16:27 +00:00
Log exceptions parsing TlsClientHello in TlsLayer
This commit is contained in:
parent
11b289d3c7
commit
17a32d921c
@ -360,10 +360,13 @@ class TlsLayer(Layer):
|
||||
"""
|
||||
Peek into the connection, read the initial client hello and parse it to obtain ALPN values.
|
||||
"""
|
||||
parsed = TlsClientHello.from_client_conn(self.client_conn)
|
||||
self.client_sni = parsed.client_sni
|
||||
self.client_alpn_protocols = parsed.client_alpn_protocols
|
||||
self.client_ciphers = parsed.client_cipher_suites
|
||||
try:
|
||||
parsed = TlsClientHello.from_client_conn(self.client_conn)
|
||||
self.client_sni = parsed.client_sni
|
||||
self.client_alpn_protocols = parsed.client_alpn_protocols
|
||||
self.client_ciphers = parsed.client_cipher_suites
|
||||
except TlsProtocolException as e:
|
||||
self.log("Cannot parse Client Hello: %s" % repr(e), "error")
|
||||
|
||||
def connect(self):
|
||||
if not self.server_conn:
|
||||
|
Loading…
Reference in New Issue
Block a user