From 1b109fa6c30b5dde6fdcc889d151b7f712039827 Mon Sep 17 00:00:00 2001 From: Zhengshou Lai Date: Sat, 22 Aug 2026 13:09:23 +0800 Subject: [PATCH] =?UTF-8?q?docs(git-proxy):=20CI=20=E5=B7=B2=E8=BF=81=20Gi?= =?UTF-8?q?tea=20=E4=B8=8D=E5=86=8D=E9=9C=80=E8=A6=81=20GitHub=20=E4=BB=A3?= =?UTF-8?q?=E7=90=86=EF=BC=8Censure-fastgithub.sh=20=E6=8C=87=E4=BB=93?= =?UTF-8?q?=E5=BA=93=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .agents/skills/mytoolkit/references/git-proxy.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.agents/skills/mytoolkit/references/git-proxy.md b/.agents/skills/mytoolkit/references/git-proxy.md index 458510f..d081560 100644 --- a/.agents/skills/mytoolkit/references/git-proxy.md +++ b/.agents/skills/mytoolkit/references/git-proxy.md @@ -16,8 +16,9 @@ mytoolkit git proxy run fastgithub # 旧前台模式(设 git + Ctrl-C ``` - `start` / `stop` / `restart`:端口 + PID(`lsof`),状态文件 `~/.mytoolkit/run/proxy-current.json`;`start` 默认写全局 git http(s).proxy,`stop` 按状态文件自动恢复旧值(`--set-git/--no-set-git` 可显式切换) -- CI:主机 `start --no-set-git fastgithub`(daemon only,勿动全局 git config);job 用 `HEYUE_CI_GIT_PROXY=1` / `XIAOHE_CI_GIT_PROXY=1`(勿依赖全局 git proxy) -- Parallels guest 需 `brew install socat`;可选 `XIAOHE_CI_PARALLELS_HOST_IP` +- **与手动 FastGitHub 不抢进程**:`:38457` 已在听则 **收养**(`adopted: true`)。`stop` 只拆 socat / 恢复 git,**不杀**别人(或 `ensure-fastgithub.sh`)拉起的 FastGitHub。只有 mytoolkit 自己 spawn 的进程才会被 `stop` 杀掉。 +- 无 mytoolkit 的环境(干净机器 / docker 容器)**不要**依赖本 CLI。用仓库 `scripts/common/ensure-fastgithub.sh` 探测并原生 `fastgithub start`。**CI 已迁 Gitea**(tailnet 内网),checkout / 构建**不再需要** GitHub 代理。 +- Parallels guest 需 `brew install socat` 才有转发。Shared/Host-Only 走 `10.211.55.2` / `10.37.129.2`;**桥接** guest 走 Mac `en0` LAN IP(ARM64 Windows 无法加载 WinDivert,不能跑本机 FastGitHub)。 ## 新机器安装 FastGitHub @@ -38,6 +39,4 @@ mytoolkit git proxy run fastgithub # 旧前台模式(设 git + Ctrl-C ```bash mytoolkit env set connections.proxy.fastgithub http://127.0.0.1:38457 ``` -5. 启动:`mytoolkit git proxy start fastgithub` → `mytoolkit git proxy status` - -Windows/Linux 也可用官方 `fastgithub start`(系统服务);本 CLI 的 `start` 面向 **Mac 宿主 + Parallels socat** 场景。 +5. 启动:`bash /scripts/common/ensure-fastgithub.sh`(无 mytoolkit 的环境)或 `mytoolkit git proxy start fastgithub` → status。两者可叠加:先手动/ensure 起 FastGitHub,再 mytoolkit 只加 socat;`mytoolkit git proxy stop` 不会把 FastGitHub 杀掉。