Antigravity IDE如何配置软件走代理的解决方案
我使用的是Antigravity IDE版本,也就是带有编辑器窗口的。
我测试了在用户配置中添加以下配置,无效。
快捷方式配置目标输入框项内容为: "E:\Antigravity IDE\Antigravity IDE.exe" --proxy-server="http://127.0.0.1:7890"
同时也配置setting.json文件内容:
{
// 1. 强制插件与 Agent 扩展网络走代理
"http.proxy": "http://127.0.0.1:7890",
"http.proxySupport": "override",
"http.proxyStrictSSL": true,
// 2. 仅为 IDE 内置终端自动注入代理环境变量(Windows PowerShell / CMD 均生效)
"terminal.integrated.env.windows": {
"HTTP_PROXY": "http://127.0.0.1:7890",
"HTTPS_PROXY": "http://127.0.0.1:7890",
"ALL_PROXY": "http://127.0.0.1:7890",
"http_proxy": "http://127.0.0.1:7890",
"https_proxy": "http://127.0.0.1:7890",
"all_proxy": "http://127.0.0.1:7890"
},
// 3. 强制 IDE 内置的 Git 操作走代理
"git.path": "git",
"git.autofetch": true,
"http.proxyAuthorization": null
}
在打开ide的时候,环境变量也可以在终端处获取到,但是agent依旧没有走代理。
下面说有效的方法:
就是新建个bat脚本文件,内容如下:
@echo off
set HTTP_PROXY=http://127.0.0.1:7890
set HTTPS_PROXY=http://127.0.0.1:7890
# set ALL_PROXY=socks5://127.0.0.1:7890
set ALL_PROXY=http://127.0.0.1:7890
set NO_PROXY=localhost,127.0.0.1
start "" "E:\Antigravity IDE\Antigravity IDE.exe" --proxy-server="http://127.0.0.1:7890"
结论有效,ide内部的agent走了代理,终端也能获取到注入的环境变量,注意上边的参数替换为你自己的。

浙公网安备 33010602011771号