Unable to connect to HTTPS proxy 

Unable to connect to HTTPS proxy using requests lib. The request works fine when using curl. Does requests support proxy with https?

## Expected Result

Able to connect to proxy regardless of the scheme used.

## Actual Result

Unable to connect to proxy with requests lib with HTTPS.

## Reproduction Steps
When using requests **2.20.0** and urllib3 **1.24.2**, The following traceback is seen:

```>>> import requests; requests.get('https://xxxx:13000', auth=('xx', 'yy'),proxies={'https': "https://x.x.x.x:3130"})
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 594, in urlopen
    self._prepare_proxy(conn)
  File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 805, in _prepare_proxy
    conn.connect()
  File "/usr/lib/python3.6/site-packages/urllib3/connection.py", line 322, in connect
    self._tunnel()
  File "/usr/lib64/python3.6/http/client.py", line 928, in _tunnel
    (version, code, message) = response._read_status()
  File "/usr/lib64/python3.6/http/client.py", line 272, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/usr/lib64/python3.6/socket.py", line 586, in readinto
    return self._sock.recv_into(b)
ConnectionResetError: [Errno 104] Connection reset by peer

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 638, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/usr/lib/python3.6/site-packages/urllib3/util/retry.py", line 399, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='xxxx', port=13000): Max retries exceeded with url: / (Caused by ProxyError('Cannot connect to proxy.', ConnectionResetError(104, 'Connection reset by peer')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.6/site-packages/requests/api.py", line 75, in get
    return request('get', url, params=params, **kwargs)
  File "/usr/lib/python3.6/site-packages/requests/api.py", line 60, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3.6/site-packages/requests/adapters.py", line 510, in send
    raise ProxyError(e, request=request)
requests.exceptions.ProxyError: HTTPSConnectionPool(host='xxxx', port=13000): Max retries exceeded with url: / (Caused by ProxyError('Cannot connect to proxy.', ConnectionResetError(104, 'Connection reset by peer')))
```

When using the requests with **2.26.0** and urllib3 **1.26.6** I get the following:

`>>> import requests; requests.get('https://xxxx:13000', auth=('xx', 'yy'),proxies={'https': "https://x.x.x.x:3130"})
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.6/site-packages/requests/api.py", line 75, in get
    return request('get', url, params=params, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/requests/api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 696, in urlopen
    self._prepare_proxy(conn)
  File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 964, in _prepare_proxy
    conn.connect()
  File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 359, in connect
    conn = self._connect_tls_proxy(hostname, conn)
  File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 506, in _connect_tls_proxy
    ssl_context=ssl_context,
  File "/usr/local/lib/python3.6/site-packages/urllib3/util/ssl_.py", line 453, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls)
  File "/usr/local/lib/python3.6/site-packages/urllib3/util/ssl_.py", line 495, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock)
  File "/usr/lib64/python3.6/ssl.py", line 365, in wrap_socket
    _context=self, _session=session)
  File "/usr/lib64/python3.6/ssl.py", line 732, in __init__
    raise ValueError("check_hostname requires server_hostname")
ValueError: check_hostname requires server_hostname`

With this same version after changing the request I still get:

`>>> import requests; requests.get(https://xxxx:13000', auth=('xx', 'yy'),proxies={'https': "x.x.x.x:3130"})
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.6/site-packages/requests/api.py", line 75, in get
    return request('get', url, params=params, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/requests/api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/requests/adapters.py", line 510, in send
    raise ProxyError(e, request=request)
requests.exceptions.ProxyError: HTTPSConnectionPool(host='xxxx, port=13000): Max retries exceeded with url: / (Caused by ProxyError('Cannot connect to proxy.', ConnectionResetError(104, 'Connection reset by peer')))`

The following curl command works fine:
`
curl -U xx:yy -x https://x.x.x.x:3130 https://xxxx:13000`

The Proxy is configured with:
```
acl localnet src all
acl Safe_ports port 80
acl Safe_ports port 443
acl Safe_ports port 1025-65535
http_port 3128
https_port 3130 cert=/etc/squid/certs/squid-ca-cert-key.pem
coredump_dir /var/spool/squid
auth_param basic program /usr/lib64/squid/basic_ncsa_auth /etc/squid/htpasswd
auth_param basic children 5
auth_param basic realm Squid Basic Authentication
auth_param basic credentialsttl 2 hours
acl auth_users proxy_auth REQUIRED
http_access deny !auth_users
http_access deny !Safe_ports
http_access allow localnet
http_access deny all
```

Requests and urllib3 didn't support HTTPS proxies before urllib3 v1.26+, your example above was connecting to the [proxy via HTTP instead of HTTPS](https://github.com/urllib3/urllib3/issues/1850). So now when you install urllib3 v1.26+ it's actually trying to connect to the proxy via HTTPS but two things:

- I'm not sure Requests explicitly supports HTTPS proxies yet? Might just work / barely work on chance (@nateprewitt can you confirm?)
- If you try connecting to the proxy only via urllib3 and it doesn't work I'd love if you could [open an issue on urllib3](https://github.com/urllib3/urllib3/issues). If you could also try installing the latest dev version of urllib3 via `$ python -m pip install git+https://github.com/urllib3/urllib3@1.26.x` that'd be extra helpful.

@sethmlarson Thank you for the reply.

You're right, with 1.26.x it worked fine:
```
from urllib3 import ProxyManager, make_headers
default_headers = make_headers(proxy_basic_auth='xx:yy')
http = ProxyManager("https://xxxx:3130", proxy_headers=default_headers)
http.request('GET', 'https://x.x.x.x:13000/v3').status
200
```

Maybe this [commit](https://github.com/urllib3/urllib3/commit/906d982ab079ecf7c541e6fd8beb17c84bcc02c1) helped with the issue. Do you know when it will be available?

@MaysaMacedo Awesome, thanks for testing this. That appears to be the case, we're working on one more blocker for a 1.26.7 release but once that lands hopefully we'll be able to make a release afterwards. No exact timelines though, all volunteer time :)

Closing this as it's not an issue in the Requests library.

@sethmlarson Thank you.