
    ڈi	              	           d dl Z d dlZd dlmZmZ d dlmZ 	 	 	 d
ej                  ddddddddZ	 	 	 	 dej                  dddddddd	Z	y)    N)	ProxyTypeparse_proxy_url)Proxyz	127.0.0.1i8  T)
proxy_type
proxy_host
proxy_portusernamepasswordrdnsloopc          	      h  K   t        j                  dt        d       ||t        d      |	t	        j
                         }	| t        |       \  }}}}}t        j                  |||||||	      }|j                  ||       d {   }t	        j                  dd d |d|
 d {   S 7 %7 w)Nz^open_connection is deprecated. Use https://github.com/romis2012/python-socks directly instead.   
stacklevelhost and port must be specifiedr   hostportr	   r
   r   r   )r   r   sock )warningswarnDeprecationWarning
ValueErrorasyncioget_event_loopr   r   createconnectopen_connection)	proxy_urlr   r   r   r   r   r	   r
   r   r   kwargsproxyr   s                U/var/www/html/bot/test_files/venv/lib/python3.12/site-packages/aiohttp_socks/utils.pyr   r      s      MM	J	 |t|:;;|%%'APQZA[>
J
HhLLE tT**D ((SdDSFSSS + Ts$   BB2B.	 B2)B0*B20B2c          	      ~  K   t        j                  dt        d       |t        d      ||t        d      |
t	        j
                         }
| t        |       \  }}}}}t        j                  ||||||	|
      }|j                  ||       d {   } |
j                  d|d d |d| d {   S 7 #7 w)	Nz`create_connection is deprecated. Use https://github.com/romis2012/python-socks directly instead.r   r   z"protocol_factory must be specifiedr   r   )protocol_factoryr   r   r   r   )r   r   r   r   r   r   r   r   r   r   create_connection)r    r%   r   r   r   r   r   r	   r
   r   r   r!   r"   r   s                 r#   r&   r&   6   s      MM	J	 =>>|t|:;;|%%'APQZA[>
J
HhLLE tT**D''' )4dNT   +s$   BB=B9B=4B;5B=;B=)NNN)NNNN)
r   r   python_socksr   r   python_socks.async_.asyncior   SOCKS5r   r&   r       r#   <module>r+      s{      3 - 		+T
 		+T^ 			0 		0r*   