From 780b3fa3da55caf79ea8a62295e60a385bac0536 Mon Sep 17 00:00:00 2001
From: yetone
インストーラと magpie update にプロキシを渡します:curl -fsSL https://usemagpie.ai/install.sh | sh -s -- --proxy http://127.0.0.1:7890、または magpie update --proxy socks5://127.0.0.1:1080(http・https・socks5・socks5h に対応。HTTPS_PROXY と ALL_PROXY も使われます)。--mirror <prefix> を付けると、指定した GitHub ダウンロードミラーから <prefix>https://github.com/… としてリリースファイルを取得します。magpie update mirror <prefix> でアプリ自身の更新を含め毎回使い、magpie update mirror off で解除します。指定しない限りミラーは使われず、ファイルの SHA-256 はミラーではなく常に usemagpie.ai から取得するので、ミラーが書き換えたファイルはインストールされません。アプリ自身の更新は Settings → Proxy を通ります。
プロキシアプリ(Surge、Clash、mihomo など。システムプロキシ、TUN、拡張モードのいずれかが有効)が、エージェントから http://127.0.0.1:3425 へのリクエストを横取りして別の場所へ送っているため、magpie に届いていません。除外リスト(skip-proxy、バイパス)に 127.0.0.1 を書くだけでは足りないことがあります。Codex など一部のエージェントは、それでもプロキシを通します。ローカルアドレスを直結にするルールを、他のルールより前に追加してください:
IP-CIDR,127.0.0.0/8,DIRECT,no-resolve +IP-CIDR6,::1/128,DIRECT,no-resolve+
Clash / mihomo の設定では、同じ行を rules: の下に、それぞれ先頭に - を付けて書きます。そのあと、エージェントからもう一度リクエストを送ってください。
困ったときや、共有したい構成があるときは Discord でどうぞ。ユーザーにすぐ使えるプロバイダを配りたいベンダーの方は magpie に追加 をご覧ください。
diff --git a/site/public/docs/start.html b/site/public/docs/start.html index 2d009a9fb..861326701 100644 --- a/site/public/docs/start.html +++ b/site/public/docs/start.html @@ -261,6 +261,15 @@ magpie claude group/opus-anywhere # use itGive the installer and magpie update a proxy: curl -fsSL https://usemagpie.ai/install.sh | sh -s -- --proxy http://127.0.0.1:7890, or magpie update --proxy socks5://127.0.0.1:1080 (http, https, socks5 and socks5h; HTTPS_PROXY and ALL_PROXY are honoured too). --mirror <prefix> fetches the release file from a GitHub download mirror you choose, as <prefix>https://github.com/…; magpie update mirror <prefix> keeps it for every update, the app’s too, and magpie update mirror off removes it. No mirror is used unless you give one, and the file’s SHA-256 still comes from usemagpie.ai, never from the mirror: a file the mirror changed is refused. The app’s own updates go through Settings → Proxy.
A proxy app (Surge, Clash, mihomo and the like, with system proxy, TUN or enhanced mode on) has taken the agent’s request to http://127.0.0.1:3425 and sent it somewhere else, so it never reaches magpie. The bypass list (skip-proxy, “bypass”) isn’t always enough: some agents, Codex among them, send it through the proxy anyway. Add rules that send the local addresses direct, ahead of your other rules:
IP-CIDR,127.0.0.0/8,DIRECT,no-resolve +IP-CIDR6,::1/128,DIRECT,no-resolve+
In a Clash or mihomo config the same lines go under rules:, each starting with - . Then send the agent a new request.
Stuck, or have a setup worth sharing? Ask on Discord. Vendors who want to hand their users a ready-made provider: see Add to magpie.
diff --git a/site/public/docs/zh/start.html b/site/public/docs/zh/start.html index 994fd7679..d5d9065f5 100644 --- a/site/public/docs/zh/start.html +++ b/site/public/docs/zh/start.html @@ -261,6 +261,15 @@ magpie claude group/opus-anywhere # 使用它给安装脚本和 magpie update 加代理:curl -fsSL https://usemagpie.ai/install.sh | sh -s -- --proxy http://127.0.0.1:7890,或 magpie update --proxy socks5://127.0.0.1:1080(支持 http、https、socks5、socks5h;环境变量 HTTPS_PROXY、ALL_PROXY 同样生效)。--mirror <前缀> 从你指定的 GitHub 下载镜像取发布文件,即 <前缀>https://github.com/…;magpie update mirror <前缀> 让之后每次更新(包括应用自己的更新)都用它,magpie update mirror off 取消。不指定就不用任何镜像;文件的 SHA-256 始终来自 usemagpie.ai,而不是镜像,镜像改过的文件会被拒绝安装。应用自己的更新走 设置 → 代理。
代理软件(Surge、Clash、mihomo 等,开了系统代理、TUN 或增强模式)把 Agent 发往 http://127.0.0.1:3425 的请求接走、转去了别处,请求根本没到 magpie。只在跳过列表(skip-proxy、「绕过」)里写 127.0.0.1 不一定够:有些 Agent(比如 Codex)照样会走代理。在代理软件里加两条本地地址直连的规则,放在其他规则前面:
IP-CIDR,127.0.0.0/8,DIRECT,no-resolve +IP-CIDR6,::1/128,DIRECT,no-resolve+
Clash / mihomo 的配置里把这两行写在 rules: 下,每行前面加 - 。改完让 Agent 重新发一次请求即可。
遇到问题,或者有值得分享的配置?来 Discord 聊。想给自己的用户一键添加供应商的厂商,请看 Add to magpie。