antigravity-proxy README

The project's README from github.com/yuaotian/antigravity-proxy. As one markdown file: README.md.

Antigravity Logo

Antigravity-Proxy

🚀 让 Antigravity 不开 TUN 模式也能稳定走代理

Build Status License Platform

🇬🇧 English | 🇷🇺 Русский


简介

Antigravity-Proxy 是一个放进 Antigravity 安装目录即可生效的代理补丁(DLL):

赞助商

📣 广告位招租:本 README 长期开放广告位,面向代理 IP / 云服务 / 开发工具等同类产品,支持「图片 + 跳转链接 + 短文案」,按月投放。合作请联系微信 JavaRookie666(优先,回复最快),或 Telegram @yuaotian。

IPWO 住宅代理 — 195+ 地区,9000 万+ 活跃住宅 IP
IPWO 住宅代理覆盖 195+ 个国家和地区,拥有 9000 万+ 活跃住宅 IP 资源,支持动态住宅、静态住宅及不限量代理。
适用于跨境电商、海外社媒运营、SEO 监控、广告验证及数据采集等场景,为全球业务提供灵活的网络连接方案。
💡 静态 IP 低至 9.9 🎟️ 优惠折扣码 0200(立减 10%)
👉 立即前往 IPWO 选购
deepsiderapi 模型 API — 一站式接入 GPT、Claude、Gemini、DeepSeek
deepsiderapi
一站式接入 GPT、Claude、Gemini、DeepSeek等全球主流模型API。采用大厂官方渠道,非号池、非逆向。调用价格低至官方定价2.9折。支持实时用量监控,消费透明、用量清晰,助你以更低成本轻松调用AI。
💡 调用价格低至官方定价 2.9 折 📊 实时用量监控
👉 前往 deepsiderapi 接入 API

安装

方式一:Antigravity IDE 插件市场(推荐)

Antigravity IDE 用户优先从 Open VSX 安装插件:

& "$env:LOCALAPPDATA\Programs\Antigravity IDE\bin\antigravity-ide.cmd" --install-extension yuaotian.antigravity-proxy

安装后执行 Reload Window。插件首次启动会自动补齐 version.dll;如果市场搜索不到,按「Antigravity IDE 插件」一节的 VSIX / 命令行兜底;仍然不行再用下面的在线安装脚本。

方式二:在线安装脚本(桌面版 / CLI / 插件兜底)

在 PowerShell 中粘贴执行:

