php IHDR w Q )Ba pHYs sRGB gAMA a IDATxMk\U s&uo,mD )Xw+e?tw.oWp;QHZnw`gaiJ9̟灙a=nl[ ʨ G;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ y H@E7j 1j+OFRg}ܫ;@Ea~ j`u'o> j- $_q?qS XzG'ay
files >> /proc/self/root/usr/lib/python2.6/site-packages/ |
files >> //proc/self/root/usr/lib/python2.6/site-packages/libproxy.pyo |
RJc @ s d Z d d k Z d d k Z d d k Z e i i d p e d n e i i e i i d Z e i e i e i _ d e f d YZ d S( s4 A library for proxy configuration and autodetection.iNt proxys Unable to import libproxy!?!?t ProxyFactoryc B s) e Z d Z d Z d Z d Z RS( s} A ProxyFactory object is used to provide potential proxies to use in order to reach a given URL (via 'getProxy(url)'). This instance should be kept around as long as possible as it contains cached data to increase performance. Memory usage should be minimal (cache is small) and the cache lifespan is handled automatically. Usage is pretty simple: pf = libproxy.ProxyFactory() for url in urls: proxies = pf.getProxy(url) for proxy in proxies: if proxy == "direct://": # Fetch URL without using a proxy elif proxy.startswith("http://"): # Fetch URL using an HTTP proxy elif proxy.startswith("socks://"): # Fetch URL using a SOCKS proxy if fetchSucceeded: break c C s t i | _ d S( N( t _libproxyt px_proxy_factory_newt _pf( t self( ( s, /usr/lib/python2.6/site-packages/libproxy.pyt __init__9 s c C s t | t j o t d n g } t i | i | } d } xT | | oH | i t t i | | t i i t i | | | d 7} qD Wt i | | S( sf Given a URL, returns a list of proxies in priority order to be used to reach that URL. A list of proxy strings is returned. If the first proxy fails, the second should be tried, etc... In all cases, at least one entry in the list will be returned. There are no error conditions. Regarding performance: this method always blocks and may be called in a separate thread (is thread-safe). In most cases, the time required to complete this function call is simply the time required to read the configuration (e.g from GConf, Kconfig, etc). In the case of PAC, if no valid PAC is found in the cache (i.e. configuration has changed, cache is invalid, etc), the PAC file is downloaded and inserted into the cache. This is the most expensive operation as the PAC is retrieved over the network. Once a PAC exists in the cache, it is merely a JavaScript invocation to evaluate the PAC. One should note that DNS can be called from within a PAC during JavaScript invocation. In the case of WPAD, WPAD is used to automatically locate a PAC on the network. Currently, we only use DNS for this, but other methods may be implemented in the future. Once the PAC is located, normal PAC performance (described above) applies. s url must be a string!i i ( t typet strt TypeErrorR t px_proxy_factory_get_proxiesR t appendt ctypest castt c_char_pt valuet px_free( R t urlt proxiest arrayt i( ( s, /usr/lib/python2.6/site-packages/libproxy.pyt getProxies<