mirror of
https://github.com/zhigang1992/mitmproxy.git
synced 2026-04-29 04:35:02 +08: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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user