o
    Ëý°jE  ã                   @   s0   d dl mZmZmZ 	ddd„Z	ddd„ZdS )é   )Úcreate_urllib3_contextÚresolve_cert_reqsÚresolve_ssl_versionNc                 C   s4   | du rdS |dkrdS | j dkr|r|jrdS dS )a?  
    Returns True if the connection requires an HTTP CONNECT through the proxy.

    :param URL proxy_url:
        URL of the proxy.
    :param ProxyConfig proxy_config:
        Proxy configuration from poolmanager.py
    :param str destination_scheme:
        The scheme of the destination. (i.e https, http, etc)
    NFÚhttpÚhttpsT)ÚschemeÚuse_forwarding_for_https)Ú	proxy_urlÚproxy_configÚdestination_scheme© r   ú‘/root/aizidognhua/tmp/workspace/projects/ec89d86c-575f-41c9-af57-ac45cbdbf775/venv/lib/python3.10/site-packages/pip/_vendor/urllib3/util/proxy.pyÚconnection_requires_http_tunnel   s   
ÿþr   c                 C   s6   t t| ƒt|ƒd�}|s|s|st|dƒr| ¡  |S )z\
    Generates a default proxy ssl context if one hasn't been provided by the
    user.
    )Ússl_versionÚ	cert_reqsÚload_default_certs)r   r   r   Úhasattrr   )r   r   Úca_certsÚca_cert_dirÚca_cert_dataÚssl_contextr   r   r   Úcreate_proxy_ssl_context%   s   þÿþýür   )NNN)Ússl_r   r   r   r   r   r   r   r   r   Ú<module>   s
    
ÿ"ÿ