fix(search): repair SearXNG engine failures

- bing: www.bing.com 302-redirects to cn.bing.com and SearXNG engine
  requests do not follow redirects, so it parsed the 178-byte redirect
  page and returned 0 results without any error report. Point bing at
  https://cn.bing.com to bypass the redirect.
- Raise outgoing request_timeout 3.0 -> 8.0 and max_request_timeout
  4.0 -> 15.0. max_request_timeout overrides each engine's own timeout,
  so 360search (timeout 20s) was still cut off at 4s.
- Enable duckduckgo (verified working) and disable baidu/sogou which
  return 302 verification pages (baidu also hits a 1h CAPTCHA ban, and
  sogou raises AttributeError on SXNG_Response.next_request).
- Document the diagnosis in the README FAQ.
This commit is contained in:
JianFeeeee
2026-09-11 10:26:32 +08:00
parent e48fcc53cd
commit 88e23861fe
2 changed files with 26 additions and 7 deletions

View File

@ -485,7 +485,17 @@ data/
## 常见问题
**搜索无结果**:确认容器能访问搜索引擎。国内服务器建议只启用百度/Bing中国/搜狗。
**搜索无结果**:确认容器能访问搜索引擎。
- 国内服务器通常需要代理才能出网:SearXNG 不读 `http_proxy` 环境变量,
必须在 `searxng-settings.yml` 的 `outgoing.proxies` 里配置(见文件内注释)。
- **Bing 结果异常少**:`www.bing.com` 会 302 跳到 `cn.bing.com`,而 SearXNG
引擎请求不跟随重定向,只会解析跳转页得到 0 条且不报错。已在默认配置里把
bing 的 `base_url` 指向 `https://cn.bing.com` 绕开该重定向。
- **引擎大面积超时**:`outgoing.max_request_timeout` 会覆盖每个引擎自己的
`timeout`。默认配置已放宽到 `request_timeout: 8.0` / `max_request_timeout: 15.0`,
经代理访问时不要再调回 3/4 秒。
- 百度与搜狗会返回 302 验证页(并触发引擎 1 小时封禁),默认已关闭。
**管理后台 401**:设置了 `NAVI_ADMIN_TOKEN` 时需携带 Bearer token。