Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
pip._vendor.urllib3.poolmanager.ProxyManager Class Reference
Inheritance diagram for pip._vendor.urllib3.poolmanager.ProxyManager:
Inheritance graph
[legend]
Collaboration diagram for pip._vendor.urllib3.poolmanager.ProxyManager:
Collaboration graph
[legend]

Public Member Functions

 __init__ (self, proxy_url, num_pools=10, headers=None, proxy_headers=None, proxy_ssl_context=None, use_forwarding_for_https=False, **connection_pool_kw)
 
 connection_from_host (self, host, port=None, scheme="http", pool_kwargs=None)
 
 urlopen (self, method, url, redirect=True, **kw)
 
- Public Member Functions inherited from pip._vendor.urllib3.poolmanager.PoolManager
 __enter__ (self)
 
 __exit__ (self, exc_type, exc_val, exc_tb)
 
 clear (self)
 
 connection_from_context (self, request_context)
 
 connection_from_pool_key (self, pool_key, request_context=None)
 
 connection_from_url (self, url, pool_kwargs=None)
 
- Public Member Functions inherited from pip._vendor.urllib3.request.RequestMethods
 request (self, method, url, fields=None, headers=None, **urlopen_kw)
 
 request_encode_url (self, method, url, fields=None, headers=None, **urlopen_kw)
 
 request_encode_body (self, method, url, fields=None, headers=None, encode_multipart=True, multipart_boundary=None, **urlopen_kw)
 

Public Attributes

 proxy
 
 proxy_headers
 
 proxy_ssl_context
 
 proxy_config
 
- Public Attributes inherited from pip._vendor.urllib3.poolmanager.PoolManager
 connection_pool_kw
 
 pools
 
 pool_classes_by_scheme
 
 key_fn_by_scheme
 
- Public Attributes inherited from pip._vendor.urllib3.request.RequestMethods
 headers
 

Protected Member Functions

 _set_proxy_headers (self, url, headers=None)
 
- Protected Member Functions inherited from pip._vendor.urllib3.poolmanager.PoolManager
 _new_pool (self, scheme, host, port, request_context=None)
 
 _merge_pool_kwargs (self, override)
 
 _proxy_requires_url_absolute_form (self, parsed_url)
 
 _validate_proxy_scheme_url_selection (self, url_scheme)
 

Additional Inherited Members

- Static Public Attributes inherited from pip._vendor.urllib3.poolmanager.PoolManager
 proxy = None
 
 proxy_config = None
 
- Static Protected Attributes inherited from pip._vendor.urllib3.request.RequestMethods
dict _encode_url_methods = {"DELETE", "GET", "HEAD", "OPTIONS"}
 

Detailed Description

Behaves just like :class:`PoolManager`, but sends all requests through
the defined proxy, using the CONNECT method for HTTPS URLs.

:param proxy_url:
    The URL of the proxy to be used.

:param proxy_headers:
    A dictionary containing headers that will be sent to the proxy. In case
    of HTTP they are being sent with each request, while in the
    HTTPS/CONNECT case they are sent only once. Could be used for proxy
    authentication.

:param proxy_ssl_context:
    The proxy SSL context is used to establish the TLS connection to the
    proxy when using HTTPS proxies.

:param use_forwarding_for_https:
    (Defaults to False) If set to True will forward requests to the HTTPS
    proxy to be made on behalf of the client instead of creating a TLS
    tunnel via the CONNECT method. **Enabling this flag means that request
    and response headers and content will be visible from the HTTPS proxy**
    whereas tunneling keeps request and response headers and content
    private.  IP address, target hostname, SNI, and port are always visible
    to an HTTPS proxy even when this flag is disabled.

Example:
    >>> proxy = urllib3.ProxyManager('http://localhost:3128/')
    >>> r1 = proxy.request('GET', 'http://google.com/')
    >>> r2 = proxy.request('GET', 'http://httpbin.org/')
    >>> len(proxy.pools)
    1
    >>> r3 = proxy.request('GET', 'https://httpbin.org/')
    >>> r4 = proxy.request('GET', 'https://twitter.com/')
    >>> len(proxy.pools)
    3

Constructor & Destructor Documentation

◆ __init__()

pip._vendor.urllib3.poolmanager.ProxyManager.__init__ (   self,
  proxy_url,
  num_pools = 10,
  headers = None,
  proxy_headers = None,
  proxy_ssl_context = None,
  use_forwarding_for_https = False,
**  connection_pool_kw 
)

Member Function Documentation

◆ _set_proxy_headers()

pip._vendor.urllib3.poolmanager.ProxyManager._set_proxy_headers (   self,
  url,
  headers = None 
)
protected
Sets headers needed by proxies: specifically, the Accept and Host
headers. Only sets headers not provided by the user.

◆ connection_from_host()

pip._vendor.urllib3.poolmanager.ProxyManager.connection_from_host (   self,
  host,
  port = None,
  scheme = "http",
  pool_kwargs = None 
)
Get a :class:`urllib3.connectionpool.ConnectionPool` based on the host, port, and scheme.

If ``port`` isn't given, it will be derived from the ``scheme`` using
``urllib3.connectionpool.port_by_scheme``. If ``pool_kwargs`` is
provided, it is merged with the instance's ``connection_pool_kw``
variable and used to create the new connection pool, if one is
needed.

Reimplemented from pip._vendor.urllib3.poolmanager.PoolManager.

◆ urlopen()

pip._vendor.urllib3.poolmanager.ProxyManager.urlopen (   self,
  method,
  url,
  redirect = True,
**  kw 
)
Same as :meth:`urllib3.HTTPConnectionPool.urlopen`
with custom cross-host redirect logic and only sends the request-uri
portion of the ``url``.

The given ``url`` parameter must be absolute, such that an appropriate
:class:`urllib3.connectionpool.ConnectionPool` can be chosen for it.

Reimplemented from pip._vendor.urllib3.poolmanager.PoolManager.


The documentation for this class was generated from the following file: