Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
3 ÝPf3ã@s(dZddlmZy ddlZWn6ek rRddlZddlmZejdeƒ‚YnXddl m Z m Z ddlmZmZdd lmZmZdd lmZmZdd lmZdd lmZy ddlZWnek rÐdZYnXGd d„deƒZGdd„deeƒZGdd„deƒZGdd„deƒZGdd„deƒZdS)aí This module contains provisional support for SOCKS proxies from within urllib3. This module supports SOCKS4 (specifically the SOCKS4A variant) 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: - SOCKS4 - SOCKS4a - SOCKS5 - Usernames and passwords for the SOCKS proxy Known Limitations: - Currently PySocks does not support contacting remote websites via literal IPv6 addresses. Any such connection attempt will fail. You must use a domain name. - Currently PySocks does not support IPv6 connections to the SOCKS proxy. Any such connection attempt will fail. é)Úabsolute_importNé)ÚDependencyWarningzÂSOCKS support in urllib3 requires the installation of optional dependencies: specifically, PySocks. For more information, see https://urllib3.readthedocs.io/en/latest/contrib.html#socks-proxies)ÚerrorÚtimeout)ÚHTTPConnectionÚHTTPSConnection)ÚHTTPConnectionPoolÚHTTPSConnectionPool)ÚConnectTimeoutErrorÚNewConnectionError)Ú PoolManager)Ú parse_urlcs(eZdZdZ‡fdd„Zdd„Z‡ZS)ÚSOCKSConnectionzG A plain-text HTTP connection that connects via a SOCKS proxy. cs"|jdƒ|_tt|ƒj||ŽdS)NÚ_socks_options)ÚpoprÚsuperrÚ__init__)ÚselfÚargsÚkwargs)Ú __class__©ú/usr/lib/python3.6/socks.pyr?s zSOCKSConnection.__init__cCsXi}|jr|j|d<|jr$|j|d<yTtj|j|jff|jd|jd|jd|jd|jd|jd|jd œ|—Ž}WnÚtk r°}zt |d |j|jfƒ‚WYd d }~Xn¤tj k �r"}zT|j �r|j }t |tƒrôt |d |j|jfƒ‚nt |d |ƒ‚nt |d |ƒ‚WYd d }~Xn2tk �rR}zt |d |ƒ‚WYd d }~XnX|S) zA Establish a new connection via the SOCKS proxy. Úsource_addressÚsocket_optionsÚ socks_versionÚ proxy_hostÚ proxy_portÚusernameÚpasswordÚrdns)Z proxy_typeZ proxy_addrrZproxy_usernameZproxy_passwordZ proxy_rdnsrz0Connection to %s timed out. (connect timeout=%s)Nz(Failed to establish a new connection: %s)rrÚsocksZcreate_connectionÚhostÚportrrÚ SocketTimeoutr Z ProxyErrorZ socket_errÚ isinstancer Ú SocketError)rZextra_kwZconnÚerrrrÚ _new_connCsL       zSOCKSConnection._new_conn)Ú__name__Ú __module__Ú __qualname__Ú__doc__rr)Ú __classcell__rr)rrr;s rc@s eZdZdS)ÚSOCKSHTTPSConnectionN)r*r+r,rrrrr/�sr/c@seZdZeZdS)ÚSOCKSHTTPConnectionPoolN)r*r+r,rÚ ConnectionClsrrrrr0…sr0c@seZdZeZdS)ÚSOCKSHTTPSConnectionPoolN)r*r+r,r/r1rrrrr2‰sr2cs,eZdZdZeedœZd‡fdd„ Z‡ZS)ÚSOCKSProxyManagerzh A version of the urllib3 ProxyManager that routes connections via the defined SOCKS proxy. )ZhttpZhttpsNé c  s²t|ƒ}|jdkrtj}d} nN|jdkr4tj}d} n8|jdkrJtj}d} n"|jdkr`tj}d} n td|ƒ‚||_||j|j||| dœ} | |d <t t |ƒj ||f|Žt j |_ dS) NZsocks5FZsocks5hTZsocks4Zsocks4az)Unable to determine SOCKS version from %s)rrrrr r!r) rÚschemer"ZPROXY_TYPE_SOCKS5ZPROXY_TYPE_SOCKS4Ú ValueErrorÚ proxy_urlr#r$rr3rÚpool_classes_by_scheme) rr7rr Z num_poolsZheadersZconnection_pool_kwZparsedrr!Z socks_options)rrrr—s4       zSOCKSProxyManager.__init__)NNr4N) r*r+r,r-r0r2r8rr.rr)rrr3�s r3) r-Z __future__rr"Ú ImportErrorÚwarningsÚ exceptionsrÚwarnZsocketrr'rr%Z connectionrrZconnectionpoolr r r r Z poolmanagerr Zutil.urlrZsslrr/r0r2r3rrrrÚs2       F