mirror of https://github.com/searx/searx
Fix Tor proxy when using httpx 0.21.x (#3165)
## What does this PR do? This should fix #3164. The problem is that `httpx` keeps making breaking changes to their library, so we just have to adjust the code a little bit to make it work with the new version of the library. ## Related issues Closes #3164
This commit is contained in:
parent
0669bfd7a5
commit
c9e6d9f5f6
|
@ -167,8 +167,7 @@ class Network:
|
|||
for transport in client._mounts.values(): # pylint: disable=protected-access
|
||||
if isinstance(transport, AsyncHTTPTransportNoHttp):
|
||||
continue
|
||||
if not getattr(transport, '_pool') and getattr(transport._pool, '_rdns', False):
|
||||
result = False
|
||||
if getattr(transport, '_pool') and getattr(transport._pool, '_rdns', False):
|
||||
continue
|
||||
return False
|
||||
response = await client.get("https://check.torproject.org/api/ip", timeout=10)
|
||||
|
|
Loading…
Reference in New Issue