0ef098069e
* Add tor and http/socks proxy support Allows users to enable/disable tor from the config menu, which will forward all requests through Tor. Also adds support for setting environment variables for alternative proxy support. Setting the following variables will forward requests through the proxy: - WHOOGLE_PROXY_USER (optional) - WHOOGLE_PROXY_PASS (optional) - WHOOGLE_PROXY_TYPE (required) - Can be "http", "socks4", or "socks5" - WHOOGLE_PROXY_LOC (required) - Format: "<ip address>:<port>" See #30 * Refactor acquire_tor_conn -> acquire_tor_identity Also updated travis CI to set up tor * Add check for Tor socket on init, improve Tor error handling Initializing the app sends a heartbeat request to Tor to check for availability, and updates the home page config options accordingly. This heartbeat is sent on every request, to ensure Tor support can be reconfigured without restarting the entire app. If Tor support is enabled, and a subsequent request fails, then a new TorError exception is raised, and the Tor feature is disabled until a valid connection is restored. The max attempts has been updated to 10, since 5 seemed a bit too low for how quickly the attempts go by. * Change send_tor_signal arg type, update function doc send_tor_signal now accepts a stem.Signal arg (a bit cleaner tbh). Also added the doc string for the "disable" attribute in TorError. * Fix tor identity logic in Request.send * Update proxy init, change proxyloc var name Proxy is now only initialized if both type and location are specified, as neither have a default fallback and both are required. I suppose the type could fall back to http, but seems safer this way. Also refactored proxyurl -> proxyloc for the runtime args in order to match the Dockerfile args. * Add tor/proxy support for Docker builds, fix opensearch/init The Dockerfile is now updated to include support for Tor configuration, with a working torrc file included in the repo. An issue with opensearch was fixed as well, which was uncovered during testing and was simple enough to fix here. Likewise, DDG bang gen was updated to only ever happen if the file didn't exist previously, as testing with the file being regenerated every time was tedious. * Add missing "@" for socks proxy requests
34 行
523 B
Plaintext
34 行
523 B
Plaintext
attrs==19.3.0
|
|
beautifulsoup4==4.8.2
|
|
bs4==0.0.1
|
|
cachelib==0.1
|
|
certifi==2020.4.5.1
|
|
cffi==1.13.2
|
|
chardet==3.0.4
|
|
Click==7.0
|
|
cryptography==3.2
|
|
Flask==1.1.1
|
|
Flask-Session==0.3.2
|
|
idna==2.9
|
|
itsdangerous==1.1.0
|
|
Jinja2==2.10.3
|
|
lxml==4.5.1
|
|
MarkupSafe==1.1.1
|
|
more-itertools==8.3.0
|
|
packaging==20.4
|
|
pluggy==0.13.1
|
|
py==1.8.1
|
|
pycparser==2.19
|
|
pyOpenSSL==19.1.0
|
|
pyparsing==2.4.7
|
|
PySocks==1.7.1
|
|
pytest==5.4.1
|
|
python-dateutil==2.8.1
|
|
requests==2.23.0
|
|
soupsieve==1.9.5
|
|
stem==1.8.0
|
|
urllib3==1.25.9
|
|
waitress==1.4.3
|
|
wcwidth==0.1.9
|
|
Werkzeug==0.16.0
|