mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-22 15:37:45 +00:00
fix SNI for transparent mode - #1638
In transparent mode host is set with the target server ip. Attribute flow.request.host is used as SNI while mitmproxy is initiating TLS handshake, so it should be set with the pretty_host.
This commit is contained in:
parent
184e29e119
commit
dc44465c92
@ -16,6 +16,7 @@ def request(flow):
|
||||
if flow.request.pretty_host in secure_hosts:
|
||||
flow.request.scheme = 'https'
|
||||
flow.request.port = 443
|
||||
flow.request.host = flow.request.pretty_host
|
||||
|
||||
|
||||
def response(flow):
|
||||
|
Loading…
Reference in New Issue
Block a user