Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

Cannot exclude hostname from being proxied #3196

Open
m00nwtchr opened this issue Mar 29, 2022 · 2 comments
Open

Cannot exclude hostname from being proxied #3196

m00nwtchr opened this issue Mar 29, 2022 · 2 comments

Comments

@m00nwtchr
Copy link

m00nwtchr commented Mar 29, 2022

Version of Searx, commit number if you are using on master branch and stipulate if you forked Searx
1.0.0-361-03eb9c24
How did you install Searx?
searx-docker
What happened?
I'm trying to exclude a single hostname from being proxied via Tor, while keeping everything else proxied.
According to the python httpx documentation (https://www.python-httpx.org/advanced/#http-proxying) this can be done like this:

proxies = {
    "all://": "socks5h://tor:9100",
    "all://prowlarr": None,
}

which should translate to this searx settings.yml:

    proxies:
        all://:
            - socks5h://tor:9100
        all://prowlarr: null

but it causes searx to crash on startup

Screenshots & Logs

Traceback (most recent call last):
  File "/usr/local/searx/searx/webapp.py", line 156, in <module>
    search_initialize(enable_checker=True, check_network=True)
  File "/usr/local/searx/searx/search/__init__.py", line 57, in initialize
    check_network_configuration()
  File "/usr/local/searx/searx/network/network.py", line 295, in check_network_configuration
    raise RuntimeError("Invalid network configuration")
RuntimeError: Invalid network configuration
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. going in full dynamic mode ***
--- no python application found, check your startup logs for errors ---
--- no python application found, check your startup logs for errors ---
--- no python application found, check your startup logs for errors ---

and

ERROR:searx.network.<name>:Error
Traceback (most recent call last):
  File "/usr/local/searx/searx/network/network.py", line 286, in check
    await network.get_client()
  File "/usr/local/searx/searx/network/network.py", line 187, in get_client
    client = new_client(
  File "/usr/local/searx/searx/network/client.py", line 125, in new_client
    if proxy_url.startswith('socks4://') \
AttributeError: 'NoneType' object has no attribute 'startswith'

repeated for every search engine

@m00nwtchr m00nwtchr added the bug label Mar 29, 2022
@m00nwtchr m00nwtchr changed the title Cannot exclude url from being proxied Cannot exclude hostname from being proxied Mar 29, 2022
@unixfox
Copy link
Member

unixfox commented Mar 29, 2022

@dalf any help here?

@dalf
Copy link
Contributor

dalf commented Mar 29, 2022

This is feature is not implemented, but it should be possible.

@unixfox unixfox added enhancement and removed bug labels Mar 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants