[Bug] 远程容器 attached 模式:容器侧 zcode-server 所有模型请求被风控拒绝(3007 captcha verify failed),同账号同 IP 本地/WSL 均正常
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 22
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
提交前确认 · Pre-submission checklist
- 我已搜索过现有 issue,确认这不是重复 / I searched existing issues and confirmed this isn't a duplicate.(相关但不同:#68 是代理环境下的 Connect Timeout;本条是无代理直连下被服务端风控拒绝)
问题类别 · Category
其他 / 不确定 · Other / Not sure
涉及的 Agent 框架 · Agent framework
ZCode Agent(自研)
严重程度 · Severity
阻塞使用 · Blocking(远程容器工作区完全无法使用模型)
复现频率 · Reproducibility
必现 · Always(且跨版本必现:旧版与 3.11.2 的 zcode-server 均复现)
环境信息 · Environment
- 本地:Windows 11,ZCode 桌面版 3.11.2,无任何代理,网络位于杭州(国内直连)
- 远程:DevContainer(Docker Desktop / WSL2 后端,镜像
ros2-yolo26:v3,--network host,容器与宿主共享/home/user,容器内用户 uid 1000 与宿主一致) - 账号:GLM Coding Plan(builtin:zai-start-plan),模型 GLM-5.3-Flash,baseURL
https://zcode.z.ai/api/v1/zcode-plan/anthropic
问题描述 · Description
通过 Windows ZCode 远程连接 DevContainer 后,容器侧 zcode-server 发起的所有模型请求 100% 被服务端风控拒绝,从接入后的第一次请求(turnNumber 0)就开始:
status=400 providerCode=3007 statusMessage="captcha verify failed"
reason=auth_failed retryable=false
会话从始至终没有一次成功的模型请求。
横向对照(同一账号、同一时间、同一出口 IP):
| 场景 | 结果 |
|---|---|
| Windows 桌面端打开本地文件夹对话 | ✅ 正常 |
| 同机 WSL 桌面端(旧版本客户端)远程会话 | ✅ 持续正常 |
| 浏览器登录 chat.z.ai 对话 | ✅ 正常 |
| 远程容器 attached 模式 | ❌ 100% 返回 3007 |
即:风控仅拒绝容器侧 zcode-server 进程发出的请求,且跨客户端版本长期如此。
已完成的排查(供维护者省时)· Diagnostics done
- DNS/边缘节点:宿主与容器解析
zcode.z.ai结果完全一致(同 4 个 IP),响应头via显示走相同的 ESA 边缘链路——排除解析差异。 - TLS/网络连通性:容器内
curl https://zcode.z.ai/api.z.ai握手正常(TLS verify 通过)——排除证书与连通性问题。 - 社区 hosts 方案(
0.0.0.0 cloudauth-device-pre.aliyuncs.com,解决验证码 SDK 超时):已在 Windows hosts 与容器/etc/hosts(--add-host)同时生效并经ping/getent验证——对该 3007 无效。 - 重新登录刷新设备凭证:退出重登后,客户端尝试发起验证码交互,但在远程 attached 模式下验证码 UI 无法启动,报:
即:服务端要求过验证码 ↔ 客户端在远程模式下无法弹出验证码,形成死循环。captcha_edit_not_accepted:rejected:guard.actionUnavailable - 设备指纹对齐:将容器
/etc/machine-id与受信任的宿主机对齐后重启 server 进程——无变化。 - 全链路无代理环境变量;容器 TZ 已设置。
根因推测 · Suspected cause
容器侧 server 进程的请求指纹(无头 Node UA + 容器临时设备身份,如 hostname docker-desktop、每次重建随机 MAC 等)被 WAF 风控判定为机器人并下发人机验证;而验证码挑战在两条路径上都无法完成:
- 容器内 headless 进程无法执行 JS 挑战;
- 桌面端在 remote-attached 模式下验证码 guard action 不可用。
证据(请求追踪 ID)· Trace IDs
providerCode=3007 "captcha verify failed" HTTP 400
request: e492c9eb-c4fb-4df2-8d29-13d2b790d0ff (17:01 首次失败)
request: b5294f11-dddc-41dd-9e04-00e57bca690e (17:27 hosts 修复后仍失败)
eagleid: 71d7e61e17886852809485400e
x-request-id: 20260906090120963e4783c91577d5c5d9
期望 · Expectation
远程容器/SSH attached 模式下的模型请求应具备以下之一:
- 复用桌面端已信任的设备凭证/网络上下文发起请求(而非远程 server 直接裸 fetch);
- 风控挑战可经由桌面端 UI 或浏览器接力完成;
- 或对 remote server 流量提供风控白名单机制。
关联 issue · Related
- #68(同族:远程 server 直接发起网络请求、脱离桌面端网络上下文)
- #349(阿里云验证码 SDK 问题)
- zai-org/GLM-5#59、zai-org/GLM-5#89(验证码服务相关)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure in the DevContainer attached mode at the zcode-server model-request entry point, comparing it with the working desktop and WSL paths. Trace how the remote server handles the captcha challenge and device credentials; done means remote requests can complete authentication without returning provider code 3007.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, node.js
- Domain
- authentication, infrastructure, security
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100