mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.
Anecdotally, using SearX over unreliable proxies,
like tor, seems to be quite error prone.
SearX puts quite an effort to measure the
performance and reliability of engines, most
likely owning to those aspects being of
significant concern.
The patch here proposes to mitigate related
problems, by issuing concurrent redundant requests
through the specified proxies at once, returning
the first response that is not an error.
The functionality is enabled using the:
`proxy_request_redundancy` parameter within the
outgoing network settings or the engine settings.
Example:
```yaml
outgoing:
request_timeout: 8.0
proxies:
"all://":
- socks5h://tor:9050
- socks5h://tor1:9050
- socks5h://tor2:9050
- socks5h://tor3:9050
proxy_request_redundancy: 4
```
In this example, each network request will be
send 4 times, once through every proxy. The
first (non-error) response wins.
In my testing environment using several tor proxy
end-points, this approach almost entirely
removes engine errors related to timeouts
and denied requests. The latency of the
network system is also improved.
The implementation, uses a
`AsyncParallelTransport(httpx.AsyncBaseTransport)`
wrapper to wrap multiple sub-trasports,
and `asyncio.wait` to wait on the first completed
request.
The existing implementation of the network
proxy cycling has also been moved into the
`AsyncParallelTransport` class, which should
improve network client memoization and
performance.
TESTED:
- unit tests for the new functions and classes.
- tested on desktop PC with 10+ upstream proxies
and comparable request redundancy.
|
||
|---|---|---|
| .devcontainer | ||
| .github | ||
| .vscode | ||
| dockerfiles | ||
| docs | ||
| searx | ||
| searxng_extra | ||
| src/brand | ||
| tests | ||
| utils | ||
| .coveragerc | ||
| .dir-locals-template.el | ||
| .dockerignore | ||
| .editorconfig | ||
| .gitattributes | ||
| .gitignore | ||
| .nvmrc | ||
| .pylintrc | ||
| .tool-versions | ||
| .weblate | ||
| .yamllint.yml | ||
| AUTHORS.rst | ||
| babel.cfg | ||
| CHANGELOG.rst | ||
| CONTRIBUTING.md | ||
| Dockerfile | ||
| LICENSE | ||
| Makefile | ||
| manage | ||
| package.json | ||
| PULL_REQUEST_TEMPLATE.md | ||
| pyrightconfig-ci.json | ||
| pyrightconfig.json | ||
| README.rst | ||
| requirements-dev.txt | ||
| requirements.txt | ||
| SECURITY.md | ||
| setup.py | ||
Privacy-respecting, hackable metasearch engine
Searx.space lists ready-to-use running instances.
A user, admin and developer handbook is available on the homepage.
Contact
Ask questions or just chat about SearXNG on
- IRC
#searxng on libera.chat which is bridged to Matrix.
- Matrix
Setup
- A well maintained Docker image, also built for ARM64 and ARM/v7 architectures.
- Alternatively there are up to date installation scripts.
- For individual setup consult our detailed Step by step instructions.
- To fine-tune your instance, take a look at the Administrator documentation.
Translations
Help translate SearXNG at Weblate
Contributing
Are you a developer? Have a look at our development quickstart guide, it's very easy to contribute. Additionally we have a developer documentation.
Codespaces
You can contribute from your browser using GitHub Codespaces:
- Fork the repository
- Click on the
<> Codegreen button - Click on the
Codespacestab instead ofLocal - Click on
Create codespace on master - VSCode is going to start in the browser
- Wait for
git pull && make installto appear and then disappear - You have 120 hours per month (see also your list of existing Codespaces)
- You can start SearXNG using
make runin the terminal or by pressingCtrl+Shift+B