+
     h6  c                  s^   ^ RI Ht ^ RIt^ RIt^ RIt^RIHt ^RIHtH	t	 ^RI
HtHt ^RIHtHtHtHtHtHt ^RIHt ^RIHt ^R	IHt ^R
IHt ^RIHt ^RIHt ]P@                  ! R4      t!RRRRRRRR/t"RRRRRRRRRRRRRR R!R"R#R$/	t#R%R/R& R' llt$ ! R( R)]4      t% ! R* R+]4      t&R# ),    )annotationsN)AutoBackend)AsyncNetworkBackendAsyncNetworkStream)ConnectionNotAvailable
ProxyError)URLOriginRequestResponseenforce_bytesenforce_url)default_ssl_context)	AsyncLock)Trace)AsyncConnectionPool)AsyncHTTP11Connection)AsyncConnectionInterfacezhttpcore.sockss    zNO AUTHENTICATION REQUIREDs   ZGSSAPIs   zUSERNAME/PASSWORDs   zNO ACCEPTABLE METHODSZ	SucceededzGeneral SOCKS server failurez!Connection not allowed by rulesets   zNetwork unreachables   zHost unreachables   zConnection refuseds   zTTL expireds   zCommand not supporteds   zAddress type not supportedauthc          
     s,    V ^8  d   QhRRRRRRRRR	R
/# )   streamr   hostZbytesportintr   tuple[bytes, bytes] | NonereturnNone Zformat   "@/usr/lib/python3.14/site-packages/httpcore/_async/socks_proxy.py__annotate__r    *   sC     <K <K<K <K 	<K
 %<K 
<K    c               s  "   \         P                  P                  4       pVf%   \         P                  P                  P                  M#\         P                  P                  P
                  pVP                  \         P                  P                  V.4      4       VP                  4       pV P                  V4      G R j  xL
  V P                  RR7      G R j  xL
 pVP                  V4      pVP                  V8w  dI   \        P                  VR4      p	\        P                  VP                  R4      p
\        RV	 RV
 R24      hVP                  \         P                  P                  P
                  8X  d   Vw  rVP                  \         P                  P!                  W4      4       VP                  4       pV P                  V4      G R j  xL
  V P                  RR7      G R j  xL
 pVP                  V4      pVP"                  '       g   \        R4      hVP                  \         P                  P$                  P'                  \         P                  P(                  P*                  W34      4       VP                  4       pV P                  V4      G R j  xL
  V P                  RR7      G R j  xL
 pVP                  V4      pVP,                  \         P                  P.                  P0                  8w  d0   \2        P                  VP,                  R4      p\        R	V R24      hR #  ELs EL\ ELg ELP L L5i)
