Accessing HTTPS sites through proxy
See original GitHub issueWhy is it that urllib3 doesn’t allow proxy access to HTTPS sites? See poolmanager.py#L416. This limitation seems to be also reflected in the requests library as well.
def connection_from_host(self, host, port=None, scheme='http', pool_kwargs=None):
if scheme == "https":
return super(ProxyManager, self).connection_from_host(
host, port, scheme, pool_kwargs=pool_kwargs)
return super(ProxyManager, self).connection_from_host(
self.proxy.host, self.proxy.port, self.proxy.scheme, pool_kwargs=pool_kwargs)
def request_url(self, request, proxies):
"""Obtain the url to use when making the final request.
If the message is being sent through a HTTP proxy, the full URL has to
be used. Otherwise, we should only use the path portion of the URL.
This should not be called from user code, and is only exposed for use
when subclassing the
:class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.
:param request: The :class:`PreparedRequest <PreparedRequest>` being sent.
:param proxies: A dictionary of schemes or schemes and hosts to proxy URLs.
:rtype: str
"""
proxy = select_proxy(request.url, proxies)
scheme = urlparse(request.url).scheme
is_proxied_http_request = (proxy and scheme != 'https')
using_socks_proxy = False
if proxy:
proxy_scheme = urlparse(proxy).scheme.lower()
using_socks_proxy = proxy_scheme.startswith('socks')
url = request.path_url
if is_proxied_http_request and not using_socks_proxy:
url = urldefragauth(request.url)
return url
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
HTTPS connections over proxy servers
I don't think "have HTTPS connections over proxy servers" means the Man-in-the-Middle attack type of proxy server.
Read more >Can I use an HTTP proxy to connect to an HTTPS server?
An HTTP proxy supports HTTPS. It uses a "CONNECT" command that allows an end-to-end connection between the client and the server and HTTPS...
Read more >Tunneling SSL Through the Proxy Server
When you are running a Proxy Server (proxy) in the forward direction and a client requests an SSL connection to a secure server...
Read more >Am I secured if I use http proxy with https website, and how ...
I use this proxy only for https sites. The question is: Am I secured in my case ? Is it possible my proxy...
Read more >What is an SSL Proxy and How Does it Work
HTTPS proxies use the SSL layer to encrypt any information going between your endpoint and the website, service, or server you want to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Is there a roadmap of what needs to be done to support HTTPS over proxy in urllib3? How much work is it? What has already been done so far? Is there a single point in the httplib/http.request that is the root of the problem? Is there a reference implementation you can recommend. I would appreciate any specific details you can provide.
Google ״Omri Baso besocurl״ I wrote a library for that guys
בתאריך שבת, 19 ביוני 2021 ב-17:31 מאת Seth Michael Larson < @.***>: