From 073e0c5f83b6eb4afe88524bf9531897550f9342 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=80=A7=E9=A9=8A?= Date: Sun, 22 Nov 2026 13:05:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=BA=E6=9C=8D=E5=99=A8=E7=9A=84=20docker-s?= =?UTF-8?q?ocket-proxy=20=E5=A4=9A=E9=96=8B=20GRPC=E3=80=81SESSION?= =?UTF-8?q?=EF=BC=9ADocker=2023=20=E4=BB=A5=E4=B8=8A=E7=9A=84=E5=A4=A7?= =?UTF-8?q?=E8=85=A6=E4=B8=BB=E6=A9=9F=E9=A0=90=E8=A8=AD=E7=94=A8=20BuildK?= =?UTF-8?q?it=20=E5=BB=BA=E7=BD=AE=EF=BC=8C=E5=A4=A7=E8=85=A6=E8=A3=A1?= =?UTF-8?q?=E7=9A=84=20docker=20=E8=A6=81=E7=B6=93=20session=20=E5=BB=BA?= =?UTF-8?q?=20Bot=20=E7=9A=84=E9=9B=BB=E8=85=A6=E7=9A=84=E6=98=A0=E5=83=8F?= =?UTF-8?q?=E6=AA=94=EF=BC=8C=E5=B0=91=E4=BA=86=E9=80=99=E5=85=A9=E9=A0=85?= =?UTF-8?q?=E6=9C=83=E8=A2=AB=E6=93=8B=EF=BC=88403=EF=BC=89=EF=BC=8C?= =?UTF-8?q?=E3=80=8C=E6=9B=B4=E6=96=B0=EF=BC=8F=E9=87=8D=E5=BB=BA=E3=80=8D?= =?UTF-8?q?=E5=BB=BA=E4=B8=8D=E5=87=BA=E4=BE=86=E3=80=82=E7=85=A7=20nobled?= =?UTF-8?q?esktop=20=E4=B8=8A=E6=89=8B=E6=94=B9=E3=80=81=E5=B7=B2=E7=B6=93?= =?UTF-8?q?=E5=AF=A6=E9=9A=9B=E5=BB=BA=E6=88=90=E5=8A=9F=E7=9A=84=E8=A8=AD?= =?UTF-8?q?=E5=AE=9A=E5=90=88=E5=9B=9E=E4=BE=86=EF=BC=88=E6=AD=A3=E5=BC=8F?= =?UTF-8?q?=E5=92=8C=20CI=20=E5=85=A9=E4=BB=BD=20compose=EF=BC=8CSECURITY.?= =?UTF-8?q?md=20=E4=B8=80=E8=B5=B7=E6=94=B9=EF=BC=89=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 已驗證: nobledesktop(Docker 29.8.1)的 _ping 回 Builder-Version 2、大腦裡的 docker 是 20.10.24(跟著主機用 BuildKit);開了這兩項後 /session 經過代理(400 而不是 403),anybot-box:1 就是開了之後建成的;docker compose config 兩份都讀得過。 未驗證: 拿掉這兩項重現建置失敗(要在使用者的伺服器上重建映像檔,沒做)。 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Uirha2uBHmbnuWBhNzjbJm --- SECURITY.md | 2 +- deploy/ci/server-compose.yml | 2 ++ deploy/server/docker-compose.yml | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/SECURITY.md b/SECURITY.md index 8f1084b..a8ed9ac 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -12,7 +12,7 @@ AnyBot 的 privacy 模型一句话:**Bot 跑在你自己的機器上,你的 |---|---|---| | 你的電腦(App) | Bot 的大腦與手腳、`state.json`、保險庫 | 你的帳號就是邊界;App 內指令在 macOS 沙盒(deny `~/.aws`、Keychain、AnyBot 自己的資料) | | Bot 的雲端電腦(box) | Bot 能以 root 跑的容器 | Docker 容器;Docker 主機有 gVisor 時自動改用 `runsc`(虛擬化核心+使用者態 seccomp)——核心不在邊界內 | -| Docker API | Bot 的雲端大腦建/管自己的容器 | 不掛 `docker.sock`;經獨立 internal 網路上的 docker-socket-proxy 白名單(containers/exec/images/build/networks/volumes;`relay`/`caddy`/`voice` 無法連線) | +| Docker API | Bot 的雲端大腦建/管自己的容器 | 不掛 `docker.sock`;經獨立 internal 網路上的 docker-socket-proxy 白名單(containers/exec/images/build(含 BuildKit 的 session/grpc)/networks/volumes;`relay`/`caddy`/`voice` 無法連線) | | Relay(帳號伺服器) | 帳號、裝置清單、備份密文 | 只存雜湊:密碼 argon2id、host token/密碼雜湊、session 雜湊;備份是用你的密碼派生的鑰匙鎖住的密文(PBKDF2-HMAC-SHA256 12 萬輪 → AES-256-GCM),relay 看不到內容 | | 模型供應商 | 交出去的對話內容與截圖 | 你选的供應商與金鑰;任何供應商拿不到你的檔案、保險庫密碼、金鑰庫 | diff --git a/deploy/ci/server-compose.yml b/deploy/ci/server-compose.yml index 45a4b43..6cb186c 100644 --- a/deploy/ci/server-compose.yml +++ b/deploy/ci/server-compose.yml @@ -71,6 +71,8 @@ services: EXEC: "1" IMAGES: "1" BUILD: "1" + GRPC: "1" + SESSION: "1" VOLUMES: "1" NETWORKS: "1" POST: "1" diff --git a/deploy/server/docker-compose.yml b/deploy/server/docker-compose.yml index 77fb3d2..3d1c2d8 100644 --- a/deploy/server/docker-compose.yml +++ b/deploy/server/docker-compose.yml @@ -115,6 +115,11 @@ services: EXEC: "1" # docker exec: every screen step, box_exec, snapshots IMAGES: "1" # inspect/create the box image (build uploads it) BUILD: "1" # 更新/重建 builds the box image + # A daemon of Docker 23 or newer says BuildKit is its builder (_ping: Builder-Version 2), + # and the brain's docker then builds through a session: without these two the proxy + # refuses it (403) and 更新/重建 can't make the box image. They reach only the builder. + GRPC: "1" + SESSION: "1" VOLUMES: "1" # anybot-box-home: inspect, create, rm (Reset/Restore) NETWORKS: "1" # inspect/attach (docker run needs the bridge network) POST: "1"