◉ANTIGRAVITY LABJP
Articles/Antigravity Basics
◉ Antigravity Basics/2026-06-12Intermediate

Running Antigravity Behind a Proxy

Keep Antigravity working behind corporate proxies, SSL inspection, and hotel Wi-Fi: layer-by-layer diagnosis, certificate trust, NO_PROXY design, and connection profiles with a local LLM fallback.

antigravity470proxy4network4ssllocal-llm17

✦ Premium Article

In 2025, in a hotel room where I was staying abroad, the Antigravity agent that had been running smoothly for weeks suddenly went quiet. Chat requests hung at "sending" and never came back, while tab completion still fired occasionally, as if nothing were wrong. It took me half a day to find the culprit: a transparent proxy sitting on the hotel's line, quietly rewriting part of the HTTPS traffic and selectively killing the streaming connections.

What makes connection trouble so frustrating is that "the network is bad" never describes it accurately. Antigravity keeps several very different kinds of connections open at once — authentication, model APIs, agent tool execution, extension updates — and a proxy usually breaks only some of them. The result is a half-broken state that resists diagnosis: completion works but the agent is dead, or everything works except sign-in.

I maintain a handful of indie apps from home and from wherever I happen to be staying, and the feeling of tiptoeing around a proxy and an auth server is the same on a corporate network as on a hotel line. What follows is the connection design that has slowly taken shape from both situations — a way to keep Antigravity working on networks that do not want to cooperate.

Antigravity's Traffic Is Not One Pipe — Reverse-Mapping Symptoms to Layers

From what I have observed, Antigravity talks to the outside world through five distinct paths.

  • Authentication: Google account sign-in and the OAuth callback. This goes through your default browser, not the IDE, so if the browser and the IDE see different proxy settings, sign-in alone will fail
  • Model API: traffic to Gemini and other cloud models. Responses arrive as streams over long-lived HTTPS connections — exactly the kind of connection that middleboxes love to kill first
  • Agent runtime: git, npm, curl and other tools the agent spawns as child processes. These never read the IDE's settings; they only read environment variables
  • Extensions and updates: the marketplace and auto-update checks. A failure here won't stop today's work, but stale extensions eventually cause their own confusing bugs
  • Local LLMs: localhost traffic to Ollama or LM Studio. This is the one path that must not go through the proxy

Keep these five in mind and you can reverse-map symptoms to layers.

  • Only sign-in fails → authentication; check whether the browser uses different proxy settings
  • Chat hangs at "sending" → model API; the stream is probably being cut by the proxy
  • Responses start, then die midway → the proxy's idle timeout; longer generations get cut more often
  • Only the agent's command execution fails → environment variables are not reaching the IDE
  • A local model that worked on a direct connection disappears → a NO_PROXY gap
  • Absolutely nothing connects → an unauthenticated captive portal, or DNS

After building this mapping, the time I spend identifying the cause on an unfamiliar network shrank from half a day to roughly ten minutes. The next section is what those ten minutes look like.

The First Ten Minutes — Five Commands to Locate Yourself

Before touching any settings, find out which layer you are stuck on. If you change settings blindly, you will not know why things broke — or why they started working again. Observation first, changes second. It sounds pedantic, but it is the single biggest factor in recovery time.

# (1) Is a proxy defined in the environment? — find out who claims to be your proxy
env | grep -i proxy
 
# (2) Are you trapped behind a captive portal? — 204 means you pass through cleanly
#     (Apple's hotspot-detect.html returns 200 with a "Success" page, so it cannot give a 204 verdict)
curl -s -o /dev/null -w "%{http_code}\n" --max-time 5 \
  http://connectivitycheck.gstatic.com/generate_204
 
# (3) Does plain HTTPS reach the model API — and who is issuing the certificate?
curl -sv --max-time 10 https://generativelanguage.googleapis.com -o /dev/null 2>&1 \
  | grep -E "issuer:|HTTP/"
 
# (4) Does it work when you explicitly go through the proxy? (use your company's value)
curl -sv --max-time 10 -x http://proxy.example.com:8080 \
  https://generativelanguage.googleapis.com -o /dev/null 2>&1 \
  | grep -E "CONNECT|issuer:|HTTP/"
 
# (5) Is the local LLM alive? — this should answer directly, proxy or not
curl -s --max-time 3 http://127.0.0.1:11434/api/tags | head -c 120

Check (2) uses a plain HTTP endpoint Google publishes for connectivity checks; on a clean line it returns 204 with no body. A 302, or a 200 that returns HTML, means the line is not broken — you simply have not clicked through the hotel's consent page yet. Open a browser and do that first. Apple's hotspot-detect.html also works for detection, but it answers 200 with a short HTML page, which makes it a poor fit for a command that judges by status code alone.

In the output of (3), the first thing I look at is the issuer line.

# A healthy direct connection — issued by a public CA
issuer: C=US; O=Google Trust Services; CN=WR2
 
# Behind an SSL-inspecting proxy — the issuer turns into an unfamiliar corporate CA
issuer: O=ExampleCorp Security; CN=ExampleCorp TLS Inspection CA

If the issuer is a name you do not recognize, that network is decrypting and inspecting HTTPS. The certificate work described below becomes mandatory; no amount of proxy configuration will fix things if you skip it.

If (5) does not answer, there are two possibilities: a problem on the Ollama side, or your proxy swallowing localhost traffic. For the Ollama-side diagnosis I wrote a separate piece, Diagnosing Ollama Connection and Recognition Failures in Antigravity; here, just remember that the more proxy variables you have set, the more you should suspect (5).

✦

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
✦Pinpoint why Antigravity goes silent behind a corporate proxy by isolating the failure across five distinct connection layers, instead of changing settings blindly
✦Implement the safe-side fixes for SSL inspection, authenticated proxies, and captive portals — NODE_EXTRA_CA_CERTS, a local relay, and a deliberate NO_PROXY list
✦Build a connection-profile workflow with a local LLM fallback so development keeps moving on hotel Wi-Fi, tethering, or no network at all
Secure payment via Stripe · Cancel anytime
✦

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Antigravity Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

Related Articles

◉ Antigravity2026-05-23
Which Local-LLM Path to Keep with Antigravity: Ollama, LM Studio, or Raw Gemma 4 (Indie Judgment Notes)
After running three local-LLM paths from Antigravity in parallel, here is what I kept and what I cut, written from a one-Mac-mini indie operation.
✦ Tips2026-04-22
Fixing Antigravity Connection Errors Behind Corporate Proxies and Firewalls
Antigravity works fine at home but fails to sign in or reach the Gemini API on your office network. This guide walks through reading the logs, configuring HTTP proxies, trusting corporate CAs, and getting domain allowlisting right.
◉ Antigravity2026-10-24
The File Is Right There, but Linux Says "No Such File" — Check the Interpreter, Not the Path
When agy's grep search fails on Linux and the log says "no such file or directory" for a file that clearly exists, the culprit is the ELF interpreter. Here is how to confirm it, reproduce it, and work around it for now.