1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Ë
ê^i{ãó†—dZddlmZ    ddlZddl    Z    ddl
m Z ddl mZmZdd    lmZmZdd
lmZmZdd lmZdd lmZ    ddlZGd „de    j4«ZGd„de«ZGd„dee«ZGd„de«ZGd„de«ZGd„de«Z y#e$rddlZddlmZejde«‚wxYw#e$rdZYŒ~wxYw)a‰
This module contains provisional support for SOCKS proxies from within
urllib3. This module supports SOCKS4, SOCKS4A (an extension of SOCKS4), and
SOCKS5. To enable its functionality, either install PySocks or install this
module with the ``socks`` extra.
 
The SOCKS implementation supports the full range of urllib3 features. It also
supports the following SOCKS features:
 
- SOCKS4A (``proxy_url='socks4a://...``)
- SOCKS4 (``proxy_url='socks4://...``)
- SOCKS5 with remote DNS (``proxy_url='socks5h://...``)
- SOCKS5 with local DNS (``proxy_url='socks5://...``)
- Usernames and passwords for the SOCKS proxy
 
.. note::
   It is recommended to use ``socks5h://`` or ``socks4a://`` schemes in
   your ``proxy_url`` to ensure that DNS resolution is done from the remote
   server instead of client-side when connecting to a domain name.
 
SOCKS4 supports IPv4 and domain names with the SOCKS4A extension. SOCKS5
supports IPv4, IPv6, and domain names.
 
When connecting to a SOCKS4 proxy the ``username`` portion of the ``proxy_url``
will be sent as the ``userid`` section of the SOCKS request:
 
.. code-block:: python
 
    proxy_url="socks4a://<userid>@proxy-host"
 
When connecting to a SOCKS5 proxy the ``username`` and ``password`` portion
of the ``proxy_url`` will be sent as the username/password to authenticate
with the proxy:
 
.. code-block:: python
 
    proxy_url="socks5h://<username>:<password>@proxy-host"
 
é)Ú annotationsNé)ÚDependencyWarningzÉSOCKS support in urllib3 requires the installation of optional dependencies: specifically, PySocks.  For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#socks-proxies)Útimeout)ÚHTTPConnectionÚHTTPSConnection)ÚHTTPConnectionPoolÚHTTPSConnectionPool)ÚConnectTimeoutErrorÚNewConnectionError)Ú PoolManager)Ú    parse_urlcóJ—eZdZUded<ded<ded<ded<ded<ded    <y
) Ú_TYPE_SOCKS_OPTIONSÚintÚ socks_versionú
str | NoneÚ
proxy_hostÚ
proxy_portÚusernameÚpasswordÚboolÚrdnsN)Ú__name__Ú
__module__Ú __qualname__Ú__annotations__©óõhH:\项目\archive\测试组\脚本\Change_password\venv_build\Lib\site-packages\urllib3/contrib/socks.pyrrKs%…ØÓØÓØÓØÓØÓØ
„Jrrcó<‡—eZdZdZ                                dˆfd„ Zdd„ZˆxZS)ÚSOCKSConnectionzG
    A plain-text HTTP connection that connects via a SOCKS proxy.
    có2•—||_t‰||i|¤Žy)N)Ú_socks_optionsÚsuperÚ__init__)Úselfr$ÚargsÚkwargsÚ    __class__s    €r r&zSOCKSConnection.__init__Ysø€ð -ˆÔÜ ‰Ñ˜$Ð) &Ó)rc óD—i}|jr|j|d<|jr|j|d<    tj|j|j
ff|j d|j d|j d|j d|j d|j d|jd    œ|¤Ž}|S#t$r-}t|d
|j›d |j›d «|‚d }~wtj$rt}|jrS|j}t|t«r(t|d
|j›d |j›d «|‚t|d|›«‚t|d|›«|‚d }~wt$r}t|d|›«|‚d }~wwxYw)zA
        Establish a new connection via the SOCKS proxy.
        Úsource_addressÚsocket_optionsrrrrrr)Ú
