Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Antigravity Proxy Patch for macOS

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

Why not DLL injection?

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:

  1. Proxy-aware launchers — Antigravity (Proxy).app and Antigravity-with-proxy.command start the real Antigravity binary with:
    • HTTP_PROXY / HTTPS_PROXY environment variables (inherited by child processes like language_server and node — this is the process that usually bypasses the system proxy), and
    • Chromium's --proxy-server flag (forces the Electron/IDE network stack through your proxy).
  2. VS Code settings — writes the same http.proxy keys to ~/Library/Application Support/Antigravity*/User/settings.json that the Windows installer writes (a timestamped backup is kept).
  3. gui_config.json — enables proxy.upstream_proxy when that key already exists.

No telemetry, no data collection, everything is a readable shell script.

Requirements

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)

Quick Start

# 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.command

Important: Do not launch Antigravity from its normal icon or Spotlight — it would bypass the proxy. Pin Antigravity (Proxy).app to your Dock instead.

Common proxy configurations

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

Advanced options

./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 vars

After Antigravity updates

App 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.

Verify it works

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.

Troubleshooting

  • "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=socks5 in proxy.settings.txt (Chromium supports it via --proxy-server; env vars become socks5://...). 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

./uninstall-patch.sh

Removes 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.

Credits & License

Based on the Windows-only antigravity-patch by kakajan (AYTRONIC). MIT License — see LICENSE.

About

🍎 macOS port of antigravity-patch — fix Google Antigravity auth behind proxies/VPNs (Happ, Clash, V2Ray)

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages