SearXNG
The optional SearXNG plugin finds new proxy-list pages for you. On a schedule, it sends your search queries to a SearXNG instance you run, picks result pages that can contain proxy lists, and subscribes one workspace to them as scrape sources. The scraper then fetches them like any other source, and the checker tests what they contain. Sources that stop producing proxies are removed again.
The plugin only adds sources. It does not check proxies, change checker settings, or touch sources you added yourself.
Run a SearXNG instance
The plugin needs a SearXNG instance with the JSON output format turned on. Public SearXNG instances usually turn JSON off, so run your own.
With the bundled Compose service
The Maglane Compose file includes an optional SearXNG service. It is off unless you turn on its profile:
- Add
COMPOSE_PROFILES=searxngto the.envfile next todocker-compose.yml. - Run
docker compose up -d. Compose startssearxng-config, which writes the SearXNG settings and exits, and thensearxng. - Use
http://searxng:8080as the plugin's SearXNG URL.
The service publishes no host port. Only containers on the Compose network, such as the backend, can reach it. The generated settings turn on JSON output, turn off the rate limiter and image proxy, and pick a new secret key on each start. They are rewritten every time the stack starts, so edits made inside the container do not last. To customize SearXNG, run your own instance instead.
The update helpers pull the SearXNG image together with Maglane's while the
profile is set. Pin a release with SEARXNG_TAG if you prefer; SearXNG
publishes date-based tags. Resource limits use the SEARXNG prefix described
in environment variables.
With your own instance
Add json to search.formats in the instance's settings.yml and restart it:
search:
formats:
- html
- json
The URL can point at a private or loopback address, such as a container on the same host. Link-local, cloud metadata, multicast, and unspecified addresses are rejected. The URL must not redirect, carry credentials, or appear on the website blacklist.
Choose a target workspace
Discovered sources go into one workspace whose members are all instance administrators. Workspaces with a member or a pending invitation for a non-admin account do not qualify. This keeps sources that strangers' search results suggested away from regular users.
Create a dedicated workspace for discovery, for example Discovery, and invite only administrators. The plugin checks the workspace when its settings change and again before every run. If a non-admin later joins, runs stop with an error until you choose another workspace or remove that member.
Changing the target workspace leaves sources already added to the old workspace where they are.
Configure the plugin
- As an instance administrator, open Plugins → SearXNG.
- Enter the SearXNG URL and choose the Target workspace.
- Optionally choose Tags for new sources. They become the automatic tags of every source the plugin adds, so proxies scraped from those sources carry them. See automatic tags.
- Review the queries and limits, turn the plugin on, and save.
The first run starts shortly after you turn the plugin on. Later runs follow the interval. Run now starts a run immediately with the saved settings; the status figures update when it finishes.
| Setting | Default | Range | Meaning |
|---|---|---|---|
| Queries | Five proxy-list queries | 1–20, up to 256 characters each | Searches sent on every run, in SearXNG syntax. |
| Engines | Instance defaults | Up to 20 names | Comma-separated SearXNG engine names. |
| Result age | Any time | Any time, day, week, month, year | SearXNG time range. |
| Result pages | 2 | 1–5 | Result pages requested per query. |
| Check robots.txt | On | On / Off | Check each candidate's robots.txt before subscribing it. Scheduled scrapes still follow the global scraper setting. |
| Request timeout | 15 s | 1–60 s | Timeout for each SearXNG request. |
| GitHub token | Empty | Optional, up to 512 characters | Optional personal access token sent only to api.github.com to raise repo, folder, and Gist expansion from 60 to 5,000 requests/hour. Falls back to SEARXNG_GITHUB_TOKEN / GITHUB_TOKEN when blank. |
| Run every | 360 min | 15–10,080 min | Time between scheduled runs. |
| Source limit | 100 | 1–1,000 | Discovered sources kept at once. |
| New sources per run | 20 | 1–200 | Sources added by one run at most. |
| Empty or failed scrapes | 3 | 1–50 | Consecutive empty or failed scrapes before removal. |
| Dead proxy grace period | 48 h | 1–720 h | Age after which a source whose proxies are all dead is removed. |
| Cooldown | 168 h | 1–2,160 h | Time a removed or rejected URL is skipped before it can be tried again. |
Which results become sources
Each result URL is expanded, cleaned up, and probed before it is subscribed:
- GitHub and GitLab repository roots, folder trees, and multi-file Gists are
expanded into direct raw proxy-list file URLs (skipping metadata, badges, and
per-country subdirectories). Unexpandable repository and profile pages are
skipped. Configure an optional GitHub token in Plugins → SearXNG (or
set the
SEARXNG_GITHUB_TOKEN/GITHUB_TOKENbackend environment variable as a fallback) to raise the GitHub API rate limit from 60 to 5,000 requests/hour; when rate-limited, expansion falls back to raw links in the repository'sREADME.md. - GitHub blob/raw pages, Gist pages (with commit hashes unpinned so updates are followed), GitLab blob pages, and Pastebin paste pages are rewritten to their raw text URLs.
- Media, binary, markdown, and source-code files, social and video sites, documentation/API-doc sites and paths, and GitHub issue or discussion pages are skipped.
- Private, loopback, and reserved addresses are skipped, even when
ALLOW_PRIVATE_NETWORK_EGRESSis on. - URLs on the website blacklist, already subscribed by the workspace, or in cooldown are skipped.
- Remaining candidates are probed over strict-public HTTP (checking
robots.txtwhen Check robots.txt is on) and must produce at least three distinct valid public IPv4 proxies. Candidates that fail probing enter cooldown without taking up active source slots.
A run adds at most New sources per run, and never more than the free room under the Source limit. When the limit is reached, the run only prunes and the status reads At source limit.
How discovered sources are fetched
Discovered sources are fetched in HTTP mode with stricter network rules than sources you add yourself:
- Fetches, redirects, and robots.txt requests go to public addresses only, even
when
ALLOW_PRIVATE_NETWORK_EGRESSis on. - Proxies on private, loopback, or reserved addresses found on these pages are dropped before they reach the checker.
- Pre-subscription probing follows the plugin's Check robots.txt setting;
scheduled scrapes follow the global scraper
robots.txtsetting and the website blacklist as usual.
If you also add the same URL by hand in a workspace, all workspaces share one fetch, so the stricter rules apply to it everywhere.
Pruning
Each run first reviews the sources the plugin added and removes the workspace's subscription when:
- the last Empty or failed scrapes scrapes in a row found no proxies or failed;
- the source is older than the Dead proxy grace period, has been scraped, and every proxy it produced is dead, with none still unchecked;
- its URL was added to the website blacklist.
If someone in the workspace removed a discovered source, the plugin stops tracking it. Removed URLs stay in cooldown and are not added again until it ends.
Sources you add yourself are never removed, even when the same URL was also discovered. A URL the plugin added stays plugin-managed if you later add it again by hand in the same workspace; remove it and add it back to make it yours.
Status
The status card shows the discovered sources against the source limit, the last and next run, and how many sources the last run added and removed. It refreshes every minute while the page is open.
| State | Meaning |
|---|---|
| Running | The last run succeeded, or no run has happened yet. |
| At source limit | The last run found no free room and only pruned. |
| Some searches failed | Some queries failed; results from the others were used. |
| Last run failed | The run stopped. The message explains why. |
HTTP 403 or 406 from SearXNG, or an HTML response, means JSON output is off. A redirect means the URL is not the instance's final address.
Deployment and load
Upgrade the frontend and all backend replicas together, run the normal database
migration, and only then turn the plugin on. Backends from before the plugin
do not apply the stricter fetch rules to discovered sources. The migration
creates searxng_states and searxng_discovered_sources and adds
managed_by to workspace source subscriptions. No backend environment variables
are required.
One elected backend runs discovery at a time across replicas. While the plugin is off, it makes no database, Redis, or network requests. A run reads its tracked sources with a few database queries and sends one SearXNG request per query and result page.
The plugin adds no work to the proxy checker loop. For sources you add
yourself, scraping is unchanged: the scraper already reads the subscription row
that carries managed_by.