介绍
# Workspace Explorer
通过 Cloudflare 隧道连接的 code-server(浏览器中的 VS Code),为您的工作区提供安全、临时的访问权限。
**仓库地址:** https://github.com/mrbeandev/workspace-explorer
## 安装
```bash git clone https://github.com/mrbeandev/workspace-explorer.git ```
## 用法
使用工作区路径运行启动脚本:
```bash python3 {baseDir}/scripts/start_workspace.py /path/to/workspace ```
该脚本将: 1. 在首次运行时下载二进制文件(code-server + cloudflared) 2. 在本地主机上启动 code-server 3. 创建 Cloudflare 隧道 4. 将 **公共 URL** 和 **密码** 直接打印到终端(注意:URL 生效需要等待 15-30 秒)
输出示例: ``` ============================================================ ✅ WORKSPACE READY! ============================================================ 🌐 URL: https://random-words.trycloudflare.com 🔑 Password: xY7kL9mN2pQ4 ============================================================
💡 Share the URL and password with your owner. Press Ctrl+C to terminate the session. ```
## 选项
```bash python3 {baseDir}/scripts/start_workspace.py /path/to/workspace --port 9000 ```
| 选项 | 默认值 | 描述 | |--------|---------|-------------| | `workspace` | (必填) | 要提供的目录路径 | | `--port` | 8080 | code-server 的本地端口 | | `--status` | (标志) | 检查工作区是否正在运行 |
## 心跳支持
本项目包含一个 `HEARTBEAT.md` 文件。当作为 OpenClaw 技能安装时,Agent 会定期检查隧道是否处于活动状态,如果运行时间过长,会提醒您。
## 终止
按下 `Ctrl+C` 停止会话。code-server 和隧道都将被终止。
## 安全性
- 每个会话都会生成一个唯一的加密安全密码 - 隧道 URL 是临时的 `.trycloudflare.com` 域名 - 无需在防火墙上开放任何端口 - 脚本终止时,会话即结束