mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 10:16:27 +00:00
added sni and ssl_established=true in ServerConnection. removed check for None value of server_conn in http.py
This commit is contained in:
parent
71a58289e2
commit
010b921a93
@ -777,7 +777,9 @@ class FlowMaster(controller.Master):
|
|||||||
address=dict(address=(host, port), use_ipv6=False),
|
address=dict(address=(host, port), use_ipv6=False),
|
||||||
state=[],
|
state=[],
|
||||||
source_address=None, #source_address=dict(address=(host, port), use_ipv6=False),
|
source_address=None, #source_address=dict(address=(host, port), use_ipv6=False),
|
||||||
cert=None
|
cert=None,
|
||||||
|
sni=host,
|
||||||
|
ssl_established=True
|
||||||
))
|
))
|
||||||
f = http.HTTPFlow(c,s);
|
f = http.HTTPFlow(c,s);
|
||||||
headers = ODictCaseless()
|
headers = ODictCaseless()
|
||||||
|
@ -1457,10 +1457,7 @@ class RequestReplayThread(threading.Thread):
|
|||||||
server = ServerConnection(server_address)
|
server = ServerConnection(server_address)
|
||||||
server.connect()
|
server.connect()
|
||||||
if r.scheme == "https":
|
if r.scheme == "https":
|
||||||
sni = None
|
server.establish_ssl(self.config.clientcerts, sni=self.flow.server_conn.sni)
|
||||||
if self.flow.server_conn:
|
|
||||||
sni = self.flow.server_conn.sni
|
|
||||||
server.establish_ssl(self.config.clientcerts, sni=sni)
|
|
||||||
r.form_out = "relative"
|
r.form_out = "relative"
|
||||||
server.send(r.assemble())
|
server.send(r.assemble())
|
||||||
self.flow.server_conn = server
|
self.flow.server_conn = server
|
||||||
|
Loading…
Reference in New Issue
Block a user