proxy_typeÚ
proxy_addrrÚproxy_usernameÚproxy_passwordÚ
proxy_rdnsrzConnection to z timed out. (connect timeout=ú)Nz&Failed to establish a new connection: )r,r-ÚsocksÚcreate_connectionÚhostÚportr$rÚ SocketTimeoutr Ú
ProxyErrorÚ
socket_errÚ
isinstancer ÚOSError)r'Úextra_kwÚconnÚeÚerrors     r Ú    _new_connzSOCKSConnection._new_connbsÝ€ð+-ˆØ × Ò Ø)-×)<Ñ)<ˆHÐ%Ñ &à × Ò Ø)-×)<Ñ)<ˆHÐ%Ñ &ð+    Ü×*Ñ*Ø—‘˜DŸI™IÐ&ð
à×.Ñ.¨Ñ?Ø×.Ñ.¨|Ñ<Ø×.Ñ.¨|Ñ<Ø#×2Ñ2°:Ñ>Ø#×2Ñ2°:Ñ>Ø×.Ñ.¨vÑ6ØŸ ™ ñ
ðñ
ˆDðXˆ øôAò    Ü%ØØ  §¡  Ð+HÈÏÉÈÐVWÐXóðð ûô
×Ñò    ð|Š|ØŸ ™ Ü˜e¤]Ô3Ü-ØØ(¨¯©¨ Ð3PÐQU×Q]ÑQ]ÐP^Ð^_Ð`óððô-ØРFÀuÀgÐNóðô)ØÐBÀ1À#ÐFóàðûôò    Ü$ØÐ>¸q¸cÐBóàð ûð    ús1ºB Cà   FÃ(C9Ã9FÄA/E>Å> FÆ
FÆF)r$rr(ú
typing.Anyr)rBÚreturnÚNone)rCzsocks.socksocket)rrrÚ__doc__r&rAÚ __classcell__©r*s@r r"r"Ts8ø„ñð*à+ð*ðð*ðð    *ð
 
õ *÷8rr"có —eZdZy)ÚSOCKSHTTPSConnectionN)rrrrrr rIrI¡s„ØrrIcó—eZdZeZy)ÚSOCKSHTTPConnectionPoolN)rrrr"Ú ConnectionClsrrr rKrK¥s„Ø#MrrKcó—eZdZeZy)ÚSOCKSHTTPSConnectionPoolN)rrrrIrLrrr rNrN©s„Ø(MrrNcóN‡—eZdZdZeedœZ                d                                            dˆfd„ ZˆxZS)ÚSOCKSProxyManagerzh
    A version of the urllib3 ProxyManager that routes connections via the
    defined SOCKS proxy.
    )ÚhttpÚhttpsc ób•—t|«}|€<|€:|j.|jjd«}t|«dk(r|\}}|jdk(rt
j }    d}
nt|jdk(rt
j }    d}
nR|jdk(rt
j}    d}
n0|jdk(rt
j}    d}
ntd    |›«‚||_    |    |j|j|||
d
œ} | |d <t‰ |4||fi|¤Žtj|_y) Nú:rÚsocks5FÚsocks5hTÚsocks4Úsocks4az'Unable to determine SOCKS version from )rrrrrrr$)rÚauthÚsplitÚlenÚschemer4ÚPROXY_TYPE_SOCKS5ÚPROXY_TYPE_SOCKS4Ú
ValueErrorÚ    proxy_urlr6r7r%r&rPÚpool_classes_by_scheme) r'r`rrÚ    num_poolsÚheadersÚconnection_pool_kwÚparsedrZrrÚ socks_optionsr*s             €r r&zSOCKSProxyManager.__init__¸s*ø€ô˜9Ó%ˆà Ð  Р0°V·[±[Ð5LØ—K‘K×%Ñ% cÓ*ˆEܐ5‹z˜QŠØ%*Ñ"˜(Ø =‰=˜HÒ $Ü!×3Ñ3ˆM؉DØ ]‰]˜iÒ 'Ü!×3Ñ3ˆM؉DØ ]‰]˜hÒ &Ü!×3Ñ3ˆM؉DØ ]‰]˜iÒ 'Ü!×3Ñ3ˆM؉DäÐFÀyÀkÐRÓSÐ Sà"ˆŒð+Ø Ÿ+™+Ø Ÿ+™+ؠؠØñ 
ˆ ð0=ÐÐ+Ñ,ä ‰Ñ˜ GÑBÐ/AÒBä&7×&NÑ&NˆÕ#r)NNé
N) r`Ústrrrrrrbrrcztyping.Mapping[str, str] | NonerdrB)    rrrrErKrNrar&rFrGs@r rPrP­srø„ñð (Ø)ñÐð $Ø#ØØ37ð ,Oàð,Oðð,Oðð    ,Oð
ð ,Oð 1ð ,Oð)÷,Oñ,OrrP)!rEÚ
__future__rr4Ú ImportErrorÚwarningsÚ
exceptionsrÚwarnÚtypingÚsocketrr8Ú
connectionrrÚconnectionpoolr    r
r r Ú poolmanagerr Úutil.urlrÚsslÚ    TypedDictrr"rIrKrNrPrrr ú<module>rvsÙðñ&õP#ð
Ûó Ý+ç8ßDß@Ý%Ý ðÛô
˜&×*Ñ*ôôFnôFôZ    ˜?¨Oô    ô$Ð0ô$ô)Ð2ô)ô7O˜ õ7OøðAò 
Ûå.à€H‡MMð Yð    ô ð
ð 
ûð4òØ
‚CðúsŠB½B6Â$B3Â6CÂ?C