sperictao / dsh-client-connection-authz

목록에 있음

Auth-capable replacement for DeepSeek Harness client connection

main기타 소스 보기

설치

npx -y @deepseek-ai/dsh plugin --profile web add github:sperictao/dsh-client-connection-authz

이 설치 명령은 GitHub 저장소 주소에서 생성된 확인되지 않은 시작점입니다.

README

유지 관리자가 작성한 문서 스냅샷입니다.

GitHub에서 보기 ↗
커밋 873c465동기화 2026. 8. 18.

dsh-client-connection-authz

DeepSeek Harness 0.1.0-rc.6 内置 connection 的完整替代包。它保留官方 HTTP、共享/独立 RPC、WebSocket 和浏览器 client 行为,并在所有远程入口前 增加一个由外部插件提供的 ConnectionRequestAuthorizer

设计

本包的 bundle patch 做两件事:

  1. id + name 双重匹配禁用内置 @deepseek-ai/dsh-client-connection;如果上游改名,patch 会显式告警而不会 误伤复用该 id 的其它插件。
  2. 插入 @dsh-external/dsh-client-connection-authz,并强制注入 connectionRequestAuthorizer。认证插件缺失或配置失败时,connection 不会以 匿名模式降级启动。

浏览器 bundle 来自官方 @deepseek-ai/dsh-client-connection@0.1.0-rc.6,构建时 只替换模块表 id;脚本会校验上游精确版本和唯一 id,防止静默漂移。Host 源码基于 DeepSeek Harness commit 47f943859bef60e4160492346772ded9b24f765a,来源见 NOTICE.md

授权接口

interface ConnectionRequestAuthorizer {
  authorize(facts: ConnectionRequestFacts):
    | { allowed: true; principal: ConnectionPrincipal }
    | { allowed: false; status: 401 | 403 }
}

facts 包含 transport、channel、endpoint、headers、TCP peer address,以及目标 要求的 authority:

  • trusted-host:普通 API、普通 RPC 和两个 WebSocket downlink。
  • loopback:设置、凭据、宿主文件操作等特权 API;认证插件只有显式授予更高权限 才能让远程调用通过。

执行顺序固定为:Host/Origin/DNS-rebinding fence → 本地回环判断 → 外部 authorizer → body 读取/协议升级/业务 handler。有效本地旁路必须同时满足回环 Host 和回环 TCP peer;远端仅伪造 Host: 127.0.0.1 仍会进入 authorizer。共享 RPC 会在 授权前把 handler 与 authority 快照为同一 target,避免授权后切换 interceptor 的 时序绕过。

安装

这个包故意不能单独启用;profile 还必须安装一个提供 authorizer 的认证包。例如与 dsh-auth-tailscale 一起安装:

gh auth setup-git
dsh plugin --profile web add \
  git+https://github.com/sperictao/dsh-client-connection-authz.git \
  git+https://github.com/sperictao/dsh-auth-tailscale.git

两个仓库目前是 private;上面的已验证路径使用当前 gh 登录为 Git 配置 HTTPS 凭据。也可以改用已配置公钥的 SSH URL。

开发

pnpm install
pnpm check

测试覆盖 HTTP、共享/独立 RPC、WebSocket、特权 authority、回环 Host 伪造和既有 trust fence。pnpm build 还会生成并校验官方 rc.6 浏览器 bundle。

兼容范围

当前版本只承诺兼容 DeepSeek Harness 0.1.0-rc.6。升级 dsh 时必须重新核对 Host 源码差异、官方 browser artifact、内置 bundle row 和完整集成测试,不能依赖 semver 自动漂移。

프로젝트 파일 및 신호

표시된 항목은 디렉터리 스냅샷에서 감지된 공개 저장소 신호입니다.

테스트감지됨

저장소 정보

언어
TypeScript
라이선스
MIT
마지막 업데이트
2026. 8. 16. 오전 12:43

신중하게 설치하기

소스 코드, 권한, 수명 주기 스크립트, 의존성 및 네트워크 접근을 검토하고 신뢰하지 않는 플러그인은 격리 환경에서 테스트하세요.