mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-30 03:14:22 +00:00
Merge pull request #2473 from mengbiping/postpone-connection
Respect response to CONNECT created in http_connect function in upstream mode
This commit is contained in:
commit
874d0aa253
@ -217,6 +217,9 @@ class HttpLayer(base.Layer):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
def handle_upstream_connect(self, f):
|
def handle_upstream_connect(self, f):
|
||||||
|
# if the user specifies a response in the http_connect hook, we do not connect upstream here.
|
||||||
|
# https://github.com/mitmproxy/mitmproxy/pull/2473
|
||||||
|
if not f.response:
|
||||||
self.establish_server_connection(
|
self.establish_server_connection(
|
||||||
f.request.host,
|
f.request.host,
|
||||||
f.request.port,
|
f.request.port,
|
||||||
|
Loading…
Reference in New Issue
Block a user