跳到主要内容

Claude Cage · 面向 Claude 的隔离开发环境,支持桌面工作台、多账号、远程部署与移动端连接。上游 Lee-xeo/Claude-Cage 完整源码镜像,非灵栈原创;主许可 MIT,第三方组件遵循各自许可。来源:https://github.com/Lee-xeo/Claude-Cage 。手动同步,不附带 Release 安装包。

浏览文件

host_download.go

25 行 · 747 B历史下载
1package main
2
3import (
4 "context"
5 "errors"
6 "io"
7
8 "github.com/sylvinus/agent-vm/internal/hostproxy"
9)
10
11// Private subprocess entry for host installers. Proxy settings are resolved in
12// Go for every HTTPS request, including redirects and PAC host rules.
13func hostDownload(ctx context.Context, args []string, out io.Writer) error {
14 if len(args) != 3 && len(args) != 4 && len(args) != 6 {
15 return errors.New("host-download requires URL, staging path, component name and optional Accept, cache directory and SHA-256")
16 }
17 var accept, cache, digest string
18 if len(args) >= 4 {
19 accept = args[3]
20 }
21 if len(args) == 6 {
22 cache, digest = args[4], args[5]
23 }
24 return hostproxy.Download(ctx, args[0], args[1], args[2], accept, cache, digest, out)
25}