Ni   )Z	max_bytesZUNKNOWNz
Requested z from proxy server, but got Z.zInvalid username/passwordZUNKOWNz Proxy Server could not connect: )socksioZsocks5ZSOCKS5ConnectionZSOCKS5AuthMethodZNO_AUTH_REQUIREDZUSERNAME_PASSWORDZsendZSOCKS5AuthMethodsRequestZdata_to_sendZwriteZreadZreceive_dataZmethodAUTH_METHODSgetr   ZSOCKS5UsernamePasswordRequestZsuccessZSOCKS5CommandRequestZfrom_addressZSOCKS5CommandZCONNECT
reply_codeZSOCKS5ReplyCodeZ	SUCCEEDEDREPLY_CODES)r   r   r   r   ZconnZauth_methodZoutgoing_bytesZincoming_bytesZresponseZ	requestedZ	respondedusernamepasswordr%   s   &$$$          r   _init_socks5_connectionr)   *   s     >>**,D
 < 	''88^^,,>> 
 	IIgnn55{mDE&&(N
,,~
&&& ";;;66N  0H+% $$[)<	 $$X__i@	#?	{!L
 	
 '..99KKK "		'..>>xRS**,ll>***  &{{T{::$$^4899 	II++88NN((004,	

 &&(N
,,~
&&& ";;;66N  0Hgnn<<FFF __X%8%8(C
;J<qIJJ GS ' 7  	+ ; ' 7su   B>M L3ML6C7ML9M,L<-&MBML? M9M:A:M6M9M<M?MMc                  sB   a  ] tR t^itRtRR V 3R llltR R ltRtV ;t# )AsyncSOCKSProxyz:
A connection pool that sends requests via an HTTP proxy.
c               sD    V ^8  d   QhRRRRRRRRR	RR
RRRRRRRRRRR/# )r   	proxy_urlzURL | bytes | str
proxy_authz&tuple[bytes | str, bytes | str] | Nonessl_contextssl.SSLContext | Nonemax_connectionsz
int | Nonemax_keepalive_connectionskeepalive_expiryfloat | Nonehttp1boolhttp2retriesr   network_backendAsyncNetworkBackend | Noner   r   r   r   r   r   r    AsyncSOCKSProxy.__annotate__n   s     @$ @$$@$ ;@$ +	@$
 $@$ $.@$ '@$ @$ @$ @$ 4@$ 
@$r!   c                s   < \         SV `  VVVVVVV
V	R7       W0n        \        VRR7      V n        Ve*   Vw  r\        VRR7      p\        VRR7      pVV3V n        R# RV n        R# )aF  
A connection pool for making HTTP requests.

Parameters:
    proxy_url: The URL to use when connecting to the proxy server.
        For example `"http://127.0.0.1:8080/"`.
    ssl_context: An SSL context to use for verifying connections.
        If not specified, the default `httpcore.default_ssl_context()`
        will be used.
    max_connections: The maximum number of concurrent HTTP connections that
        the pool should allow. Any attempt to send a request on a pool that
        would exceed this amount will block until a connection is available.
    max_keepalive_connections: The maximum number of idle HTTP connections
        that will be maintained in the pool.
    keepalive_expiry: The duration in seconds that an idle HTTP connection
        may be maintained for before being expired from the pool.
    http1: A boolean indicating if HTTP/1.1 requests should be supported
        by the connection pool. Defaults to True.
    http2: A boolean indicating if HTTP/2 requests should be supported by
        the connection pool. Defaults to False.
    retries: The maximum number of retries when trying to establish
        a connection.
    local_address: Local address to connect from. Can also be used to
        connect using a particular address family. Using
        `local_address="0.0.0.0"` will connect using an `AF_INET` address
        (IPv4), while using `local_address="::"` will connect using an
        `AF_INET6` address (IPv6).
    uds: Path to a Unix Domain Socket to use instead of TCP sockets.
    network_backend: A backend instance to use for handling network I/O.
)r-   r/   r0   r1   r3   r5   r7   r6   r+   )ZnameNr,   )Zsuper__init___ssl_contextr   
_proxy_urlr   _proxy_auth)selfr+   r,   r-   r/   r0   r1   r3   r5   r6   r7   r'   r(   Zusername_bytesZpassword_bytes	__class__s   &&&&&&&&&&&    r   r:   ZAsyncSOCKSProxy.__init__n   s    V 	#+&?-+ 	 		
 (%ikB!!+H*8,GN*8,GN<D
  $Dr!   c                    V ^8  d   QhRRRR/# )r   originr   r   r   r   r   r   r   r    r9      s     

 

 

3K 

r!   c                	s    \        V P                  P                  VV P                  V P                  V P
                  V P                  V P                  V P                  R 7      # ))proxy_originremote_originr,   r-   r1   r3   r5   r7   )	AsyncSocks5Connectionr<   rA   r=   r;   _keepalive_expiry_http1_http2_network_backendr>   rA      &&r   create_connectionZ!AsyncSOCKSProxy.create_connection   sQ    $// ''))!33++++ 11	
 		
r!   )r=   r<   r;   )	NNi
   NNTFr    N)	__name__
__module____qualname____firstlineno__Z__doc__r:   rK   __static_attributes__Z__classcell__)r?   s   @r   r*   r*   i   s    @$ @$D

 

r!   r*   c                  s    ] tR t^tRR R lltR R ltR R ltR R	 ltR
 R ltR R lt	R R lt
R R ltR R ltR R ltRtR# )rD   Nc               s<    V ^8  d   QhRRRRRRRRRR	R
RRRRRRR/	# )r   rB   r   rC   r,   r   r-   r.   r1   r2   r3   r4   r5   r7   r8   r   r   r   r   r   r   r    "AsyncSocks5Connection.__annotate__   sd     % %% % /	%
 +% '% % % 4% 
%r!   c	                	s    Wn         W n        W0n        W@n        WPn        W`n        Wpn        Vf   \        4       MTV n        \        4       V n
        R V n        RV n        R # )NF)_proxy_origin_remote_originr=   r;   rE   rF   rG   r   rH   r   _connect_lock_connection_connect_failed)	r>   rB   rC   r,   r-   r1   r3   r5   r7   s	   &&&&&&&&&r   r:   ZAsyncSocks5Connection.__init__   s^     *+%'!1 -4KM/ 	 '[<@$r!   c               r@   )r   requestr	   r   r
   r   r   r   r   r    rQ      s"     SD SD' SDh SDr!   c           
     	s  "   VP                   P                  R / 4      pVP                   P                  RR4      pVP                  RR4      pV P                  ;_uu_4       GRj  xL
  V P                  Ef    RV P                  P
                  P                  R4      RV P                  P                  R V/p\        R\        W4      ;_uu_4       GRj  xL
 pV P                  P                  ! R/ VB G Rj  xL
 pWvn        RRR4      GRj  xL
  RXRV P                  P
                  P                  R4      RV P                  P                  R	V P                  /p\        R
\        W4      ;_uu_4       GRj  xL
 p\        R/ VB G Rj  xL
  Wvn        RRR4      GRj  xL
  V P                  P                   R8X  d   V P"                  f   \%        4       MV P"                  pV P&                  '       d   RR.MR.p	VP)                  V	4       RTRT;'       g&    V P                  P
                  P                  R4      R V/p\        R\        W4      ;_uu_4       GRj  xL
 pVP*                  ! R/ VB G Rj  xL
 pWvn        RRR4      GRj  xL
  VP-                  R4      p
V
RJ;'       d    V
P/                  4       R8H  pV'       g%   V P&                  '       d>   V P0                  '       g,   ^RIHp V! V P                  VV P6                  R7      V n        MR\9        V P                  VV P6                  R7      V n        M*V P                  P?                  4       '       g   \A        4       hRRR4      GRj  xL
  V P                  PC                  V4      G Rj  xL
 #  ELB EL EL EL  + GRj  xL 
 '       g   i     EL; i ELS ELC EL0  + GRj  xL 
 '       g   i     ELH; i EL ELy ELf  + GRj  xL 
 '       g   i     EL~; i  \:         d   pRT n        ThRp?ii ; i L  + GRj  xL 
 '       g   i     L; i L5i)timeoutsni_hostnameNZconnectr   Zasciir   connect_tcpr   r   Zsetup_socks5_connection   httpszhttp/1.1Zh2r-   Zserver_hostname	start_tls
ssl_object)AsyncHTTP2Connection)rA   r   r1   Tr   )"Z
extensionsr$   rT   rU   rR   r   Zdecoder   r   loggerrH   rZ   Zreturn_valuerS   r=   r)   schemer;   r   rG   Zset_alpn_protocolsr\   Zget_extra_infoZselected_alpn_protocolrF   r5   r^   rE   r   Z	ExceptionrV   is_availabler   handle_async_request)r>   rW   ZtimeoutsrY   rX   ZkwargsZtracer   r-   Zalpn_protocolsr]   Zhttp2_negotiatedr^   Zexcs   &&            r   rb   Z*AsyncSocks5Connection.handle_async_request   s    %%)))R8))--ndC,,y$/%%%%'H  2 2 7 7 > >w G 2 2 7 7!7F
  %]FGLLLPU'+'<'<'H'H'R6'R!R-3*  ML !& 3 3 8 8 ? ? H 3 3 8 8 0 0	F  %167     5????-3*	    **11X=  $008 01!%!2!2 $ 37+++Z.J< ' $66~F *;-| 0H 0H#2277>>wG%w	" $)fg#N#N#NRW+1+;+;+Ef+E%EF17. $O#N
 "(!6!6|!DJ"$. H H&==?4G % (DKKK?+?#'#6#6#)-1-C-C,( ,A#'#6#6#)-1-C-C,( %%2244,..Y &%\ %%::7CCC] &  M!R  MLLL  @       0 $O%E $O#N#N#N8 ! +/D(IQ &%%%\ Ds  A#Q%N'&Q)P::APN*P N3	:N-;
N3	PN0A,P=O>PO	O
O	P&O'AP<#P AP&O6'P*O?	 O9
O?	PO<P7PP%P7*P!P:"'P	 P:*
P:4Q?P8 "Q"Q#Q*P-N3	0P3O9N<:
OO
PO	PO3O" 
O3+O3-
P9O?	<P?PP
PP	PP5'	P00P55P:8Q:Q	 Q
Q	Q		Qc               r@   )r   rA   r   r   r4   r   r   r   r   r    rQ   -  s     - - -D -r!   c                	s    WP                   8H  # N)rS   rI   rJ   r   can_handle_requestZ(AsyncSocks5Connection.can_handle_request-  s    ,,,,r!   c                   V ^8  d   QhRR/# )r   r   r   r   r   r   r   r    rQ   0  s     , ,d ,r!   c                	sv   "   V P                   e%   V P                   P                  4       G R j  xL
  R # R #  L5irc   )rU   acloser>      &r   rf   ZAsyncSocks5Connection.aclose0  s1     '""))+++ (+s   ,97	9c               re   r   r   r4   r   r   r   r   r    rQ   4  s     
