From 2d4a5fb116a175df0d464e9a501124a858731d99 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Fri, 18 Sep 2015 18:07:38 +0200 Subject: experimental: don't interfere with headers, fix #93 --- libmproxy/proxy/root_context.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libmproxy/proxy/root_context.py') 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. -- cgit v1.2.3