diff options
Diffstat (limited to 'libmproxy/proxy')
-rw-r--r-- | libmproxy/proxy/root_context.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libmproxy/proxy/root_context.py b/libmproxy/proxy/root_context.py index 48cb72a0..307d0c4b 100644 --- a/libmproxy/proxy/root_context.py +++ b/libmproxy/proxy/root_context.py @@ -8,7 +8,8 @@ from libmproxy.exceptions import ProtocolException from netlib.exceptions import TcpException from netlib.http import ALPN_PROTO_H2, ALPN_PROTO_HTTP1 from ..protocol import ( - RawTCPLayer, TlsLayer, Http1Layer, Http2Layer, is_tls_record_magic, ServerConnectionMixin + RawTCPLayer, TlsLayer, Http1Layer, Http2Layer, is_tls_record_magic, ServerConnectionMixin, + UpstreamConnectLayer ) from .modes import HttpProxy, HttpUpstreamProxy, ReverseProxy @@ -63,7 +64,7 @@ class RootContext(object): # in which case we need some form of TLS layer. if isinstance(top_layer, ReverseProxy): return TlsLayer(top_layer, client_tls, top_layer.server_tls) - if isinstance(top_layer, ServerConnectionMixin): + if isinstance(top_layer, ServerConnectionMixin) or isinstance(top_layer, UpstreamConnectLayer): return TlsLayer(top_layer, client_tls, client_tls) # 3. In Http Proxy mode and Upstream Proxy mode, the next layer is fixed. |