From 00a1b57c9ad700126fa745866808c1e1281c02f8 Mon Sep 17 00:00:00 2001 From: luxion Date: Fri, 15 Mar 2019 17:44:01 +0900 Subject: [PATCH] Send connect request with Host header Send connect request with Host header because some http(s) proxies check the Host header to confirm whether a request is authorized or not. --- pdagent/thirdparty/httpswithverify.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pdagent/thirdparty/httpswithverify.py b/pdagent/thirdparty/httpswithverify.py index 702c6833..1470dae0 100644 --- a/pdagent/thirdparty/httpswithverify.py +++ b/pdagent/thirdparty/httpswithverify.py @@ -121,6 +121,7 @@ def connect(self): # proxy server. See: httplib.HTTPConnection._tunnel() end_host = self._tunnel_host self.sock = sock + self._tunnel_headers = { "Host": end_host } self._tunnel() # require server certificate to be provided, and pass along