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

Running Antigravity Behind a Proxy — Connection Design for Corporate Networks, SSL Inspection, and Hotel Wi-Fi

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.

antigravity340proxy4network4ssllocal-llm16

Premium Article

In 2025, in a hotel room where I was staying for an overseas exhibition, 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.

Before going independent in 2005 I spent years at NTT Data, developing inside a large corporate network, negotiating daily with proxies and auth servers. That instinct has not changed much; what has changed is that I now maintain my indie apps while moving between exhibition venues and hotels around the world. What follows is the connection design that has slowly taken shape from both of those lives — 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
curl -s -o /dev/null -w "%{http_code}\n" --max-time 5 \
  http://captive.apple.com/hotspot-detect.html
 
# (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 the plain HTTP endpoint Apple relies on for captive portal detection. Anything other than 204 — 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.

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.
Antigravity2026-05-06
How to Fix LM Studio Response Cutoffs in Antigravity
When Antigravity cuts off LM Studio responses mid-stream, the culprit is usually one of four configuration issues. This guide walks through each cause and explains exactly how to fix it.
Antigravity2026-04-24
LM Studio Not Visible to Antigravity — Diagnosing Port, CORS, and Model-Load Layers
When Antigravity can't see LM Studio's models, the fix is rarely one setting. Walk through the three layers — server port, CORS, and model visibility — and recover cleanly, with the exact commands to verify each step.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →