Proxy Utilities¶
The darc.proxy module provides various proxy support
to the darc project.
- Bitcoin Addresses
save_bitcoin()darc.proxy.bitcoin.PATHdarc.proxy.bitcoin.LOCK- Data URI Schemes
save_data()darc.proxy.data.PATH- ED2K Magnet Links
save_ed2k()darc.proxy.ed2k.PATHdarc.proxy.ed2k.LOCK- Ethereum Addresses
save_ethereum()darc.proxy.ethereum.PATHdarc.proxy.ethereum.LOCK- Freenet Proxy
_freenet_bootstrap()freenet_bootstrap()launch_freenet()darc.proxy.freenet.FREENET_PORTdarc.proxy.freenet.FREENET_RETRYdarc.proxy.freenet.BS_WAITdarc.proxy.freenet.FREENET_PATHdarc.proxy.freenet.FREENET_ARGSdarc.proxy.freenet._MNG_FREENETdarc.proxy.freenet._FREENET_BS_FLAGdarc.proxy.freenet._FREENET_PROCdarc.proxy.freenet._FREENET_ARGS- I2P Proxy
_i2p_bootstrap()fetch_hosts()get_hosts()have_hosts()i2p_bootstrap()launch_i2p()read_hosts()save_hosts()darc.proxy.i2p.I2P_REQUESTS_PROXYdarc.proxy.i2p.I2P_SELENIUM_PROXYdarc.proxy.i2p.I2P_PORTdarc.proxy.i2p.I2P_RETRYdarc.proxy.i2p.BS_WAITdarc.proxy.i2p.I2P_ARGSdarc.proxy.i2p._MNG_I2Pdarc.proxy.i2p._I2P_BS_FLAGdarc.proxy.i2p._I2P_PROCdarc.proxy.i2p._I2P_ARGS- IRC Addresses
save_irc()darc.proxy.irc.PATHdarc.proxy.irc.LOCK- Magnet Links
save_magnet()darc.proxy.magnet.PATHdarc.proxy.magnet.LOCK- Email Addresses
save_mail()darc.proxy.mail.PATHdarc.proxy.mail.LOCK- No Proxy
fetch_sitemap()get_sitemap()have_robots()have_sitemap()read_robots()read_sitemap()save_invalid()save_robots()save_sitemap()darc.proxy.null.PATHdarc.proxy.null.LOCK- JavaScript Links
save_script()darc.proxy.script.PATHdarc.proxy.script.LOCK- Telephone Numbers
save_tel()darc.proxy.tel.PATHdarc.proxy.tel.LOCK- Tor Proxy
_tor_bootstrap()print_bootstrap_lines()renew_tor_session()tor_bootstrap()darc.proxy.tor.TOR_REQUESTS_PROXYdarc.proxy.tor.TOR_SELENIUM_PROXYdarc.proxy.tor.TOR_PORTdarc.proxy.tor.TOR_CTRLdarc.proxy.tor.TOR_PASSdarc.proxy.tor.TOR_RETRYdarc.proxy.tor.BS_WAITdarc.proxy.tor.TOR_CFGdarc.proxy.tor._MNG_TORdarc.proxy.tor._TOR_BS_FLAGdarc.proxy.tor._TOR_PROCdarc.proxy.tor._TOR_CTRLdarc.proxy.tor._TOR_CONFIG- ZeroNet Proxy
_zeronet_bootstrap()launch_zeronet()zeronet_bootstrap()darc.proxy.zeronet.ZERONET_PORTdarc.proxy.zeronet.ZERONET_RETRYdarc.proxy.zeronet.BS_WAITdarc.proxy.zeronet.ZERONET_PATHdarc.proxy.zeronet.ZERONET_ARGSdarc.proxy.zeronet._MNG_ZERONETdarc.proxy.zeronet._ZERONET_BS_FLAGdarc.proxy.zeronet._ZERONET_PROCdarc.proxy.zeronet._ZERONET_ARGS
To tell the darc project which proxy settings to be used for the
requests.Session objects and WebDriver
objects, you can specify such information in the darc.proxy.LINK_MAP
mapping dictionarty.
- darc.proxy.LINK_MAP: DefaultDict[str, Tuple[types.FunctionType, types.FunctionType]]¶
LINK_MAP = collections.defaultdict( lambda: (darc.requests.null_session, darc.selenium.null_driver), { 'tor': (darc.requests.tor_session, darc.selenium.tor_driver), 'i2p': (darc.requests.i2p_session, darc.selenium.i2p_driver), } )
The mapping dictionary for proxy type to its corresponding
requests.Sessionfactory function andWebDriverfactory function.The fallback value is the no proxy
requests.Sessionobject (null_session()) andWebDriverobject (null_driver()).See also
darc.requests–requests.Sessionfactory functionsdarc.selenium–WebDriverfactory functions