Proxy Utilities¶
The darc.proxy
module provides various proxy support
to the darc
project.
darc.proxy.bitcoin.PATH
darc.proxy.bitcoin.LOCK
darc.proxy.data.PATH
darc.proxy.ed2k.PATH
darc.proxy.ed2k.LOCK
darc.proxy.ethereum.PATH
darc.proxy.ethereum.LOCK
darc.proxy.freenet.FREENET_PORT
darc.proxy.freenet.FREENET_RETRY
darc.proxy.freenet.BS_WAIT
darc.proxy.freenet.FREENET_PATH
darc.proxy.freenet.FREENET_ARGS
darc.proxy.freenet._MNG_FREENET
darc.proxy.freenet._FREENET_BS_FLAG
darc.proxy.freenet._FREENET_PROC
darc.proxy.freenet._FREENET_ARGS
darc.proxy.i2p.I2P_REQUESTS_PROXY
darc.proxy.i2p.I2P_SELENIUM_PROXY
darc.proxy.i2p.I2P_PORT
darc.proxy.i2p.I2P_RETRY
darc.proxy.i2p.BS_WAIT
darc.proxy.i2p.I2P_ARGS
darc.proxy.i2p._MNG_I2P
darc.proxy.i2p._I2P_BS_FLAG
darc.proxy.i2p._I2P_PROC
darc.proxy.i2p._I2P_ARGS
darc.proxy.irc.PATH
darc.proxy.irc.LOCK
darc.proxy.magnet.PATH
darc.proxy.magnet.LOCK
darc.proxy.mail.PATH
darc.proxy.mail.LOCK
darc.proxy.null.PATH
darc.proxy.null.LOCK
darc.proxy.script.PATH
darc.proxy.script.LOCK
darc.proxy.tel.PATH
darc.proxy.tel.LOCK
darc.proxy.tor.TOR_REQUESTS_PROXY
darc.proxy.tor.TOR_SELENIUM_PROXY
darc.proxy.tor.TOR_PORT
darc.proxy.tor.TOR_CTRL
darc.proxy.tor.TOR_PASS
darc.proxy.tor.TOR_RETRY
darc.proxy.tor.BS_WAIT
darc.proxy.tor.TOR_CFG
darc.proxy.tor._MNG_TOR
darc.proxy.tor._TOR_BS_FLAG
darc.proxy.tor._TOR_PROC
darc.proxy.tor._TOR_CTRL
darc.proxy.tor._TOR_CONFIG
darc.proxy.zeronet.ZERONET_PORT
darc.proxy.zeronet.ZERONET_RETRY
darc.proxy.zeronet.BS_WAIT
darc.proxy.zeronet.ZERONET_PATH
darc.proxy.zeronet.ZERONET_ARGS
darc.proxy.zeronet._MNG_ZERONET
darc.proxy.zeronet._ZERONET_BS_FLAG
darc.proxy.zeronet._ZERONET_PROC
darc.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.Session
factory function andWebDriver
factory function.The fallback value is the no proxy
requests.Session
object (null_session()
) andWebDriver
object (null_driver()
).See also
darc.requests
–requests.Session
factory functionsdarc.selenium
–WebDriver
factory functions