dsh-free-model 2.1.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +144 -64
- package/README_EN.md +216 -34
- package/SECURITY-AUDIT.md +12 -5
- package/client.js +10 -2
- package/index.js +1 -1
- package/locale/en.json +1 -1
- package/locale/zh.json +1 -1
- package/package.json +2 -2
- package/vendor/channel-pack/NOTICE.md +79 -3
- package/vendor/channel-pack/pack.js +39309 -33993
package/README.md
CHANGED
|
@@ -1,19 +1,75 @@
|
|
|
1
|
-
# 模型接入 (
|
|
1
|
+
# 模型接入 (dsh-free-model)
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
**DSH 插件**(DeepSeek Harness · cordis bundle)· [English](https://github.com/YpipaQ/dsh-free-model/blob/slim-channels-only/README_EN.md)
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/dsh-free-model)
|
|
6
|
+
[](#)
|
|
7
|
+
[](https://github.com/YpipaQ/dsh-free-model/blob/slim-channels-only/LICENSE)
|
|
8
|
+
|
|
9
|
+
> [`Ebony-Vinyl/dsh-our-free-model`](https://github.com/Ebony-Vinyl/dsh-our-free-model) **2.1.0**(提交 `7e3a1da`)的精简 fork。
|
|
10
|
+
> 只保留「把外部账号接进来」这一条车道:**十五个账号渠道 + 数据看板 + 运行日志 + 本地网关**。
|
|
6
11
|
> 上游的匿名免费车道、EAC 协付车道、聚合渠道、省 Token、路由与发布/更新通道全部移除。
|
|
7
|
-
>
|
|
8
|
-
>
|
|
12
|
+
>
|
|
13
|
+
> ⚠️ fork 父仓库**已走到 2.3.0**,但它的后续改动几乎全在被删掉的那些车道里;
|
|
14
|
+
> **渠道与模型数据以真上游为准**(见下文「出处与致谢」)。
|
|
15
|
+
|
|
16
|
+
| | |
|
|
17
|
+
| --- | --- |
|
|
18
|
+
| npm | **`dsh-free-model`**(与仓库同名) |
|
|
19
|
+
| 设置页入口 | **模型接入**(英文界面 **Model Access**) |
|
|
20
|
+
| loader 条目 id | `our-free-model`(设置命名空间与状态目录挂在这个 id 上,**不随包名变化**) |
|
|
21
|
+
| 状态目录 | `~/.dsh/our-free-model/`(0600) |
|
|
22
|
+
|
|
23
|
+
## 安装
|
|
24
|
+
|
|
25
|
+
**命令行(纯 dsh web)——推荐**
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
dsh plugin --profile web add dsh-free-model
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
装完**重启一次 dsh**:宿主半身在进程内,重启才加载新的 `index.js`;浏览器半身刷新页面即可。
|
|
32
|
+
`--profile` 填你实际用的 profile 名(默认 `web`)。
|
|
33
|
+
|
|
34
|
+
**桌面端(DSHEAC AIO)**:用**应用内的插件管理器**安装。桌面端启动 web 前有一道 profile 闸门,
|
|
35
|
+
只放行 dsh 自己在 `.dsh-module-fallback` 下生成的链接,profile 里出现其它符号链接或 junction 会直接
|
|
36
|
+
拒绝启动(`PROFILE_UPGRADE_REQUIRED`)——所以**不要用 `link:` 依赖、不要手建 junction**。
|
|
37
|
+
|
|
38
|
+
**从上游版本切换过来**:上游包名是 `dsh-our-free-model`。两者的 loader 条目 id 都是 `our-free-model`,
|
|
39
|
+
**不能同时装**:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
dsh plugin --profile web remove dsh-our-free-model
|
|
43
|
+
dsh plugin --profile web add dsh-free-model
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
状态目录与条目 id 在本 fork 里没变,所以**账号、密钥、出口地址在切换时不会丢**。
|
|
47
|
+
|
|
48
|
+
**卸载 / 回滚**
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
dsh plugin --profile web remove dsh-free-model # 卸载
|
|
52
|
+
dsh plugin --profile web add dsh-our-free-model # 回滚到上游 2.1.0
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
> ⚠️ **不要再手工把仓库拷进 `node_modules/<包名>/`**。2026-10-11 实测:这么装的副本会在插件管理器
|
|
56
|
+
> 下一次 `pnpm install`(装/卸任何别的插件都会跑)时被按 lockfile 顶替,甚至直接清掉。要长期固定就用
|
|
57
|
+
> registry(本包),或在命令行 web profile 里用 `file:` 依赖。
|
|
58
|
+
|
|
59
|
+
## 快速上手
|
|
60
|
+
|
|
61
|
+
1. 重启后进 **设置 → 模型接入**,逐个渠道点登录(浏览器授权,账号池与积分查询都在同一张卡上)。
|
|
62
|
+
2. 每个渠道卡里可以**逐模型开/关**,也能「全部显示 / 全部隐藏」——**默认可能全是关的**,关着的模型
|
|
63
|
+
不会出现在模型选择器里。
|
|
64
|
+
3. 回到聊天输入框上方的模型选择器,渠道模型按产品分组出现;选一个即可开始用。
|
|
9
65
|
|
|
10
66
|
## 保留了什么
|
|
11
67
|
|
|
12
|
-
|
|
68
|
+
四个设置页(上游九页 → 四页):
|
|
13
69
|
|
|
14
70
|
| 页面 | 作用 |
|
|
15
71
|
| --- | --- |
|
|
16
|
-
| **白嫖模型接入** |
|
|
72
|
+
| **白嫖模型接入** | 十五张渠道卡:CodeArts、CodeBuddy / WorkBuddy(国内 + 国际)、LobsterAI、Qoder / Qoder CN、TRAE、Cline、Loomy、Raccoon、MiniMax Code、ZCode、Gemini、**OfficeAce**(华为云 ModelArts,云端直连、无需装客户端)、**Accio Work**(阿里,标准 OAuth + PKCE,可脱离 IDE)。浏览器登录、账号池、续期、积分查询与一键领取、每日自动签到、逐模型开关、余额查询。 |
|
|
17
73
|
| **数据看板** | 渠道包自己的逐请求 Token 账本:今日 / 全部消耗、平均生成速度、首字延迟、缓存命中率、成功率、账号透视、模型性能表。 |
|
|
18
74
|
| **运行日志** | 逐条请求明细:结果、耗时、首字、速度、Token 细分;失败行悬停看原因。 |
|
|
19
75
|
| **网关设置** | 渠道包的本地 OpenAI 兼容网关(开关、端点、密钥、模型数)+ 本插件的局域网中继(可选绑定地址/端口、独立中继密钥、轮换)+ 出口代理分区(订阅分流或单个 http/socks5 出口)。 |
|
|
@@ -22,7 +78,7 @@
|
|
|
22
78
|
|
|
23
79
|
| 移除 | 原因 |
|
|
24
80
|
| --- | --- |
|
|
25
|
-
| **免费模型**页:匿名 opencode 车道 + Kilo 免费池 | 第三方灰产通道(伪装客户端 +
|
|
81
|
+
| **免费模型**页:匿名 opencode 车道 + Kilo 免费池 | 第三方灰产通道(伪装客户端 + 池化公共凭据),随时可能失效或改协议。 |
|
|
26
82
|
| **EAC 模型**页:GitHub 授权协付车道 | 依赖仓库方网关与 star 授权。 |
|
|
27
83
|
| **聚合渠道**页(76 家自带 Key 的提供商) | 与插件自己的模型适配器(`src/adapter.js`)绑定,随它一起移除。 |
|
|
28
84
|
| **省 Token**页 | 压缩管线(RTK / 提示词瘦身 / 本地应答)跑在同一个适配器里。 |
|
|
@@ -31,52 +87,9 @@
|
|
|
31
87
|
| 本地转发(18899)与局域网转发 | 转发的正是被删掉的那条车道。 |
|
|
32
88
|
| `packages/standalone/`(独立 Web 产品)、`worker/`(EAC 的 Cloudflare 授权网关)、`feed/` + `catalog/`(公告源与发布清单) | 三块卫星全部 `import` 被删车道,留着就是一套永远跑不起来的代码。 |
|
|
33
89
|
|
|
34
|
-
规模变化:`src/` 从 **58 个模块 → 5 个**(`store/key/chan-relay/egress/trust`),宿主 `index.js` 从
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
**命令行(纯 dsh web)**
|
|
39
|
-
|
|
40
|
-
```
|
|
41
|
-
dsh plugin --profile web add dsh-free-model # 从 npm 装(公开发布)
|
|
42
|
-
dsh plugin --profile web add /绝对路径/dsh-free-model # 或从本仓目录装
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
安装后重启应用一次。`--profile` 填实际使用的 profile 名。
|
|
46
|
-
|
|
47
|
-
**DSHEAC AIO / 桌面端**:桌面端启动 web 前有一道 profile 闸门,只放行 dsh 自己在
|
|
48
|
-
`.dsh-module-fallback` 下生成的链接;profile 目录树里出现任何其它符号链接或 junction
|
|
49
|
-
会直接拒绝启动(`PROFILE_UPGRADE_REQUIRED`)。所以**不要用 `link:` 依赖、不要建 junction**,
|
|
50
|
-
用应用内插件管理器,或放一个真实目录:
|
|
51
|
-
|
|
52
|
-
1. 把仓库内容复制到 `<profile>/node_modules/dsh-free-model/`
|
|
53
|
-
(必需:`index.js`、`client.js`、`src/`、`vendor/channel-pack/`、`locale/`、`icon.svg`、
|
|
54
|
-
`cordis.patch.yml`、`package.json`;上游文档里的 `adapter/` 在本 fork 已不存在)
|
|
55
|
-
2. `dependencies` 里写 `"dsh-free-model": "2.1.0"`(跟随 `package.json` 的 `version`),不要写 `link:`
|
|
56
|
-
3. `dsh.profile.bundles` 末尾追加 `"dsh-free-model"`
|
|
57
|
-
|
|
58
|
-
> npm 包名是 `dsh-free-model`(与仓库同名);**loader 条目 id 仍是 `our-free-model`**
|
|
59
|
-
> (`cordis.patch.yml` 里的 `id:`),所以设置命名空间与状态目录 `~/.dsh/our-free-model/` 不随包名变化。
|
|
60
|
-
|
|
61
|
-
不要再往 `cordis.patch.yml` 加条目:被 `dsh.profile.bundles` 引用的包,其自带 patch 层会自动生效,
|
|
62
|
-
两处同时注册会报 `duplicate loader entry id: our-free-model`。
|
|
63
|
-
|
|
64
|
-
### 从上游版本切换过来
|
|
65
|
-
|
|
66
|
-
上游的包名是 `dsh-our-free-model`,本 fork 发布为 **`dsh-free-model`**,两者可以并存但不能同时注册
|
|
67
|
-
(loader 条目 id 都是 `our-free-model`,会报 `duplicate loader entry id`)。切换步骤:
|
|
68
|
-
|
|
69
|
-
```bash
|
|
70
|
-
dsh plugin --profile web remove dsh-our-free-model # 卸掉上游
|
|
71
|
-
dsh plugin --profile web add dsh-free-model # 装上 fork(npm)
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
**先备份 `~/.dsh/our-free-model/`**:账号与密钥在渠道包自己的凭据库里,目录名与条目 id 在本 fork 里**没变**,
|
|
75
|
-
所以切回来仍然是同一份配置。
|
|
76
|
-
|
|
77
|
-
> ⚠️ 覆盖安装的教训(2026-10-11 实测踩到):手工把 fork 拷进 `node_modules/<包名>/` 后,
|
|
78
|
-
> **只要在这个 profile 里再跑一次 `pnpm install`(插件管理器装/卸别的插件就会跑),
|
|
79
|
-
> 手工那份就会被按 lockfile 清掉或换回 registry 版**。长期固定就发 registry(本 fork 已发布 `dsh-free-model`)。
|
|
90
|
+
规模变化:`src/` 从 **58 个模块 → 5 个**(`store/key/chan-relay/egress/trust`),宿主 `index.js` 从
|
|
91
|
+
**2343 行 → 684 行**,浏览器半身 `client.js` 从 **5992 行 → 2531 行**,离线测试从 45 个套件 → **30 个**。
|
|
92
|
+
界面里所有 `animation` 与 `@keyframes` 也已删除。
|
|
80
93
|
|
|
81
94
|
## 配置
|
|
82
95
|
|
|
@@ -120,16 +133,16 @@ POST /chan-gateway/rotate 轮换中继密钥
|
|
|
120
133
|
|
|
121
134
|
## 安全
|
|
122
135
|
|
|
123
|
-
- **凭据**:账号 token
|
|
136
|
+
- **凭据**:账号 token 进渠道包自己的凭据目录(`~/.dsh/.credentials.yaml`,0600),页面永远拿不到明文;订阅地址按凭据对待,只在点「显示」时读取,常规 payload 里只有打码后的 host。
|
|
124
137
|
- **局域网中继是唯一对外监听**:默认关;开启后必须用独立的中继密钥(与本机网关密钥不通用)。**能连上这台机器的人都能消耗你的渠道额度**——只在可信网络启用,必要时用防火墙限制来源网段。
|
|
125
138
|
- **信任围栏**:插件路由优先级高于内核 `/api`,所以内置了与内核一致的准入检查——优先复用 composition 的 `connection` 服务,缺失时退回结构化围栏(Host 必须回环、拒绝跨站标记、Origin/Referer 必须同源)。
|
|
126
|
-
-
|
|
127
|
-
|
|
139
|
+
- **出网面审计**:见 [`SECURITY-AUDIT.md`](https://github.com/YpipaQ/dsh-free-model/blob/slim-channels-only/SECURITY-AUDIT.md)——**结论是直连各渠道厂商、无第三方中转、无遥测**;含 13 家域名与 TLS 证书主体、两处不带凭据的第三方调用、本地暴露面与已知风险。
|
|
140
|
+
复跑:`node scripts/egress-audit.mjs --tls`(只读,`--json` 出结构化结果)。
|
|
128
141
|
|
|
129
142
|
## 测试
|
|
130
143
|
|
|
131
144
|
```bash
|
|
132
|
-
npm test #
|
|
145
|
+
npm test # 30 个离线套件,无需网络、不花额度
|
|
133
146
|
node scripts/host-smoke-test.mjs # 只跑宿主 HTTP 面
|
|
134
147
|
node scripts/client-lint.mjs # 只跑浏览器半身(字典键一一对应 + CSS 规则可达)
|
|
135
148
|
```
|
|
@@ -137,11 +150,30 @@ node scripts/client-lint.mjs # 只跑浏览器半身(字典键一一
|
|
|
137
150
|
| 套件 | 覆盖 |
|
|
138
151
|
| --- | --- |
|
|
139
152
|
| `client-lint` | 浏览器半身:注册、双语字典键一一对应且无冗余、每条 CSS 规则可达、发出的 `ofm_*` 类都有定义 |
|
|
153
|
+
| `client-render` | 四个页面用宿主形状的 payload 真渲染一遍(终态树,防「引用了已删组件」) |
|
|
140
154
|
| `host-smoke` | 宿主 HTTP 面全量:四个页面的数据、出口校验、中继密钥生成/轮换/落盘、**被删路由必须 404** |
|
|
141
155
|
| `trust` / `chan-relay` / `egress` | 三个宿主模块各自的契约 |
|
|
142
|
-
| `channel-pack` / `channel-network` |
|
|
143
|
-
|
|
144
|
-
|
|
156
|
+
| `channel-pack` / `channel-network` | 渠道包挂载、十五个 provider 注册、积分、图片计价、代理与 OAuth 生命周期 |
|
|
157
|
+
| `channel-model-metadata` | 选择器读到的模型元数据:WorkBuddy 五档档位、Loomy `spark-x` 窗口(**远端与兜底两条路径都测**)、档位声明顺序与默认档不翻转 |
|
|
158
|
+
| `channel-catalog` / `channel-catalog-heal` | 目录落地广播、`got` 与 `complete` 分离、冷启动有界预热;以及**残缺目录能否自愈**(真装配适配器,先残缺后完整) |
|
|
159
|
+
| `channel-gateway-source` | 网关自造消息的 `source.kind` 落在 `dsh-llm` 的模块增强词汇表内(**真起网关 + 真 HTTP 请求**,从 `stream()` 入参读回合成消息) |
|
|
160
|
+
| `channel-cline-dev` | Cline 的 models.dev 目录:`Accept-Encoding: br, gzip`、ETag/条件请求、**304 回退成上次结果**(不许变空表)、超时 60s、`supportsImage: false` 保真 |
|
|
161
|
+
| `channel-officeace-lock` / `channel-officeace-login` | 移植渠道 OfficeAce:登录闭环真走 RPC(authorize URL → poll → 换 token → 落库);锁定分道的**判定与执行**逐条断言(未锁定逐字走旧路径、锁定+只剩永久桶必须抛错不回落)|
|
|
162
|
+
| `channel-accio` | 移植渠道 Accio:真走 RPC 完成回调式登录(授权页 → 本地回调 → 换 token → 按**账号 ref** 落库),并断言自动续期表覆盖 accio / officeace(漏一项 = 静默不续期且零日志)|
|
|
163
|
+
| `channel-buddy-conv` | WorkBuddy/CodeBuddy:`send()` 必发三枚非空 `X-Conversation-*`(缺则特定账号整条渠道 `400/11128` 全灭);渠道校验档换号、**不写冷却**、报 `PERMISSION_DENIED` 指向账号;单账号池不误报 `QUOTA_EXCEEDED`;11140 仍写冷却 |
|
|
164
|
+
| `channel-zcode-system-blocks` | ZCode `system` 数组恒 3 块(第 4 块 ⇒ 405+3012);调用方 system 走 messages |
|
|
165
|
+
| `channel-zcode-405` | ZCode `405` 恒不可重试(旧归 SERVER ⇒ 白重试 5 轮并累积账号冷却惩罚)|
|
|
166
|
+
| `channel-codearts-ua-codes` | CodeArts 推理 UA 覆盖(华为 WAF 按 `deepseek-harness/` 前缀拒发)+ 三业务码单列 |
|
|
167
|
+
| `channel-zcode-version-generation` | ZCode 版本 × 身份块必须同代(跨代即 405+3012,全量用户不可用)|
|
|
168
|
+
| `channel-cline-snapshot-suffix` | Cline 模型带日期/快照后缀时继承基底能力(否则图片能力/窗口丢失)|
|
|
169
|
+
| `channel-officeace-checkin` | OfficeAce 签到失败留痕 + 撤销占坑(否则本小时钉死、当天 1000 分白丢)|
|
|
170
|
+
| `channel-accio-rotate` | Accio 请求级账号轮换(402/429 换号+冷却、401 换号不冷却、400 不换号)|
|
|
171
|
+
| `channel-trae-image-order` | TRAE 多 tool_call 时工具结果图片必须排在全部 tool 之后(否则 4027 会话永久损坏)|
|
|
172
|
+
| `channel-catalog-refresh` | 模型上下架自适应(10 家 `refreshCatalog` + 30 分钟定时保鲜 + 失败保留旧目录)|
|
|
173
|
+
| `channel-credit-exhausted` / `channel-tool-args` / `channel-expiry-terminal` | 额度耗尽 14018 不按 1h 兜底 / 工具参数三分(掐断 vs 写坏)/ 续期落盘失败=终态(各家注入自己的错误类)|
|
|
174
|
+
| `channel-fingerprint` | 腾讯系内容指纹改写:assistant 正文那格一旦漏改,带毒历史每轮重放 ⇒ **会话报废且换任何腾讯系模型都一样**;白名单严格只有 buddy/workbuddy;良性文本不被破坏 |
|
|
175
|
+
|
|
176
|
+
上游的 45 个套件里,其余的都在测被删掉的车道,已一并移除。测试**只在仓库里跑**(npm 包不含 `scripts/`)。
|
|
145
177
|
|
|
146
178
|
## 渠道包
|
|
147
179
|
|
|
@@ -152,9 +184,57 @@ node scripts/client-lint.mjs # 只跑浏览器半身(字典键一一
|
|
|
152
184
|
npm run channel-pack # 从 vendor/channel-pack/src 重新打包(需要 esbuild)
|
|
153
185
|
```
|
|
154
186
|
|
|
155
|
-
来源、授权与改造说明见 `vendor/channel-pack/NOTICE.md
|
|
187
|
+
来源、授权与改造说明见 `vendor/channel-pack/NOTICE.md`;挂载时关闭了上游 OpenCode 账号接入。
|
|
188
|
+
|
|
189
|
+
## 出处与致谢
|
|
190
|
+
|
|
191
|
+
这个插件的两层来路不同,**都是别人的劳动**,这里如实写清。
|
|
192
|
+
|
|
193
|
+
### ① 宿主与整体形态:`Ebony-Vinyl/dsh-our-free-model`(fork 父仓库)
|
|
194
|
+
|
|
195
|
+
本仓库是它的精简 fork。**宿主半身、内置渠道包的改造、以及本 fork 沿用至今的目录结构都出自它**:
|
|
196
|
+
|
|
197
|
+
| 它做了什么 | 在哪 |
|
|
198
|
+
| --- | --- |
|
|
199
|
+
| 整个插件的原始实现(宿主 + 浏览器半身 + 渠道包挂载) | [`Ebony-Vinyl/dsh-our-free-model`](https://github.com/Ebony-Vinyl/dsh-our-free-model) |
|
|
200
|
+
| 把渠道包内置进 `vendor/`,并统一改名为 `channel-pack`(去掉上游代号) | 提交 `7bc8068`(2026-10-07,作者 Ebony-Vinyl)—— 本 fork 直接继承 |
|
|
201
|
+
| 在挂载时关闭上游 OpenCode 账号接入(本 fork 保留该开关) | 同上 |
|
|
202
|
+
| 许可与版权 | MIT,© 2026 **Ebony-Vinyl**(见本仓库 [`LICENSE`](https://github.com/YpipaQ/dsh-free-model/blob/slim-channels-only/LICENSE)) |
|
|
203
|
+
|
|
204
|
+
⚠️ 它**不是渠道与模型数据的数据源** —— 它自己没有固定节奏地从下面的真上游刷新那段副本,
|
|
205
|
+
所以我们查模型列表一律去 ②。
|
|
206
|
+
|
|
207
|
+
宿主半身(`index.js` / `client.js` / `src/*.js`)的**骨架出自它** —— 那是本 fork 的起点。
|
|
208
|
+
⚠️ **截至当前版本,我们还没有从它的 2.2/2.3 取过宿主侧修复**:那些改动集中在
|
|
209
|
+
被本 fork 删掉的车道与页面上(免费车道、EAC、桌面壳、插件升级页),取不进来。
|
|
210
|
+
将来若它有落在**保留车道**上的宿主修复,按「改动即回写」的规矩单独移植。
|
|
211
|
+
|
|
212
|
+
另外,有一处**两条上游给了不同答案**的地方值得说明:网关自造消息的来源身份,父仓库用
|
|
213
|
+
`{ kind: 'plugin:dsh-openai-gateway' }`,而 gitee 上游用「裸 `kind` + `declare module` 增强」。
|
|
214
|
+
本 fork **采用了后者** —— 因为 `dsh-llm` 0.2 已删掉共享的 `plugin` 包装
|
|
215
|
+
(原文「no shared catch-all `plugin` kind」),且全仓约 20 处 `MessageSourceMap` 增强
|
|
216
|
+
一律是裸 kebab-case,**没有任何 `plugin:` 前缀先例**。判断依据与实测见
|
|
217
|
+
`vendor/channel-pack/src/openai-gateway/messages.ts` 的注释。
|
|
218
|
+
|
|
219
|
+
### ② 渠道与模型数据:`Jet` 的渠道包(真上游)
|
|
220
|
+
|
|
221
|
+
`vendor/channel-pack/` 里**十五个账号渠道的登录、账号池、凭据续期、积分领取、
|
|
222
|
+
模型黑名单与 OpenAI 网关**全部出自同一个上游项目 —— 那才是本插件真正的价值所在:
|
|
223
|
+
|
|
224
|
+
- **Gitee 仓库**:`iJetLi/deepseek-harness-codearts`(上游现已更名为 **`dsh-providers-hub`**)
|
|
225
|
+
- **作者**:**Jet**(`iJetLi`)
|
|
226
|
+
- **许可与版权**:MIT,© 2026 **Jet**(见 `vendor/channel-pack/LICENSE`)
|
|
227
|
+
- 本 fork 吸收的提交:`345f0a07b22713c0ae189ca7d8b97ec4f64626c6`(2026-10-06),出处与再构建步骤见 `vendor/channel-pack/NOTICE.md`
|
|
228
|
+
|
|
229
|
+
我们在这个副本上做的是**外科手术式跟进**:当前版本的模型档位、`spark-x` 上下文窗口、
|
|
230
|
+
档位展示顺序,以及目录完整性/广播/冷启动预热,都是逐条对齐 Jet 上游的实测结论移植过来的
|
|
231
|
+
(每条改动的依据都写在对应源码注释里)。**没有他这份实现,这个插件不存在。**
|
|
232
|
+
|
|
233
|
+
也谢谢 fork 父仓库与真上游的其它贡献者:两边都是多人协作的项目,
|
|
234
|
+
`git log` 里那些实测记录(浏览器抓包、真实账号复测、错误码归因)才是这些渠道能跑通的真正原因。
|
|
156
235
|
|
|
157
236
|
## 许可
|
|
158
237
|
|
|
159
|
-
本仓库 MIT(见 `LICENSE
|
|
238
|
+
本仓库 MIT(见 [`LICENSE`](https://github.com/YpipaQ/dsh-free-model/blob/slim-channels-only/LICENSE));
|
|
239
|
+
渠道包部分见 `vendor/channel-pack/LICENSE`(© Jet)与 `NOTICE.md`。
|
|
160
240
|
所有渠道账号、额度与积分规则归各提供商所有,请遵守各自的服务条款。
|
package/README_EN.md
CHANGED
|
@@ -1,14 +1,73 @@
|
|
|
1
|
-
# Model Access (
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
>
|
|
10
|
-
>
|
|
11
|
-
>
|
|
1
|
+
# Model Access (dsh-free-model)
|
|
2
|
+
|
|
3
|
+
**A DSH plugin** (DeepSeek Harness · cordis bundle) · [中文](https://github.com/YpipaQ/dsh-free-model/blob/slim-channels-only/README.md)
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/dsh-free-model)
|
|
6
|
+
[](#)
|
|
7
|
+
[](https://github.com/YpipaQ/dsh-free-model/blob/slim-channels-only/LICENSE)
|
|
8
|
+
|
|
9
|
+
> A trimmed fork of [`Ebony-Vinyl/dsh-our-free-model`](https://github.com/Ebony-Vinyl/dsh-our-free-model) **2.1.0** (commit `7e3a1da`).
|
|
10
|
+
> One lane survives: **bring your own account channels** — fifteen providers, plus a token dashboard,
|
|
11
|
+
> a per-request log and a local gateway. Upstream's anonymous free lane, the EAC co-paid lane, the
|
|
12
|
+
> aggregate lane, the token savers, the routing chains and the whole release/update channel are gone.
|
|
13
|
+
>
|
|
14
|
+
> ⚠️ The fork parent is **already at 2.3.0**, but nearly all of its later work sits in the lanes this fork
|
|
15
|
+
> deletes; **channel and model data come from the true upstream** (see "Credits and provenance" below).
|
|
16
|
+
|
|
17
|
+
| | |
|
|
18
|
+
| --- | --- |
|
|
19
|
+
| npm | **`dsh-free-model`** (same as the repository) |
|
|
20
|
+
| Settings entry | **模型接入** in Chinese, **Model Access** in English |
|
|
21
|
+
| Loader entry id | `our-free-model` — the settings namespace and the state directory hang off this id, so they do **not** move when the package name changes |
|
|
22
|
+
| State directory | `~/.dsh/our-free-model/` (0600) |
|
|
23
|
+
|
|
24
|
+
## Install
|
|
25
|
+
|
|
26
|
+
**CLI (plain dsh web) — recommended**
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
dsh plugin --profile web add dsh-free-model
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Then **restart dsh once**: the host half lives inside the process, so only a restart loads the new
|
|
33
|
+
`index.js`; the browser half just needs a page refresh. `--profile` takes the profile you actually use
|
|
34
|
+
(`web` by default).
|
|
35
|
+
|
|
36
|
+
**Desktop (DSHEAC AIO)**: install through the **in-app plugin manager**. The desktop build gates the
|
|
37
|
+
profile before booting web — it only lets through links dsh itself created under `.dsh-module-fallback`,
|
|
38
|
+
and any other symlink or junction in the profile tree makes it refuse to start
|
|
39
|
+
(`PROFILE_UPGRADE_REQUIRED`). So **do not use `link:` dependencies and do not hand-make junctions**.
|
|
40
|
+
|
|
41
|
+
**Switching from upstream**: upstream publishes as `dsh-our-free-model`. Both packages use the loader
|
|
42
|
+
entry id `our-free-model`, so they **cannot be installed at the same time**:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
dsh plugin --profile web remove dsh-our-free-model
|
|
46
|
+
dsh plugin --profile web add dsh-free-model
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
The state directory and the entry id are unchanged in this fork, so **accounts, credentials and the
|
|
50
|
+
outlet address survive the switch**.
|
|
51
|
+
|
|
52
|
+
**Uninstall / roll back**
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
dsh plugin --profile web remove dsh-free-model # uninstall
|
|
56
|
+
dsh plugin --profile web add dsh-our-free-model # roll back to upstream 2.1.0
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
> ⚠️ **Do not copy the checkout into `node_modules/<package>/` by hand.** Measured on 2026-10-11: such a
|
|
60
|
+
> copy is replaced from the lockfile — or pruned outright — by the next `pnpm install` the plugin manager
|
|
61
|
+
> runs (installing or removing *any* other plugin triggers one). To pin it long-term, use the registry
|
|
62
|
+
> (this package) or a `file:` dependency on a CLI web profile.
|
|
63
|
+
|
|
64
|
+
## Quick start
|
|
65
|
+
|
|
66
|
+
1. After the restart open **Settings → 模型接入 / Model Access** and log into each channel you want
|
|
67
|
+
(browser authorization; the account pool and credit lookups live on the same card).
|
|
68
|
+
2. Every channel card lets you switch models on and off one by one, plus **show all / hide all** —
|
|
69
|
+
**they may all start hidden**, and hidden models never reach the model picker.
|
|
70
|
+
3. Back in the chat composer's model picker the channel models appear grouped per product; pick one.
|
|
12
71
|
|
|
13
72
|
## What survives
|
|
14
73
|
|
|
@@ -16,7 +75,7 @@ Four settings pages (down from nine):
|
|
|
16
75
|
|
|
17
76
|
| Page | What it does |
|
|
18
77
|
| --- | --- |
|
|
19
|
-
| **Free channels** |
|
|
78
|
+
| **Free channels** | Fifteen account cards — CodeArts, CodeBuddy / WorkBuddy (CN + intl), LobsterAI, Qoder / Qoder CN, TRAE, Cline, Loomy, Raccoon, MiniMax Code, ZCode, Gemini, **OfficeAce** (Huawei Cloud ModelArts, cloud-direct, no client install) and **Accio Work** (Alibaba, standard OAuth + PKCE, IDE-free): browser login, account pool, renewal, credit lookup and one-click claim, daily auto check-in, per-model switches, balance. |
|
|
20
79
|
| **Dashboard** | The pack's own per-request token ledger: today / all-time usage, average throughput, TTFT, cache hit rate, success rate, account pivot, per-model table. |
|
|
21
80
|
| **Request log** | Every request in detail: result, duration, TTFT, speed, token breakdown; hover a failed row for the reason. |
|
|
22
81
|
| **Gateway** | The pack's local OpenAI-compatible gateway (switch, endpoint, key, model count), this plugin's LAN relay (bind address/port, its own key, rotation), and the egress-outlet section. |
|
|
@@ -34,38 +93,161 @@ Four settings pages (down from nine):
|
|
|
34
93
|
| Local forward listener (18899) and the LAN forward | They forwarded the deleted lane. |
|
|
35
94
|
| `packages/standalone/`, `worker/`, `feed/`, `catalog/` | All three satellite products `import` the deleted lane; keeping them means shipping code that can never run. |
|
|
36
95
|
|
|
37
|
-
Sizes: `src/` went from **58 modules to 5
|
|
38
|
-
|
|
96
|
+
Sizes: `src/` went from **58 modules to 5** (`store/key/chan-relay/egress/trust`), the host `index.js`
|
|
97
|
+
from **2343 to 684 lines**, the browser half `client.js` from **5992 to 2538 lines**, and the offline
|
|
98
|
+
suites from 45 to **30**. Every `animation` and `@keyframes` rule is gone as well.
|
|
39
99
|
|
|
40
|
-
##
|
|
100
|
+
## Configuration
|
|
41
101
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
102
|
+
The only state file is `~/.dsh/our-free-model/settings.json` (0600); this fork reads three keys:
|
|
103
|
+
|
|
104
|
+
```json
|
|
105
|
+
{
|
|
106
|
+
"egress": {
|
|
107
|
+
"enabled": false,
|
|
108
|
+
"mode": "subscription",
|
|
109
|
+
"url": "",
|
|
110
|
+
"mihomoPath": ""
|
|
111
|
+
},
|
|
112
|
+
"chanGateway": {
|
|
113
|
+
"relay": { "enabled": false, "host": "127.0.0.1", "port": 18326, "key": "" }
|
|
114
|
+
}
|
|
115
|
+
}
|
|
45
116
|
```
|
|
46
117
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
`dependencies`, and append `"dsh-free-model"` to `dsh.profile.bundles`.
|
|
51
|
-
The loader entry id stays `our-free-model` (`id:` in `cordis.patch.yml`), so the settings
|
|
52
|
-
namespace and the state directory `~/.dsh/our-free-model/` are unaffected by the package name.
|
|
118
|
+
Other keys written by 2.1.0 (`enabled`, `forward`, `tokenSaver`, `aggregate`, `combos`,
|
|
119
|
+
`announcementsAcked`, …) are preserved but inert — `JsonStore` merges the file over the defaults, so
|
|
120
|
+
your outlet address and relay key survive an upgrade.
|
|
53
121
|
|
|
54
|
-
|
|
122
|
+
### HTTP surface
|
|
55
123
|
|
|
56
|
-
|
|
124
|
+
Everything goes through the trust fence, under `/api/our-free-model`:
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
GET /summary the document the four pages read (settings.egress / channels / version / outlet)
|
|
128
|
+
GET /outlet current outlet node and latency (a reading; failure is just a missing reading)
|
|
129
|
+
GET /egress/url the subscription URL itself — read only when the page asks to show/copy it
|
|
130
|
+
POST /settings accepts the egress section only
|
|
131
|
+
GET /chan-gateway relay and gateway state (never the keys)
|
|
132
|
+
POST /chan-gateway/apply change bind address/port
|
|
133
|
+
GET /chan-gateway/key the relay key, on demand
|
|
134
|
+
POST /chan-gateway/rotate rotate the relay key
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
The dashboard and the request log **do not** go through here: the pack owns the per-request ledger and
|
|
138
|
+
the browser half talks to it over the shell's `connection` RPC (`usage.tokenLedger` /
|
|
139
|
+
`usage.tokenLedgerHistory`).
|
|
57
140
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
141
|
+
## Security
|
|
142
|
+
|
|
143
|
+
- **Credentials**: account tokens live in the pack's own credential store (`~/.dsh/.credentials.yaml`, 0600); the page never sees plaintext. The subscription URL is treated as a credential and read only when you ask to display it — ordinary payloads carry a masked host.
|
|
144
|
+
- **The LAN relay is the only listener facing outward**: off by default; when on it requires its own relay key (not shared with the local gateway key). **Anyone who can reach this machine can spend your channel quota** — enable it only on a trusted network, and firewall the source range if in doubt.
|
|
145
|
+
- **Trust fence**: the plugin's routes outrank the kernel's `/api`, so it carries the same admission check as the kernel — it reuses the composition's `connection` service when present, and otherwise falls back to a structural fence (loopback `Host`, no cross-site marker, same-origin `Origin`/`Referer`).
|
|
146
|
+
- **Egress audit**: see [`SECURITY-AUDIT.md`](https://github.com/YpipaQ/dsh-free-model/blob/slim-channels-only/SECURITY-AUDIT.md) — the verdict is **direct to each provider, no third-party relay, no telemetry**; it lists the fifteen providers' hosts with their TLS certificate subjects, the two non-vendor calls that carry no credentials, the local surface and the known risks. Re-run it with `node scripts/egress-audit.mjs --tls` (read-only; `--json` for machine output).
|
|
147
|
+
|
|
148
|
+
## Tests
|
|
61
149
|
|
|
62
150
|
```bash
|
|
63
|
-
npm test
|
|
64
|
-
node scripts/host-smoke-test.mjs
|
|
65
|
-
node scripts/client-lint.mjs
|
|
151
|
+
npm test # 30 offline suites: no network, no quota
|
|
152
|
+
node scripts/host-smoke-test.mjs # the host HTTP surface only
|
|
153
|
+
node scripts/client-lint.mjs # the browser half only (dictionary keys, CSS reachability)
|
|
66
154
|
```
|
|
67
155
|
|
|
156
|
+
| Suite | Covers |
|
|
157
|
+
| --- | --- |
|
|
158
|
+
| `client-lint` | Browser half: registration, the two dictionaries agree key-for-key with no extras, every CSS rule is reachable, every emitted `ofm_*` class is defined |
|
|
159
|
+
| `client-render` | The four pages rendered for real against host-shaped payloads (catches references to deleted components) |
|
|
160
|
+
| `host-smoke` | The whole host HTTP surface: the four pages' data, outlet validation, relay key minting/rotation/persistence, **and that deleted routes 404** |
|
|
161
|
+
| `trust` / `chan-relay` / `egress` | Each host module's own contract |
|
|
162
|
+
| `channel-pack` / `channel-network` | Pack mounting, fifteen provider registrations, credits, image pricing, proxy and OAuth lifecycles |
|
|
163
|
+
| `channel-model-metadata` | The model metadata the picker reads: WorkBuddy's five efforts, Loomy `spark-x`'s window (**both the remote and fallback paths**), and the declared effort order with a default that must not flip |
|
|
164
|
+
| `channel-catalog` / `channel-catalog-heal` | Catalog-landing broadcast, `got` vs `complete`, bounded cold-start prewarm, and whether a **partial catalog heals** (real adapter, partial then complete) |
|
|
165
|
+
| `channel-gateway-source` | The gateway's synthesized messages carry a `source.kind` inside `dsh-llm`'s module-augmented vocabulary (**real gateway + real HTTP request**, read back from the `stream()` argument) |
|
|
166
|
+
| `channel-cline-dev` | Cline's models.dev catalog: `Accept-Encoding: br, gzip`, ETag conditional requests, **304 falling back to the previous result** (never an empty catalog), 60s timeout, and `supportsImage: false` preserved |
|
|
167
|
+
| `channel-officeace-lock` / `channel-officeace-login` | The ported OfficeAce channel: the login loop really goes through RPC (authorize URL → poll → token → persisted); the lock **decision and its execution** are asserted case by case (unlocked keeps the old path verbatim, locked-with-only-permanent must throw and never fall back to the pool) |
|
|
168
|
+
| `channel-accio` | The ported Accio channel: a callback-style login really goes through RPC (authorize page → local callback → token exchange → persisted under the **account's own ref**), plus the auto-renew table is asserted to cover accio / officeace (a missing entry = silently never renewed, with no log) |
|
|
169
|
+
| `channel-buddy-conv` | WorkBuddy/CodeBuddy: `send()` must emit three non-empty `X-Conversation-*` headers (without them, certain accounts get the whole channel dead on `400/11128` every turn); the channel-verification tier rotates accounts, **writes no cooldown**, and reports `PERMISSION_DENIED` pointing at the account; a single-account pool must not misreport `QUOTA_EXCEEDED`; 11140 still writes its cooldown |
|
|
170
|
+
| `channel-zcode-system-blocks` | ZCode's `system` array must stay at exactly 3 blocks (a 4th one ⇒ 405+3012); caller system goes into messages |
|
|
171
|
+
| `channel-zcode-405` | ZCode `405` is never retryable (classifying it as SERVER caused 5 pointless retries plus account-cooldown penalties) |
|
|
172
|
+
| `channel-codearts-ua-codes` | CodeArts inference UA override (Huawei WAF rejects the `deepseek-harness/` prefix) + three business codes classified separately |
|
|
173
|
+
| `channel-zcode-version-generation` | ZCode version and identity block must be the same generation (cross-generation means 405+3012 for every user) |
|
|
174
|
+
| `channel-cline-snapshot-suffix` | Cline models with date/snapshot suffixes inherit the base model's capabilities (otherwise image support and context window are lost) |
|
|
175
|
+
| `channel-officeace-checkin` | OfficeAce daily check-in: failures must log and release the hourly slot (otherwise the hour is pinned and the day's 1000 points are lost) |
|
|
176
|
+
| `channel-accio-rotate` | Accio per-request account rotation (402/429 rotate+cooldown, 401 rotate *without* cooldown, 400 does not rotate) |
|
|
177
|
+
| `channel-trae-image-order` | TRAE: tool-result images must come after all `tool` messages (otherwise 4027 permanently breaks the session) |
|
|
178
|
+
| `channel-catalog-refresh` | Model catalogue self-refresh (10 adapters expose `refreshCatalog`, a 30-minute timer keeps it fresh, failures keep the old catalogue) |
|
|
179
|
+
| `channel-credit-exhausted` / `channel-tool-args` / `channel-expiry-terminal` | 14018 credit exhaustion must not fall back to 1h / tool args triage (truncated vs invalid) / save-failure after a successful refresh is terminal, with per-provider error classes |
|
|
180
|
+
| `channel-fingerprint` | Tencent content-fingerprint rewriting: missing the assistant-body case means a poisoned history replays every turn — the session is dead **and switching to any other Tencent model does not help**; the allowlist is exactly buddy/workbuddy; benign text is left intact |
|
|
181
|
+
|
|
182
|
+
The other 37 of upstream's 45 suites tested lanes this fork deletes. The suites run **from a checkout
|
|
183
|
+
only** — the npm package does not ship `scripts/`.
|
|
184
|
+
|
|
185
|
+
## The channel pack
|
|
186
|
+
|
|
187
|
+
`vendor/channel-pack/` is a complete sub-project (its own `package.json`, TypeScript sources, tests and
|
|
188
|
+
build script); `pack.js` is its bundle:
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
npm run channel-pack # rebuild from vendor/channel-pack/src (needs esbuild)
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Provenance, licence and what was changed are in `vendor/channel-pack/NOTICE.md`; OpenCode account
|
|
195
|
+
access is switched off when the pack mounts.
|
|
196
|
+
|
|
197
|
+
## Credits and provenance
|
|
198
|
+
|
|
199
|
+
This plugin has two distinct lineages, and **both are other people's work**. Stated plainly here.
|
|
200
|
+
|
|
201
|
+
### ① The host and the overall shape: `Ebony-Vinyl/dsh-our-free-model` (the fork parent)
|
|
202
|
+
|
|
203
|
+
This repository is a trimmed fork of it. **The host half, the vendoring of the channel pack, and the
|
|
204
|
+
directory layout this fork still uses all come from there:**
|
|
205
|
+
|
|
206
|
+
| What it did | Where |
|
|
207
|
+
| --- | --- |
|
|
208
|
+
| The original plugin implementation (host + browser half + pack mounting) | [`Ebony-Vinyl/dsh-our-free-model`](https://github.com/Ebony-Vinyl/dsh-our-free-model) |
|
|
209
|
+
| Vendored the pack into `vendor/` and renamed it to `channel-pack` (dropping the upstream codename) | commit `7bc8068` (2026-10-07, by Ebony-Vinyl) — inherited verbatim by this fork |
|
|
210
|
+
| Switched off upstream OpenCode account access when mounting (this fork keeps that switch) | same commit |
|
|
211
|
+
| Licence and copyright | MIT, © 2026 **Ebony-Vinyl** (see this repo's [`LICENSE`](https://github.com/YpipaQ/dsh-free-model/blob/slim-channels-only/LICENSE)) |
|
|
212
|
+
|
|
213
|
+
⚠️ It is **not the data source for channels or model data** — it does not refresh that vendored copy
|
|
214
|
+
from the true upstream below on any fixed cadence, so model lists are always checked against ②.
|
|
215
|
+
|
|
216
|
+
The **host half's skeleton** (`index.js` / `client.js` / `src/*.js`) is its work — that is this fork's
|
|
217
|
+
starting point. ⚠️ **As of this version we have taken no host-side fixes from its 2.2/2.3**: those
|
|
218
|
+
changes sit in lanes and pages this fork deletes (free lane, EAC, the desktop shell, the plugin-upgrade
|
|
219
|
+
page), so they do not port. If it later lands a host fix in a lane we keep, we port it on its own.
|
|
220
|
+
|
|
221
|
+
One place where the **two upstreams disagree** is worth naming: for the gateway's own message
|
|
222
|
+
source identity, the parent uses `{ kind: 'plugin:dsh-openai-gateway' }` while the gitee upstream uses
|
|
223
|
+
a bare `kind` plus a `declare module` augmentation. This fork **chose the latter** — `dsh-llm` 0.2
|
|
224
|
+
deleted the shared `plugin` wrapper (verbatim: "no shared catch-all `plugin` kind"), and all ~20
|
|
225
|
+
`MessageSourceMap` augmentations in the harness use bare kebab-case with **no `plugin:` prefix
|
|
226
|
+
precedent**. The reasoning and the measurements are in the
|
|
227
|
+
`vendor/channel-pack/src/openai-gateway/messages.ts` comments.
|
|
228
|
+
|
|
229
|
+
### ② Channel and model data: Jet's channel pack (the true upstream)
|
|
230
|
+
|
|
231
|
+
Everything in `vendor/channel-pack/` — **the fifteen account channels' login, account pools,
|
|
232
|
+
credential renewal, credit claiming, model blacklists and the OpenAI gateway** — comes from one
|
|
233
|
+
upstream project. That is where this plugin's actual value lives:
|
|
234
|
+
|
|
235
|
+
- **Gitee repository**: `iJetLi/deepseek-harness-codearts` (upstream has since renamed it to **`dsh-providers-hub`**)
|
|
236
|
+
- **Author**: **Jet** (`iJetLi`)
|
|
237
|
+
- **Licence and copyright**: MIT, © 2026 **Jet** (see `vendor/channel-pack/LICENSE`)
|
|
238
|
+
- Commit absorbed by this fork: `345f0a07b22713c0ae189ca7d8b97ec4f64626c6` (2026-10-06); provenance and rebuild steps are in `vendor/channel-pack/NOTICE.md`
|
|
239
|
+
|
|
240
|
+
What we do on top is **surgical catch-up**: the current model efforts, the `spark-x` context window,
|
|
241
|
+
the declared effort order, and the catalog completeness/broadcast/prewarm work were all ported by
|
|
242
|
+
following Jet's measured findings one by one (the evidence for each change is in the source comments).
|
|
243
|
+
**Without his implementation, this plugin would not exist.**
|
|
244
|
+
|
|
245
|
+
Thanks too to the other contributors on both sides: these are multi-person projects, and the measured
|
|
246
|
+
records in their `git log` (browser captures, real-account retests, error-code attribution) are the
|
|
247
|
+
real reason these channels work at all.
|
|
248
|
+
|
|
68
249
|
## License
|
|
69
250
|
|
|
70
|
-
|
|
71
|
-
|
|
251
|
+
This repository is MIT (see [`LICENSE`](https://github.com/YpipaQ/dsh-free-model/blob/slim-channels-only/LICENSE));
|
|
252
|
+
the vendored channel pack is covered by `vendor/channel-pack/LICENSE` (© Jet) and `NOTICE.md`. All channel
|
|
253
|
+
accounts, quotas and credit rules belong to their providers — follow their terms of service.
|
package/SECURITY-AUDIT.md
CHANGED
|
@@ -10,15 +10,20 @@
|
|
|
10
10
|
|
|
11
11
|
| 文件 | sha256 |
|
|
12
12
|
| --- | --- |
|
|
13
|
-
| `index.js` | `
|
|
14
|
-
| `client.js` | `
|
|
15
|
-
| `vendor/channel-pack/pack.js` | `
|
|
13
|
+
| `index.js` | `a932bcb6bdeef608496071a60d1f9e8499997fca52765e0eb300171d8728aa57` |
|
|
14
|
+
| `client.js` | `13332f9b4102e5cc7125998983126df7b50cfa6a32ef5e20aefc51aca0a5e820` |
|
|
15
|
+
| `vendor/channel-pack/pack.js` | `9255642fdaf064b11e0f1e233b0d771419515e8803dbe0e173c0cb6a9f76bfba` |
|
|
16
|
+
|
|
17
|
+
⚠️ `pack.js` 的指纹随每次「刷新模型数据 / 移植上游修复」而变(它是构建产物)。
|
|
18
|
+
上面的值对应**上游跟进第二批(2026-11-09:codearts UA/业务码 + zcode 3.17 身份块 + 第四条指纹 + cline 快照后缀)之后**的版本;
|
|
19
|
+
域名面结论未变,`scripts/egress-audit.mjs` 可随时重跑复验。
|
|
20
|
+
(上一版 `b1d9d582…` 是目录自适应 + 12 项修复后的产物。)
|
|
16
21
|
|
|
17
22
|
## 结论
|
|
18
23
|
|
|
19
24
|
**是直连对应服务提供商。** 全部业务出网都是 HTTPS 到厂商自家域名,TLS 证书主体为厂商本人;**没有第三方中转、没有回传作者服务器、没有遥测**。仅有两处外部辅助调用(模型能力元数据、出口 IP 探测),都不携带账号凭据。
|
|
20
25
|
|
|
21
|
-
## 一、
|
|
26
|
+
## 一、15 个渠道的出网域名与证书主体
|
|
22
27
|
|
|
23
28
|
下表"证书主体"取自**本机直连握手**(域名 → TLS 证书的 Subject/Issuer),用来证明流量终点不是中间人。
|
|
24
29
|
|
|
@@ -35,6 +40,8 @@
|
|
|
35
40
|
| MiniMax Code | `agent.minimax.cn`、`account.minimax.cn` | `*.minimax.cn`(DNSPod DV) |
|
|
36
41
|
| ZCode(智谱 z.ai) | `zcode.z.ai`、`api.z.ai`、`chat.z.ai` | `*.z.ai`(Sectigo DV) |
|
|
37
42
|
| Gemini(Google) | `daily-cloudcode-pa.googleapis.com`、`daily-cloudcode-pa.sandbox.googleapis.com`、`www.googleapis.com`、`oauth2.googleapis.com`、`accounts.google.com` | Google(**本机直连不通**,需代理才能握手;域名与用途由源码与官方 SDK 对齐) |
|
|
43
|
+
| Accio Work(阿里,2026-10-15 移植) | `phoenix-gw.alibaba.com`(gateway,两区域同一个)、登录页 `www.accio-ai.com`(国际)/ `zh.accio.com`(中国) | `*.alibaba.com` / `*.accio-ai.com` / `*.accio.com`,签发方 GlobalSign **OV**(已验证组织身份)—— 网关证书主体即 `*.alibaba.com`,直接证明流量终点是阿里本身而非中间人 |
|
|
44
|
+
| OfficeAce(华为云 ModelArts MaaS,2026-10-15 移植) | `officeace.cn-southwest-2.huaweicloud-agentarts.com`、`agentarts.cn-southwest-2.myhuaweicloud.com`、`api.modelarts-maas.com`;登录复用 `auth.huaweicloud.com` + `sts.cn-north-4.myhuaweicloud.com`(与 CodeArts 同两家) | `*.cn-southwest-2.huaweicloud-agentarts.com` / `*.cn-southwest-2.myhuaweicloud.com` / `*.modelarts-maas.com`,签发方均为 GlobalSign RSA OV(OV = 已验证组织身份,与华为云其余端点同一 CA 策略) |
|
|
38
45
|
|
|
39
46
|
## 二、仅有的外部(非厂商)调用
|
|
40
47
|
|
|
@@ -81,7 +88,7 @@
|
|
|
81
88
|
- **产物有、源码无**:只有 `github.com`(注释里的参考仓库)与 WHATWG/W3C/IETF 规范链接(错误信息格式化用)。
|
|
82
89
|
- **源码有、产物无**:`www.codebuddy.cn`(仅登录页常量 `WEBSITE_HOME`,源码里未被引用,被 tree-shake)、`blog.csdn.net`/`bigmodel.cn`(注释)。
|
|
83
90
|
|
|
84
|
-
这一步只能证明**域名面**一致,加上行为套件(
|
|
91
|
+
这一步只能证明**域名面**一致,加上行为套件(15 家注册、无 OpenCode 预热、RPC 失败关闭)。**不能从字节上证明 `pack.js` 与源码逐行等价**。
|
|
85
92
|
|
|
86
93
|
## 七、边界与已知风险(要知情)
|
|
87
94
|
|