DSH Plugins Marketplace

DSH Plugins

Plugins

/

Security & Audit

/

dsh-net-consent

d

dsh-net-consent

Manifest valid

Gates the session's own network access behind a consent card: web tools and shell network verbs are allowed once, allowed for the session, or denied, with tool / command / domain / IP allowlists and a

UI (client)hasBundlePatch

dsh-net-consent

DSH 插件 平台

联网闸门:会话里 Agent 发起的联网,都要用户来批准

使用场景

需要手动控制联网行为/流量成本。弱网/漫游/卫星/海事

这是一套审批/拦截工具,不是流量计数器。它只审查不统计。有统计观测需求请使用dsh-traffic-statistics

审什么

会话自己发起的:

层覆盖策略键
工具web_fetch、web_search、浏览器 / Playwright 类工具、带 http(s) URL 的第三方插件工具mode
命令行curl、wget、ssh、scp、rsync、git clone、pnpm install、pip install、apt、snap refresh、pacman -S、svn checkout …shellMode

这些除外:聊天请求、插件市场与插件详情的后台拉取、更新检查、遥测。这些不经过会话工具,也就不在插件的职责里。插件不包 globalThis.fetch,不改 node:http(s).request,只挂一个 tools/pre-execute 监听。

策略

策略为 放行 / 每次询问 / 拒绝,工具层与命令行层各有一档(mode / shellMode)。

  • allow:不弹卡片。
  • ask:弹卡片(默认)。
  • deny:直接阻止,不弹卡片。

deny 优先于「本会话放行」;本机 / 局域网地址与白名单命中项先放行。

审批卡片

三个选项:放行一次、本会话放行该目标、拒绝。点「其它」填文字则默认拒绝,并把你的原话回给模型让它改路线。

  • 卡片包括 AI 的用途自述(可关),命令行走命令原文,其它工具走调用参数摘要。
  • 卡片末尾写明本次时限与超时动作,例如「30 秒内未选择将自动拒绝。」等待时间与超时动作(自动拒绝 / 自动放行)都在设置里改。
  • 子代理内无法弹卡片(DSH 禁止子代理向用户提问),按拒绝处理并提示让主代理来做。

白名单

一条只用一种写法,命中即免问:

写法例子命中方式
工具名web_fetch、browser_*工具名全等;结尾 * 作前缀通配
命令名curl、git、pnpm在命令文本里按整词匹配
域名example.com、*.example.com该次调用的主机全部命中才放行
IP8.8.8.8、::1精确匹配

白名单是显式例外表,先于 deny 策略生效。

安全

设置页的状态接口挂在 DSH 的 /api 通道上(ctx.connection.fetch.register 的精确路由)。Host / Origin 校验与浏览器认证由 DSH 自己完成,只有已认证的属主会话能读写;插件不再向 webServer 注册裸路由。

配置

cordis.patch.yml 里 net-consent 行的 config::

键默认含义
modeask工具层:allow / ask / deny
shellModeask命令行联网动词:allow / ask / deny
allowLocaltrue回环与局域网地址免问
askTimeoutMs30000等用户回答的超时(5s–10min)
onTimeoutdeny超时后:deny 自动拒绝 / allow 自动放行
audittrue写审计 jsonl
auditRetentionDays30审计保留天数,0 = 永久
allowlist[]工具 / 命令 / 域名 / IP,见上表
purposestrue卡片展示模型自述用途
internalTools一长串只读工具完全不看的工具(UI 不可改)

审计

每次判定写一行 JSON 到 ~/.dsh/net-consent/audit/YYYY-MM-DD.jsonl,via 字段区分放行 / 拒绝原因(once、session-grant、user-reject、policy=deny、timeout-allow、NET_CONSENT_TIMEOUT …)。超过保留天数的按天文件在启动时与写入后自动清理。

Comments

Loading…

Similar plugins

dsh-lan-pass

A LAN password gate for the Web UI: phones and tablets on the same network log in with a shared key and see the same sessions in real time, with a built-in randomUUID polyfill for plain-HTTP origins.

Security & AuditTerminal & ClientsManifest valid

★ 0

dsh plugin --profile web add dsh-lan-pass

by idoall

LAN access for the official DSH Web UI through a gated reverse proxy: DSH keeps its own loopback binding, and a second port adds a password gate, self-signed HTTPS and per-device pairing that can be r

Tools & CapabilitiesManifest valid

★ 5

↓ 973/wk

MIT

TypeScript

Nov 4, 2026

dsh plugin --profile web add dsh-lan-guard

Taints the agent when tool results carry untrusted content, gates the privileged calls that follow, and refuses credentials passed to network-capable tools in every mode.

Security & AuditDevelopment & InfrastructureManifest valid

★ 0

dsh plugin --profile web add dsh-taintguard

by longisland-icetea

Configurable LAN access for the DSH Web GUI: a settings tab binds the server to all interfaces, trusts only the addresses you configure, sets the browser session lifetime or removes the token login, a

Tools & CapabilitiesTerminal & ClientsManifest valid

★ 0

↓ 308/wk

MIT

JavaScript

Sep 9, 2026

dsh plugin --profile web add dsh-lan-access

by wentao75

DSH remote-access authorization page that shows the current process browser-session URL as a clickable link or QR code, behind an optional authority/subnet allow-list and PIN.

Security & AuditTools & CapabilitiesTerminal & ClientsManifest valid

★ 0

MIT

JavaScript

Sep 17, 2026

dsh plugin --profile web add dsh-remote-auth

by lyc0110

DSH pre-execute gate: ask before a tool call leaks a credential, stops a service, or rewrites host network/registry state.

Manifest valid

★ 0

MIT

JavaScript

Oct 26, 2026

dsh plugin --profile web add dsh-agent-guard