/ 
/d 
/r!   c                	s   V P                   f`   V P                  ;'       dL    V P                  P                  R8H  ;'       g    V P                  '       * ;'       d    V P
                  '       * # V P                   P                  4       # )Nr[   )rU   rG   rS   r`   rF   rV   ra   rg   rh   r   ra   Z"AsyncSocks5Connection.is_available4  su    #
  - -((//8;NN4;;- -,,,
 ,,..r!   c               re   ri   r   r   r   r   r    rQ   @  s     . .T .r!   c                	j    V P                   f   V P                  # V P                   P                  4       # rc   )rU   rV   has_expiredrg   rh   r   rk   Z!AsyncSocks5Connection.has_expired@  s/    #'''++--r!   c               re   ri   r   r   r   r   r    rQ   E  s     * * *r!   c                	rj   rc   )rU   rV   is_idlerg   rh   r   rl   ZAsyncSocks5Connection.is_idleE  s/    #'''''))r!   c               re   ri   r   r   r   r   r    rQ   J  s     , ,4 ,r!   c                	rj   rc   )rU   rV   	is_closedrg   rh   r   rm   ZAsyncSocks5Connection.is_closedJ  s/    #'''))++r!   c               re   r   r   Zstrr   r   r   r   r    rQ   O  s     ' 'c 'r!   c                	s~    V P                   f   V P                  '       d   R# R# V P                   P                  4       # )NzCONNECTION FAILEDZ
CONNECTING)rU   rV   inforg   rh   r   ro   ZAsyncSocks5Connection.infoO  s:    #*.*>*>*>&PLP$$&&r!   c               re   rn   r   r   r   r   r    rQ   T  s     > ># >r!   c                	sX    R V P                   P                   RV P                  4        R2# )Z<z [z]>)r?   rL   ro   rg   rh   r   __repr__ZAsyncSocks5Connection.__repr__T  s(    4>>**+2diik]"==r!   )rV   rT   rU   rF   rG   rE   rH   r=   rR   rS   r;   )NNNTFN)rL   rM   rN   rO   r:   rb   rd   rf   ra   rk   rl   rm   ro   rp   rP   r   r!   r   rD   rD      s<    %4SDj-,
/.
*
,
'
> >r!   rD   )'Z
__future__r   ZloggingZsslr"   Z_backends.autor   Z_backends.baser   r   Z_exceptionsr   r   Z_modelsr   r   r	   r
   r   r   Z_sslr   Z_synchronizationr   Z_tracer   Zconnection_poolr   Zhttp11r   Z
interfacesr   Z	getLoggerr_   r#   r&   r)   r*   rD   r   r!   r   <module>rq      s    "  
  ( D < P P & (  0 ) 0			+	, )X $	 [+0"!]$)
<K
 (,<K~Q
) Q
hX>4 X>r!   