searxng-proxy
v0.1.0
Published
Bun-based SearXNG failover proxy with HTML-to-JSON fallback
Readme
SearXNG Failover Proxy
Small Bun + TypeScript proxy that:
- loads candidate instances from
https://searx.space/data/instances.json - prefers healthy HTTPS
network_type=normalinstances - forwards requests to a selected upstream
- retries other instances when an upstream fails or returns a bot / rate-limit page
- for
/search?...&format=json, falls back to parsing HTML SearXNG result pages into JSON when an instance does not expose JSON but does return usable HTML results
Install
bunx searxng-proxyOr install from npm after publishing:
bun add -g searxng-proxy
searxng-proxyRun
cd /opt/apps/searxng-proxy
bun install
bun run src/index.tsDefault bind: 127.0.0.1:8788
Env
See .env.example.
Health
GET /healthzPOST /_instances/refresh
Publish
bun publish --access public