Fix Google Antigravity authentication issues on macOS (Apple Silicon & Intel) behind corporate proxies, VPNs, and restricted networks.
🆘 Bilingual Help / راهنمای دوزبانه: HELP.md — 🇬🇧 English | 🇮🇷 فارسی
This is the macOS port of kakajan/antigravity-patch, which is Windows-only (it uses a version.dll injection technique that cannot exist on macOS).
| Windows original | This macOS port | |
|---|---|---|
| Technique | version.dll proxy injection DLL |
Proxy-aware launchers + env vars + Chromium --proxy-server flag |
| Modifies app files? | Yes (DLL + config in install dir) | No — the signed .app bundle is never touched |
| Config | proxy.settings.txt (HOST/PORT/TYPE) |
Same proxy.settings.txt format |
| Uninstall | Uninstall-Patch.bat |
./uninstall-patch.sh |
macOS apps are code-signed with the hardened runtime, and on Apple Silicon every binary must have a valid signature. Adding or changing files inside Antigravity.app breaks the bundle's signature seal, and macOS will kill the app at launch. So this patch takes a different, fully reversible approach:
- Proxy-aware launchers —
Antigravity (Proxy).appandAntigravity-with-proxy.commandstart the real Antigravity binary with:HTTP_PROXY/HTTPS_PROXYenvironment variables (inherited by child processes likelanguage_serverandnode— this is the process that usually bypasses the system proxy), and- Chromium's
--proxy-serverflag (forces the Electron/IDE network stack through your proxy).
- VS Code settings — writes the same
http.proxykeys to~/Library/Application Support/Antigravity*/User/settings.jsonthat the Windows installer writes (a timestamped backup is kept). gui_config.json— enablesproxy.upstream_proxywhen that key already exists.
No telemetry, no data collection, everything is a readable shell script.
| Requirement | Details |
|---|---|
| OS | macOS 11+ (Apple Silicon or Intel) |
| Antigravity | Antigravity.app and/or Antigravity IDE.app in /Applications (auto-detected) |
| Proxy | An HTTP proxy (corporate, or local like Clash / V2Ray / Shadowsocks) |
| Python 3 | Only for the settings.json merge (ships with Xcode Command Line Tools) |
# 1. Set your proxy host/port
open -e proxy.settings.txt # edit HOST / PORT / TYPE
# 2. Install
chmod +x install-patch.sh uninstall-patch.sh
./install-patch.sh
# 3. Launch Antigravity ONLY via the generated launchers:
open "/Applications/Antigravity (Proxy).app"
# or double-click /Applications/Antigravity-with-proxy.commandImportant: Do not launch Antigravity from its normal icon or Spotlight — it would bypass the proxy. Pin
Antigravity (Proxy).appto your Dock instead.
| Proxy tool | HOST | PORT |
|---|---|---|
| Clash / ClashX | 127.0.0.1 |
7890 |
| V2RayX / V2RayU | 127.0.0.1 |
1087 / 10809 |
| Shadowsocks (HTTP) | 127.0.0.1 |
1087 |
| Corporate proxy | Your corp IP | Ask your IT dept |
| Squid | 127.0.0.1 |
3128 |
./install-patch.sh --proxy-url http://127.0.0.1:7890 # override settings file
./install-patch.sh --edition ide # only Antigravity IDE
./install-patch.sh --app-dir "/Applications/Antigravity.app"
./install-patch.sh --skip-user-settings # don't touch settings.json
./install-patch.sh --set-env # also 'launchctl setenv' (GUI-wide,
# resets on reboot, affects other apps)
./uninstall-patch.sh # remove everything cleanly
./uninstall-patch.sh --unset-env # also clear launchctl env varsApp updates replace the binary but not the launchers — usually nothing to do. If you changed the proxy or want fresh launchers, just re-run ./install-patch.sh.
After launching via the proxy launcher, run in Antigravity's integrated terminal:
env | grep -i proxy
# HTTP_PROXY=http://127.0.0.1:12334 ...Then sign in — requests to accounts.google.com / *.googleapis.com should now succeed.
- "No Antigravity installation found" — pass the path explicitly:
./install-patch.sh --app-dir "/path/to/Antigravity.app". - settings.json couldn't be updated — add manually in Antigravity: Settings → search "proxy" → set Http: Proxy to your proxy URL, Http: Proxy Support to
override, Http: Proxy Strict SSL off. - Signed in but AI features fail — make sure you launched via the launcher (check
env | grep -i proxy), and that the proxy allows CONNECT to*.googleapis.com:443. - SOCKS-only proxy? Set
TYPE=socks5inproxy.settings.txt(Chromium supports it via--proxy-server; env vars becomesocks5://...). HTTP is still recommended. - Reboot cleared
--set-env— that's expected; re-run the installer or just use the launcher (which needs no global env).
./uninstall-patch.shRemoves the launchers, restores settings.json from its backup, and deletes the manifest. Your Antigravity installation is never modified, so there is nothing else to clean.
Based on the Windows-only antigravity-patch by kakajan (AYTRONIC). MIT License — see LICENSE.