'Sets up the host and the port for the HTTP CONNECT Tunnelling.
The headers argument should be a mapping of extra HTTP headers
to send with the CONNECT request.'

def set_tunnel(self, host, port=None, headers=None):

    self._tunnel_host = host
    self._tunnel_port = port
    if headers:
        self._tunnel_headers = headers
    else:
        self._tunnel_headers.clear()