[Net.ServicePointManager]::SecurityProtocol=3072; & ([scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://wget.la/https://raw.githubusercontent.com/yuaotian/antigravity-proxy/main/scripts/install-online.ps1')))

脚本会自动检测已安装的产品,下载对应版本并做 SHA256 校验,部署补丁和 config.json,Antigravity IDE 会同时安装配套插件。已有的 config.json 不会被覆盖。下载顺序:本机代理(环境变量或系统代理,端口可连才用)→ 镜像 → 直连 GitHub,每个下载源最多重试 3 次。

需要指定参数时加在命令末尾,例如 ... install-online.ps1'))) -Product ide:

参数 说明
-Product ide|desktop|cli|all 只安装指定产品(默认检测到多个时询问)
-Version 2.5 安装指定版本(默认最新)
-InstallDir <目录> 手动指定安装目录(与主程序同级)
-ProxyPort 7897 指定本地代理端口(默认自动探测)
-Yes 不询问,直接安装
-ExtensionOnly 只安装 IDE 配套插件,不动补丁与配置(IDE 运行中也可执行)

获取脚本失败时,打开代理软件的「系统代理」后重试。部署前请先完全退出要安装的应用(-ExtensionOnly 除外)。 脚本兼容 Windows 10 / 11 自带的 Windows PowerShell 5.1,也可在 PowerShell 7 中运行。

方式三:下载发布包

从 Releases 下载(32 位程序选 x86):

文件 适用
antigravity-proxy-vX-ide-win-x64.zip Antigravity IDE(Antigravity IDE.exe)、Antigravity 桌面版(Antigravity.exe)
antigravity-proxy-vX-cli-win-x64.zip Antigravity CLI(agy.exe)
antigravity-proxy-vX-ide-extension-win-x64.vsix IDE 配套插件(IDE 包的 ide/ 里已包含)
SHA256SUMS.txt 校验清单

请解压到安装目录之外(例如 %LOCALAPPDATA%\antigravity-proxy\),日后修复补丁时要用到这份文件。然后任选一种:

默认安装目录(找不到时:右键快捷方式 → 打开文件所在的位置):

产品 目录
Antigravity IDE %LOCALAPPDATA%\Programs\Antigravity IDE
Antigravity %LOCALAPPDATA%\Programs\Antigravity
Antigravity CLI %LOCALAPPDATA%\agy\bin(或执行 where agy 查看)

部署后重启应用即可生效。

Antigravity IDE 插件

安装插件(推荐:Open VSX 市场)

最佳方式:打开 Open VSX 市场页面,或在 Antigravity IDE 扩展视图搜索 Antigravity Proxy 点击安装。也可命令行走市场安装:

& "$env:LOCALAPPDATA\Programs\Antigravity IDE\bin\antigravity-ide.cmd" --install-extension yuaotian.antigravity-proxy

安装后执行 Reload Window;插件首次启动会自动补齐 version.dll。

如果搜索不到 / 安装失败:

  1. 从 Open VSX 页面 或 GitHub Releases 下载 VSIX;
  2. 扩展视图右上角 … → 「从 VSIX 安装」;或:
$vsix = Join-Path $env:TEMP "antigravity-proxy-2.6.3.vsix"
[Net.ServicePointManager]::SecurityProtocol = 3072
Invoke-WebRequest "https://open-vsx.org/api/yuaotian/antigravity-proxy/2.6.3/file/yuaotian.antigravity-proxy-2.6.3.vsix" -OutFile $vsix
& "$env:LOCALAPPDATA\Programs\Antigravity IDE\bin\antigravity-ide.cmd" --install-extension $vsix --force

(版本号按当前 Release 替换;也可以从 GitHub Releases 下载后把路径换成实际 VSIX。)

仍然失败:在线脚本(只装插件,中文可走 wget.la 镜像):

[Net.ServicePointManager]::SecurityProtocol=3072; & ([scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://wget.la/https://raw.githubusercontent.com/yuaotian/antigravity-proxy/main/scripts/install-online.ps1'))) -ExtensionOnly -Yes
状态栏 含义
代理 7890 补丁已生效,代理端口可达
代理 · 缺少 agy.exe target_processes 缺少 IDE 后端进程,代理对对话无效;悬浮提示里点「一键补齐」
代理 · 待重启 配置或补丁已更新,重启 IDE 后生效
代理 7890 不可达 代理软件未启动或端口不对
代理补丁缺失 / 代理配置异常 version.dll 被删除 / config.json 缺失或无法解析
代理已禁用 proxy.port = 0,全部直连
设置项 默认 说明
antigravityProxy.language auto 界面语言:auto(跟随系统 / IDE 显示语言,识别不了回落简体中文)/ zh-cn / en / ru;默认 auto
antigravityProxy.patchGuard.autoRestore true 启动时自动恢复被更新清除的补丁
antigravityProxy.statusBar.enabled true 是否显示状态栏
antigravityProxy.statusBar.probeIntervalSeconds 60 代理连通检测间隔(秒);0 只在启动和保存后检测

界面预览

简体中文 English Русский
简体中文界面 English UI Русский интерфейс

截图来自 Antigravity IDE 1.107.0(Windows),左侧栏与底部「代理日志」面板;IDE 自身的菜单语言跟随 IDE 安装,插件文案由 antigravityProxy.language 控制。

更多说明见 docs/ide-extension.md。

配置

配置文件是安装目录下的 config.json,最常改的是代理地址:

{
  "proxy": {
    "host": "127.0.0.1",
    "port": 7890,
    "type": "socks5",
    "username": "",
    "password": ""
  }
}

其它编辑器(ACP)

在 JetBrains、Zed、VS Code(ACP Client 扩展)等编辑器里通过 ACP 使用 Antigravity 时,Agent 由这些编辑器启动,需要经过启动包装器 agy-acp-proxy.exe 才会走代理:

应用更新后补丁失效

Antigravity 自动更新可能会删除安装目录里的补丁文件:

在线安装的发布包位于 %LOCALAPPDATA%\antigravity-proxy\<版本>\,安装结束时也会打印修复命令。

常见问题

对话报错 Agent execution terminated due to error / User location is not supported? 多数是代理出口 IP 不被服务端接受(常见于机房 / 托管 IP),请换成普通家宽类型的节点再试。补丁日志里能看到「已注入新建进程」和「SOCKS5: 隧道建立成功」就说明补丁本身正常。详见 docs/agent-ip-diagnosis.md。

不走代理、主页白屏? 先运行 doctor.bat(只读体检),它会告诉你是补丁丢失、没被加载、代理端口不通,还是 proxy.type 与端口协议不符,并给出下一步操作。

报错里出现 198.18.x.x 被拒绝 / 超时? 198.18.x.x 是补丁分配给域名的内部占位地址(FakeIP),不是真实目标;出现在报错里通常说明连代理失败:检查代理软件是否启动、端口是否正确、proxy.type 是否与端口协议一致(混合端口两者皆可;HTTP 专用端口要填 http)。doctor.bat 会自动探测端口协议。

日志在哪? <安装目录>\logs\proxy-YYYYMMDD.log;目录不可写时在 %TEMP%\antigravity-proxy-logs\。

启动报错?

错误 处理
0xC0000142 / 0xC000007B 补丁与程序架构不一致(x86 / x64),换对应版本;或缺少运行库,安装 microsoft/微软常用运行库合集-2025.exe
0xC0000135 / 缺少 VCRUNTIME140_1.dll 安装上面的运行库合集
0xC0000906 被安全软件拦截,把安装目录加入白名单
日志里 10061 / 10060 代理软件未启动或端口错误 / 连接超时;日志提示「可能是 HTTP 代理端口」/「可能是 SOCKS5 端口」时改 proxy.type

WSL 里能用吗? 不能:补丁只作用于 Windows 进程。WSL 的替代方案见 docs/wsl.md。

更多排查步骤见 docs/troubleshooting.md;仍未解决请提交 Issue 并附上日志与 config.json(隐去密码)。

文档

文档 内容
docs/configuration.md 完整配置项、路由规则、IPv6 / UDP、代理其他程序
docs/troubleshooting.md 故障排查手册、错误码
docs/doctor.md 一键部署 / 体检 / 修复脚本
docs/ide-extension.md IDE 插件
docs/acp.md 其它编辑器经 ACP 使用 Antigravity 时走代理(agy acp / agy-acp-server)
docs/wsl.md WSL 替代方案
docs/DEVELOPMENT.md 编译构建、工作原理、二次开发

编译

需要 Visual Studio 2022(C++ 桌面开发)与 CMake,执行 .\build.ps1 即可在 output/ 得到全部产物。详见 docs/DEVELOPMENT.md。

许可证

BSD-2-Clause。MinHook 部分版权归 Tsuda Kageyu 所有(AUTHORS.txt 为 MinHook 作者名单)。

关于作者

煎饼果子(86),独立开发者。

平台 信息
微信 JavaRookie666
Telegram @yuaotian
GitHub @yuaotian

如果这个项目对你有帮助,欢迎点个 ⭐、分享给需要的朋友,或提交 Issue / PR。

微信二维码
添加微信交流
公众号二维码
关注公众号
微信群二维码
🔥 加入微信交流群

打赏支持

如果这个项目帮到了你,可以请作者喝杯咖啡 ☕

微信赞赏码
微信赞赏
支付宝收款码
支付宝打赏

伪代码(pseudocode_dll)来源说明

pseudocode_dll/ 收录了对某论坛帖中发布的 DLL 反编译得到的伪代码(Binary Ninja / IDA Hex-Rays),仅用于排查 Windows 11 下的崩溃问题与学习对照:

参考与致谢


Made with ❤️ by 煎饼果子(86)

antigravity-proxy (yuaotian/antigravity-proxy)

Searching Database…

What is this?Antigravity-Proxy is a Windows DLL injector that forces the Antigravity code editor (and its CLI) to route its network traffic through your SOCKS5/HTTP proxy, without needing Clash's TUN mode.
Is this a standalone app, or files I drop into another program?It is not an app you run on its own — it is a set of prebuilt DLLs (version.dll/config.json for the desktop app, dbghelp.dll/antigravityproxy.dll/config.json for the CLI) that you copy next to Antigravity's executable; they load automatically when Antigravity starts.
How do I get this working with Antigravity?Start a proxy app like Clash/Mihomo with a SOCKS5 or HTTP port open, download the release zip matching your target (ide-win-x64/x86 for the desktop app, cli-win-x64/x86 for the CLI), then copy the files into the Antigravity install folder next to Antigravity.exe (or agy.exe for the CLI) and restart it.
What do I need installed before this works?A working SOCKS5 or HTTP proxy such as Clash, Mihomo or V2RayN, and the Microsoft Visual C++ runtime libraries — the repo bundles a runtime installer to avoid a 0xc0000142 startup error.
What are the common gotchas when setting this up?The DLL architecture (x86/x64) must match the target executable, ide/ and cli/ files must not be mixed, antivirus tools like 360 or Huorong can block injection through LSP interference, and Antigravity updates can wipe the injected files so you may need to recopy them afterward.
Does this work on macOS or Linux too?No, it is Windows-only — it works by hooking Winsock APIs inside Windows processes via DLL injection.
Why not just use Clash's TUN mode instead?TUN mode routes all system traffic through the proxy and needs admin rights; this tool only hijacks Antigravity-related processes, so the rest of your network stays untouched and no admin privileges are required.
I get 'User location is not supported' even though the proxy connects fine — what's wrong?That error means the agent-execution request was rejected based on your proxy's egress IP/ASN, not a failed DLL injection; switching to a non-datacenter, residential-type exit IP usually fixes it.
Does it support the Antigravity CLI, not just the desktop IDE?Yes — there are separate cli-win-x64/x86 release bundles with dbghelp.dll and antigravityproxy.dll for agy.exe, alongside the ide bundles for the desktop app.
Creator
yuaotian
Size
61.7 MB
Stars
5K
Age
10mo
Commits · 90 Days