Last updated:

Using Gemini in China

Gemini does not load on a connection in mainland China, because Google is blocked there, and it can still refuse you on a VPN if the VPN comes out somewhere Google does not offer it. You need a VPN that exits in a supported country, and that keeps using the same exit.

Two separate blocks

The first is the Great Firewall. From mainland China, Google is unreachable on an ordinary connection: Search, Gmail, Google sign-in and Gemini all fail to load. Any working VPN fixes that part.

The second is Google's own. Gemini, AI Studio and NotebookLM check where a request comes from, and refuse locations where Google does not offer them with a message that the service isn't available in your country. A VPN that exits in Hong Kong, the closest place to the mainland and where many VPNs and travel eSIMs come out, is the usual way people hit this even with the VPN on.

What DopeVpn does

ChatGPT, Claude, Gemini, Cursor and other AI traffic is routed automatically through dedicated AI exits in Japan (Tokyo / Osaka), and each account keeps the same exit — nothing to set up, including on the free trial.

For Google that covers gemini.google.com, AI Studio, the Gemini API (generativelanguage.googleapis.com), the backend Gemini CLI and Gemini Code Assist talk to, and NotebookLM. They go out through an AI exit even if you have picked a Hong Kong server for everything else.

Your Google sign-in, Gmail, YouTube and the rest of Google use whichever server you have selected, like any other site.

We cannot promise that Google will never ask you to verify a sign-in or restrict an account; those decisions are theirs. What the routing removes is the avoidable cause: an exit in a place Gemini does not serve, changing from one request to the next.

Signing in

  • —Gemini uses your Google account, and Google sign-in is blocked in China like everything else from Google, so sign in with the VPN already connected
  • —Google may ask you to confirm a sign-in from a new country. Have your recovery phone or another signed-in device to hand, or sign in on each device before you travel
  • —If a tab was opened before the VPN was on, Gemini can keep showing the unavailable message. Reconnect, then open a private window and sign in again

Gemini CLI and the API

Gemini CLI runs in a terminal, and terminal programs do not read the system proxy that a desktop VPN app sets. The browser part of its sign-in works, and then the CLI itself cannot reach Google. There are two fixes, both in the DopeVpn desktop app:

  • —Turn on Enhanced mode under Connection mode. It routes every program on the computer through the VPN, terminals included. It needs administrator rights on Windows and your password once on a Mac (Mac app 0.5.33 or later)
  • —Or connect, click Copy terminal proxy command and paste it into the terminal. It applies to tools started from that window, so paste it again in each new one

Calls to the Gemini API from your own code follow the same routing once their traffic actually goes through the VPN — with Enhanced mode on, or with the proxy variables from that command set.

Other AI tools

The same routing covers ChatGPT and Claude; see using ChatGPT in China and using Claude in China. For terminal tools side by side, see Codex CLI, Claude Code and Gemini CLI in China. AI routing is included on every plan; prices are on the pricing page.

Quick answers

Does Gemini work in China? Not on a mainland connection: Google's services, Gemini included, are blocked there. It works through a VPN, as long as the VPN's exit is in a country where Google offers Gemini. Hong Kong exits are a common reason it still refuses.

Why does Gemini say it isn't available in my country when my VPN is on? The VPN is probably exiting somewhere Gemini is not offered, most often Hong Kong, or the page was first opened before the VPN was on. DopeVpn sends Gemini, AI Studio, the Gemini API and NotebookLM through its AI exits in Japan whichever server you have selected. Reconnect, then sign in again in a private window.

Why does Gemini CLI fail when gemini.google.com works in my browser? Terminal programs ignore the system proxy that desktop VPN apps set, so Gemini CLI is not actually using the VPN. In DopeVpn, turn on Enhanced mode or paste the app's terminal proxy command into the terminal.

AI routing is on by default

Including on the 3-day free trial. Nothing to configure.

Create a free account

Want the numbers first? See plans and prices