summaryrefslogtreecommitdiff
path: root/searx/poolrequests.py
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2015-04-25 11:44:53 +0200
committerAlexandre Flament <alex@al-f.net>2015-04-25 11:44:53 +0200
commitcde37be4f594451c1b791b7a3a66d78c2bc44d54 (patch)
treed91da5b848a4413ffaf6cda9e777465df1028117 /searx/poolrequests.py
parent33516256fd60d5bf6dcdf38c8a31f4038ecf0524 (diff)
downloadsearxng-cde37be4f594451c1b791b7a3a66d78c2bc44d54.tar.gz
searxng-cde37be4f594451c1b791b7a3a66d78c2bc44d54.zip
[enh] basic support for http proxy (see #236)
Diffstat (limited to 'searx/poolrequests.py')
-rw-r--r--searx/poolrequests.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/searx/poolrequests.py b/searx/poolrequests.py
index b74d43a02..e2a757665 100644
--- a/searx/poolrequests.py
+++ b/searx/poolrequests.py
@@ -66,8 +66,10 @@ class SessionSinglePool(requests.Session):
def request(method, url, **kwargs):
- """same as requests/requests/api.py request(...) except it use SessionSinglePool"""
+ """same as requests/requests/api.py request(...) except it use SessionSinglePool and force proxies"""
+ global settings
session = SessionSinglePool()
+ kwargs['proxies'] = settings.get('outgoing_proxies', None)
response = session.request(method=method, url=url, **kwargs)
session.close()
return response