
    i                     4    d dl mZ d dlZ G d d          ZdS )    )IterableNc                   "    e Zd ZdefdZddZdS )
ProxyChainproxiesc                 L    t          j        dt          d           || _        d S )NzQThis implementation of ProxyChain is deprecated and will be removed in the future   )
stacklevel)warningswarnDeprecationWarning_proxies)selfr   s     a/usr/local/lib/hermes-agent/venv/lib/python3.11/site-packages/python_socks/async_/_proxy_chain.py__init__zProxyChain.__init__   s1    _	
 	
 	
 	

      Nc                 J  K   d }t          | j                  }t          |          dz
  }t          |          D ]C}||                             ||dz            j        ||dz            j        ||           d {V }D||                             ||||           d {V }|S )N   )	dest_host	dest_porttimeout_socket)listr   lenrangeconnect
proxy_host
proxy_port)r   r   r   r   curr_socketr   lengthis           r   r   zProxyChain.connect   s      t}%%W!v 	 	A '
 2 2!!a%.3!!a%.3#	 !3 ! !      KK $FO33	 4 
 
 
 
 
 
 
 
 r   )N)__name__
__module____qualname__r   r   r    r   r   r   r      sC                      r   r   )typingr   r
   r   r$   r   r   <module>r&      sR                   r   