mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 18:18:25 +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:
|
if flow.request.pretty_host in secure_hosts:
|
||||||
flow.request.scheme = 'https'
|
flow.request.scheme = 'https'
|
||||||
flow.request.port = 443
|
flow.request.port = 443
|
||||||
|
flow.request.host = flow.request.pretty_host
|
||||||
|
|
||||||
|
|
||||||
def response(flow):
|
def response(flow):
|
||||||
|
Loading…
Reference in New Issue
Block a user