mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 18:18:25 +00:00
Update server.py
We should ask for upstream cert only if there is: 1) no no_upstream_cert option specified 2) ssl connection to server is established
This commit is contained in:
parent
1dba379ae9
commit
ed91e19e0b
@ -226,7 +226,7 @@ class ConnectionHandler:
|
||||
else:
|
||||
host = self.server_conn.address.host
|
||||
sans = []
|
||||
if not self.config.no_upstream_cert or not self.server_conn.ssl_established:
|
||||
if not self.config.no_upstream_cert and self.server_conn.ssl_established:
|
||||
upstream_cert = self.server_conn.cert
|
||||
if upstream_cert.cn:
|
||||
host = upstream_cert.cn.decode("utf8").encode("idna")
|
||||
|
Loading…
Reference in New Issue
Block a user