Google Gemini 3.5 and Spark Launch: Clash Split Rules and DNS for Agent API (2026 Tested)
At Google I/O 2026, Google shipped Gemini 3.5 Flash and Gemini Spark—a cross-app Agent that plans work across Gmail, Drive, Calendar, and the Gemini web shell instead of answering in a single chat tab. That launch changed what shows up in your proxy logs: more generativelanguage.googleapis.com traffic, broader googleapis.com calls, and identity hops that must stay on the same exit as the Agent API. If gemini.google.com loads but Spark stalls, or your SDK hits region unavailable while the browser looks fine, the fix is usually Clash split routing plus DNS aligned to how Clash Verge Rev (or another Meta-class core) actually classifies connections—not another random node swap. This guide is a log-first workflow for the post-I/O stack, built for users who already run Clash and need domain rules that survive Spark’s multi-host choreography.
What changed at Google I/O 2026 for proxy users
Before May 2026, most “Gemini won’t connect” tickets looked like classic consumer AI: gemini.google.com, account redirects, and occasional generativelanguage.googleapis.com calls from power users. Gemini 3.5 Flash pushes the same API surface harder—faster turns, more streaming, heavier reliance on Google’s shared API edge. Gemini Spark adds an agentic layer: it reads context from other Google apps, schedules follow-ups, and issues background requests that do not always mirror what you see in the main Gemini UI. On the wire that means more hostnames per task, longer-lived HTTPS sessions, and API traffic that can succeed or fail independently of the tab you have open.
Search interest spiked for combinations like “Gemini 3.5 not available,” “Spark agent timeout,” and “generativelanguage.googleapis.com blocked”—signals that users are debugging infrastructure, not model quality. Clash is the right tool because the failure mode is almost always policy and DNS disagreement, not “Google is down globally.” You need rules that send Google AI traffic to an exit that actually reaches Google’s fronts, and DNS that lets DOMAIN matchers see the names your clients use.
Why Spark breaks simpler “one chat domain” Gemini rules
Our earlier Google Gemini with Clash guide targets browser-first sessions: accounts, product hosts, and shared CDNs. That article remains the right reference for Chromium tabs and sign-in loops. Gemini Spark sits closer to the AI agent pattern we documented for Manus and multi-domain agents: web plus API plus orchestration across namespaces you did not route because they were not part of yesterday’s chat-only workflow.
Spark can look healthy in the shell while a sub-step fails: Drive metadata on one suffix, Calendar notifications on another, model inference on generativelanguage.googleapis.com, OAuth refresh on oauth2.googleapis.com. If any hop uses DIRECT behind an early GEOIP line—or resolves through DNS Clash never sees—users report “Spark started then froze” or “Agent API 503” even with the proxy toggle on. The repeatable fix is observe, match, align DNS, verify in Mihomo logs, not a longer paste from a forum ruleset dated before I/O.
Developers using the Generative Language API or Google AI SDKs hit the same splits without Spark at all. For terminal-centric OAuth and CLI capture, pair this page with Fix Gemini CLI timeouts with Clash so browser, CLI, and Spark share one policy bucket instead of three accidental exits.
What you are really routing: web, Agent API, and Spark orchestration
Treat the list below as a baseline to confirm in your own logs after Google ships minor updates—hostnames rotate.
- Gemini web and Spark UI:
gemini.google.comand related product paths under Google’s unified web shell. - Generative Language / Agent API:
generativelanguage.googleapis.comfor REST and streaming model calls; SDKs may also touch sibling names under*.googleapis.comdepending on feature flags and model id (gemini-3.5-flashand successors). - Shared Google API infrastructure:
DOMAIN-SUFFIX,googleapis.comwhen logs show repeated misses on hosts you cannot enumerate yet—understand the blast radius before you enable it. - Identity and tokens:
accounts.google.com,oauth2.googleapis.com, and supportinggoogle.comredirects; split exits here cause consent loops that look like Spark bugs. - Static and CDN assets:
gstatic.com,googleusercontent.com, and attachments Spark surfaces while summarizing files or email. - Cross-app context (Spark-specific): Workspace-oriented API hosts may appear when Spark reads Gmail or Drive; log them during a real task instead of guessing from screenshots.
- Developer surfaces (optional):
ai.google.devor AI Studio hosts if you alternate between Spark and API keys in the same profile.
DOMAIN lines for generativelanguage.googleapis.com and gemini.google.com, then widen to DOMAIN-SUFFIX,googleapis.com only after logs show sibling hosts your narrow list missed.
Do not import giant community “Google AI” lists blindly: stale REJECT analytics rules can break telemetry Spark now requires. If you maintain rules through remote providers, see our custom rules tutorial for merge order when subscriptions refresh.
QUIC, HTTP/3, and streaming 3.5 responses
Gemini 3.5 Flash stresses multiplexed transports. A path that handles TCP TLS well can still stutter when UDP-based QUIC is filtered differently on your exit, or when MTU issues fragment packets. The symptom is specific: navigation feels fine while streaming tokens reset mid-sentence. As a diagnostic only, compare behavior with QUIC disabled in Chromium flags; if that stabilizes Spark, you learned something about UDP peering to Google edges—not about “3.5 being slow.” Document the finding before browsers reset experimental flags.
IPv6 dual-stack surprises
On networks that advertise IPv6, your OS may prefer AAAA records. If Clash policies handle IPv4 and IPv6 asymmetrically, Spark tasks fail intermittently when you move between Wi-Fi and tethering. Note whether log lines show v4 or v6 destinations and whether you need explicit IP-CIDR6 DIRECT lines for local ranges, mirroring RFC1918 handling for IPv4.
Design outbound groups in Clash Verge Rev
Before editing rules, define a proxy-groups entry you will recognize in logs—Google-Gemini-Agent, Gemini-Spark, or similar. A single select group is enough when one exit satisfies web, Agent API, and Spark orchestration. Split into Gemini-Web and Gemini-API only when you need different regions or failover policies for programmatic calls versus browser sessions.
Nodes must complete TLS to Google fronts without broken certificate inspection or half-configured IPv6. For selector mechanics, read our proxy groups guide. Keep this bucket separate from a generic Proxy catch-all so logs answer one question: when Spark failed, did traffic hit the intended policy name?
In Clash Verge Rev, apply profile changes through your normal merge or Mixin workflow on Windows 11 or macOS, then open the connection log before you blame upstream congestion. Verge does not magically route hostnames your YAML never mentions—it surfaces what Mihomo already decided.
Domain rules: precedence and a YAML skeleton
Clash evaluates rules top to bottom; first match wins. Place LAN exclusions and private ranges on DIRECT before Google matchers. Then add Gemini-related names ahead of broad GEOIP or MATCH lines that might swallow API traffic.
# RFC1918 and loopback first (adapt to your LAN)
IP-CIDR,192.168.0.0/16,DIRECT
IP-CIDR,10.0.0.0/8,DIRECT
IP-CIDR,172.16.0.0/12,DIRECT
IP-CIDR,127.0.0.0/8,DIRECT
# Identity — keep on one exit; verify in logs
DOMAIN,accounts.google.com,Google-Gemini-Agent
DOMAIN-SUFFIX,oauth2.googleapis.com,Google-Gemini-Agent
# Gemini 3.5 web + Spark shell
DOMAIN,gemini.google.com,Google-Gemini-Agent
# Generative Language / Agent API
DOMAIN,generativelanguage.googleapis.com,Google-Gemini-Agent
DOMAIN-SUFFIX,googleapis.com,Google-Gemini-Agent
# Shared assets for login and attachments
DOMAIN-SUFFIX,gstatic.com,Google-Gemini-Agent
DOMAIN-SUFFIX,googleusercontent.com,Google-Gemini-Agent
# Optional developer docs
DOMAIN,ai.google.dev,Google-Gemini-Agent
# Remaining traffic follows your profile
# MATCH,YourDefaultGroup
Critics correctly note that suffix-matching all of googleapis.com is heavy-handed—it routes many unrelated Google APIs. The balanced approach after Google I/O 2026 is to start narrow for Gemini 3.5 and Spark, watch failures during real agent tasks, then promote the smallest suffix that fixes them. Snapshot overrides in Git so subscription merges do not erase your Spark-specific prepend block.
DNS: the hidden half of Agent API routing
In fake-ip mode, Clash may answer applications with synthetic addresses that map back to names internally. That works until a browser performs DNS over HTTPS directly, or until systemd-resolved on Linux answers before Mihomo sees the query. Symptoms include TLS handshakes that start then reset, Spark tasks that die after the first tool call, and “rule exists but never fires” in logs because the core classified an IP-only flow.
Align deliberately: if Clash owns DNS, confirm upstream resolvers are reachable through the exit you intend for DNS traffic. If some apps bypass Clash DNS, either route known DoH hosts explicitly or accept documented IP-CIDR fallbacks. For transparent capture background, read our TUN mode deep dive; for Linux resolver conflicts, see Linux Clash DNS and systemd-resolved.
Meta-class cores expose a dns section that deserves the same discipline as rules. When you route generativelanguage.googleapis.com through a overseas exit but leave DNS on a resolver that returns poisoned or split-horizon answers, the TLS handshake may never reach the policy you wrote. A practical pattern is to send Clash’s upstream DNS through the same logical path you trust for Google AI traffic, or through resolvers that return consistent global answers—not your ISP’s “helpful” redirect for blocked names.
# Illustrative dns block — merge with your profile; names vary by core version
dns:
enable: true
listen: 0.0.0.0:1053
enhanced-mode: fake-ip
fake-ip-range: 198.18.0.1/16
nameserver:
- https://dns.google/dns-query
- tls://1.1.1.1:853
fallback:
- https://cloudflare-dns.com/dns-query
fallback-filter:
geoip: true
geoip-code: CN
The snippet is not a copy-paste prescription: your subscription may already define dns and conflicting duplicate keys will fail validation. Use it to ask whether enhanced-mode matches how Verge sets the system resolver, and whether fallback triggers often enough that Google API names flip between address families mid-session. When fallback fires constantly, Spark looks flaky even though your proxy nodes are fine.
Clash Verge Rev DNS panel vs browser DoH
Chromium may use Secure DNS while Verge advertises a local Mihomo listener—both can look “correct” in isolation. When gemini.google.com resolves through your proxy group but generativelanguage.googleapis.com does not, compare resolver paths before you rotate nodes. Temporarily disable browser DoH as a diagnostic, not as a permanent security posture, and note whether Agent API calls stabilize.
On macOS, check whether iCloud Private Relay or a secondary VPN runs alongside Verge; both can answer DNS outside Mihomo. On Windows 11, corporate Netskope-style agents inject parallel forwarding paths that Clash logs never see. The fix is environmental alignment first, then YAML—otherwise you optimize rules for a socket that never entered the core.
Sniffing and SNI when rules “should” match
When IP-only flows reach Mihomo, sniffing can recover hostnames from TLS Client Hello data so DOMAIN matchers still apply. Sniffing is not free: misconfigured sniff overrides have broken legitimate sites in past Meta releases. If you enable sniffing for Google AI traffic, do so with a narrow override mindset and revert when unrelated apps misclassify. Our sniffing disable and exceptions guide explains when to turn overrides off rather than chasing ghosts in Gemini rules.
Capture: system proxy, TUN, and SDK clients
Spark in the browser usually inherits system proxy or TUN hooks you enable in Verge. SDKs, automation scripts, and some desktop helpers may ignore those settings unless you export HTTPS_PROXY to the mixed port or enable TUN so child processes cannot slip to DIRECT. Mixed capture is why users see “web works, API times out” after enabling Gemini 3.5 in code while Spark in Chrome still fails on a different hostname.
On Windows 11 with Clash Verge Rev, the typical stable stack for developers is: enable system proxy for daily browsing, export HTTPS_PROXY=http://127.0.0.1:<mixed-port> in the shell profile you use for SDKs, and enable TUN only when logs still show DIRECT from spawned workers. Record the mixed port from Verge settings—guessing 7890 when your profile uses 7897 wastes an hour. On Apple Silicon Macs, grant TUN permissions once, then confirm Spark traffic appears in logs after a reboot; macOS updates sometimes reset network extension approval without a visible error in the Gemini UI.
Python and Node SDKs respect environment variables only when the process inherits them. IDEs that launch “Run” in a sanitized environment may strip proxy variables even though your terminal works. Point the IDE’s integrated terminal at the same profile as your manual tests, or route the IDE binary with TUN so every child inherits capture. For WSL2 workflows that call Google APIs from Linux while Verge runs on Windows, read WSL2 sharing Windows Clash before you duplicate rules in two places.
Enterprise filters and secondary VPNs create parallel paths: OAuth succeeds in a clean profile but API calls fail under MDM-injected proxies. Suspect parallel filters before rewriting YAML for the fifth time. If you need process-aware routing on Windows, our PROCESS-NAME rules on Windows article explains when hostname rules are not enough.
Mixin and Profile Override in Verge Rev
Subscription templates refresh often; personal Gemini rules belong in a Mixin or Profile Override snippet that prepends your rules block instead of editing the provider blob by hand. A durable pattern is three files in Git: base-sub.yaml from the airport, google-gemini-agent-prepend.yaml with only LAN plus Google matchers, and dns-notes.md explaining why you chose fake-ip versus redir-host on that laptop. After each provider update, diff merge order—airports sometimes insert a new early MATCH that swallows Agent API traffic until you move your prepend back to the top.
Testing the Agent API without guessing hostnames
After Google I/O 2026, many readers test Gemini 3.5 Flash through the Generative Language API before Spark is available in their account region. A minimal HTTPS probe through the same proxy path as your browser removes ambiguity. Replace the API key placeholder and run from a shell that inherits HTTPS_PROXY if you are not on TUN:
curl -sS -o /dev/null -w "%{http_code}\n" \
-x "${HTTPS_PROXY:-}" \
"https://generativelanguage.googleapis.com/v1beta/models?key=YOUR_KEY"
A 200 or intentional 403 (bad key) still proves routing reached Google’s front; a hang or TLS reset with an empty proxy variable usually means capture failure, not model outage. Compare with the same command after disabling Clash: if both fail identically, fix DNS or keys before tuning rules.
For streaming RPC-style responses, watch Verge logs for long connections to generativelanguage.googleapis.com that change process name mid-session when Spark delegates work. If the first hop matches Google-Gemini-Agent but a follow-up Workspace API line shows DIRECT, append the missing DOMAIN from that log line—Spark failures often are the second hostname, not the model call users focus on.
Log-first verification in five repeatable steps
- Baseline: With your usual profile loaded, open
gemini.google.com, start a small Spark task, and watch Verge’s log for hostnames that hitDIRECTor an unintended group. Export or screenshot the last twenty lines—memory fades when you switch nodes. - API probe: From the same machine, run a minimal Generative Language API request (curl or SDK) and confirm
generativelanguage.googleapis.commatchesGoogle-Gemini-Agent(or your chosen name). Note HTTP status separately from match policy. - Prepend rules: Add missing
DOMAINlines above catch-alls; reload profile; repeat both probes without changing nodes. If behavior changes only after DNS flush, you fixed resolution—not egress quality. - DNS check: If rules never fire, fix resolver alignment first—toggle fake-ip strategy or document DoH bypass—then rerun probes. Log whether Mihomo shows IP-only flows for Google destinations.
- Node sanity: Only after policy is correct, swap exits if latency or quota errors persist; keep notes on model id (
gemini-3.5-flashetc.) and region messages independent of routing.
Structured notes beat screenshot archaeology: Verge build, profile hash, capture mode (system proxy vs TUN), three hostnames from logs, network type. Re-run the ritual after each Google client update or subscription merge.
When you escalate to your airport support, send policy evidence (“generativelanguage.googleapis.com matched DIRECT at 14:03”) instead of “Spark broken.” Support teams respond faster to routing proof than to product names alone.
RULE-SET workflows for teams standardizing on Gemini 3.5
Individuals can maintain a short inline block. Teams often publish an internal RULE-SET for Google AI traffic so reviewers diff hostname additions in pull requests. Pin provider URLs, document ownership, and schedule updates after each Google I/O keynote—not on every automatic refresh interval. When a shared ruleset includes aggressive REJECT lines for analytics, Spark may break after a silent merge even though Gemini 3.5 web still loads.
Keep human-readable changelogs outside auto-generated blobs: “2026-05-21 added Workspace host X after Spark Drive step failed.” Future you will not remember why a labs hostname exists. For provider mechanics, revisit the custom rules tutorial’s merge section before you trust a 10k-line community list titled “Google AI 2024.”
Symptom cookbook for Gemini 3.5 and Spark
- Web loads, Spark task stalls: align DNS and capture; orchestration hosts may still hit
DIRECTwhile tabs use your proxy group. - Agent API 403/404 despite “proxy on”: verify API keys, model strings, and billing; then check whether only the SDK bypasses Clash.
- Streams die mid-tool-call: inspect HTTP/2 keep-alives, jittery relays, or REJECT rules on telemetry hosts Spark now requires.
- Region unavailable in API but not browser: classic split-brain—different exits or DNS paths for
generativelanguage.googleapis.comvsgemini.google.com. - Regression after subscription refresh: diff merge order; early
MATCHlines swallow Google matchers you added for I/O features. - Failures only on office Wi-Fi: captive portals and split DNS mimic AI outages—try a hotspot before suffix explosions.
Compared with other 2026 agent and coding hotspots
If you run multiple agents on one laptop, keep separate proxy groups with boring names. Claude Code CLI centers on Anthropic fronts; Kimi K2.6 uses Moonshot’s OpenAI-compatible API; Codex in ChatGPT stresses long browser sessions. Google’s stack feels familiar until you assume Anthropic YAML covers generativelanguage.googleapis.com. Duplicate the disciplined capture workflow per vendor instead of aliasing unrelated suffix rules.
For CI runners without a local Clash sidecar, compare Cursor Agent SDK plus Clash split rules so you do not confuse laptop TUN with headless pipelines.
Maintaining overrides through subscription churn
Snapshot prepend layers in Git, review diffs when remote templates update, rerun the five-step ritual after every provider merge. Gemini Spark will ship minor client bumps quickly; treat DOMAIN literals like application dependencies with a changelog outside auto-generated blobs.
Privacy and workplace policy
Routing changes network paths—not contractual entitlements, export controls, or employer bans on unauthorized TUN. Google’s terms and workspace policies apply regardless of which exit relays bytes. Never paste API keys into shared log channels; redact hostnames if your SIEM is public-facing.
FAQ-style quick answers
Do Gemini 3.5 Flash and Spark share the same rules?
Yes for most users: both lean on generativelanguage.googleapis.com and the Gemini web shell. Spark may add Workspace API hostnames—log them during real tasks and append DOMAIN lines rather than duplicating entire profiles.
Should I route all of google.com through the proxy?
Routing all of google.com stabilizes OAuth faster but changes unrelated Google services. Many users accept that trade-off for simplicity; others keep identity traffic granular once logs show which redirects matter for Spark.
Is this guide enough if I only use the API, not Spark?
The Agent API sections still apply. Skip Spark-specific orchestration notes and focus on generativelanguage.googleapis.com, OAuth hosts, and CLI capture from the Gemini CLI article.
Put Gemini 3.5 and Spark on routing you can audit
Gemini 3.5 and Gemini Spark reward the same infrastructure hygiene as every other 2026 agent launch: one capture story, Google AI hostnames prepended ahead of greedy MATCH lines, DNS that agrees with fake-ip, and Mihomo logs that prove policy before you blame the model.
Compared with blunt whole-device VPN tunnels that hide which process used which egress, many one-toggle clients leave SDKs and background agents guessing—especially when Spark spawns nested workers behind your back. Clash exposes rule names beside destinations so you tighten YAML deliberately instead of reinstalling opaque profiles after each Google I/O announcement.
Grab a Meta-capable build from our official download hub, wire the Google-Gemini-Agent block above your catch-alls, mirror DNS policy to your resolver strategy, and reuse this checklist whenever Agent API or Spark misbehaves after the next feature drop.