基于 SearXNG 的 web_search provider:通过自建实例的 JSON API 实现免费、免密钥的元搜索,附仅绑定回环地址的 docker-compose 示例。
安装
# npm 包(预构建)
dsh plugin --profile web add dsh-searxng
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:rogerdigital/dsh-searxng
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本。请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
A DeepSeek Harness (dsh) plugin that registers a
SearXNG-backed search provider into the web capability seam
(ctx.web), giving your agent web_search through a free, self-hosted, key-less metasearch
instance — instead of the paid Exa/Perplexity APIs.
Install
dsh plugin add dsh-searxng
(With a named profile: dsh plugin --profile <name> add dsh-searxng.)
Quick start
Run a SearXNG instance with the JSON format enabled (one command, one minute):
cd examples/docker && docker compose up -d # verify: curl 'http://127.0.0.1:8080/search?q=test&format=json'The bundled compose file is loopback-only and pre-configures
search.formatswithjson— the one setting most public instances deliberately disable.Point the plugin at it. Either set an environment variable before launching dsh:
export SEARXNG_BASE_URL=http://127.0.0.1:8080 dsh…or override the plugin row in your profile's
cordis.patch.yml($DSH_HOME/profiles/<name>/cordis.patch.yml):- id: web-search-searxng config: baseURL: http://127.0.0.1:8080 language: zh-CNAsk your agent something that needs the web. If this is the only search provider you have installed, the seam auto-selects it. If you also have Exa/Perplexity installed, select it explicitly with
export DSH_WEB_SEARCH_PROVIDER=searxng(or setsearchProvider: searxngin the web row's config).
Until baseURL is set, the provider registers as unavailable — no public instance is assumed,
because most disable the JSON format and rate-limit heavily.
Configuration
All keys are optional; all live on the web-search-searxng row's config.
| Key | Default | Meaning |
|---|---|---|
baseURL |
$SEARXNG_BASE_URL |
Base URL of the instance, e.g. http://127.0.0.1:8080. Must be http(s) and have json in search.formats. |
language |
none | Locale passed as SearXNG's language parameter, e.g. zh-CN, en-US. |
engines |
none | Comma-separated engine allowlist, e.g. bing,duckduckgo. |
categories |
none | Comma-separated category filter, e.g. general,it. |
authHeader |
none | Authorization header value, for instances fronted by an API-key gate. Sent verbatim. |
The result count is not configurable here: dsh-tool-web owns the bound (searchMaxResults,
default 8) and the seam truncates to it.
Troubleshooting
- HTTP 403 — the instance does not enable the JSON format. Add
jsontosearch.formatsin itssettings.yml(see the bundled example), then restart the instance. - HTTP 429 — the instance's rate limiter. For a local instance set
limiter: false, or raise its limits. - Provider unavailable / never selected —
baseURLis not set or not an absolute http(s) URL. WEB_PROVIDER_AMBIGUOUS— more than one search provider is installed and available; select one viaDSH_WEB_SEARCH_PROVIDER=searxng.
Compatibility
dsh is in developer preview with breaking changes expected. This table tracks tested pairings:
| Plugin version | @deepseek-ai/dsh-web |
Notes |
|---|---|---|
| 0.1.0 | >=0.1.0-rc.1 <0.2.0 (tested against 0.1.0-rc.6) |
Initial release |
Develop
pnpm install
pnpm test # vitest
pnpm build # tsdown → lib/
Integration check against a live instance:
cd examples/docker && docker compose up -d
node -e "import('./lib/index.mjs').then(m => new m.SearxngSearchProvider({ baseURL: 'http://127.0.0.1:8080' }).search({ query: 'deepseek harness' }).then(r => console.log(r.sources.slice(0, 3))))"
License
MIT
链接
同类插件
liustack/modlens★ 2073
为纯文本模型架起视觉桥梁:粘贴图片,输出结构化 JSON 证据(OCR、版面、语义)。
Anionex/dsh-vision-toolkit★ 467
让纯文本模型更好地做视觉任务:带意图的图片问答、长截图 OCR、UI 还原等。
superdesigndev/treg★ 423
给 Agent 的工具目录:按「要做的事」检索约 2,600 个外部接口(SEO 与 SERP、外链、社交、人物与公司信息补全、广告库、抓取),查看参数与单次调用价格后直接调用,凭据由服务端注入。附带技能,MCP 行在未设置 TREG_TOKEN 前保持禁用。
ysr666/dsh-vision-router★ 240
为纯文本 Agent 提供视觉能力:内置免 Key 视觉链 + 像素级视觉工具(看图问答、定位、裁剪、像素对比、取色、OCR、矢量化、抠图、截图);粘贴图片即可用。
Lum1104/dsh-browser★ 177
Chrome 侧边栏扩展,让 DSH 直接操控你的浏览器,无需视觉能力。
zhaoolee/notes★ 141
将 DSH 对话导出为锤子便签风格 PNG,或在配置的账号工作区中新建和更新 Markdown 便签。