Gemini proxy
Gemini proxy is the Gemini ISP: a dedicated native IP, 8 PTC for 30 days, in a country on both Google lists — the Gemini app and AI Studio.
View options and pricingGemini availability is decided by Google; its terms allow use only within an available region, and a proxy does not change that. This guide covers the network side: a proxy for the Gemini web app, Google AI Studio and the Gemini API, and how to diagnose common errors.
This article is about network setup, not about whether Gemini is available to you. The Gemini API Additional Terms of Service say: "You may only access the Services (or make API Clients available to users) within an available region." Google determines the region from the IP address of the request and from other data, such as account settings. The country lists for the Gemini web app, Google AI Studio and the Gemini API can differ, so one of them may be available to you while another is not. Current country lists are in the guide to countries where ChatGPT, Claude and Gemini work.
For the Gemini web app at gemini.google.com, it is enough to set up a proxy at the operating system level or use a browser extension. With system-level proxy configuration, the browser automatically uses it for all requests, including access to Gemini. An alternative is proxy management extensions such as SwitchyOmega, which let you quickly switch between several proxies without changing system settings.
If you use an authenticated proxy, make sure your username and password are entered in the extension or system settings. After setup, check that the browser actually uses the proxy: open an IP checking service and confirm the displayed address matches the selected region. To check the exit country, see the guide to checking a proxy's exit IP.
Google AI Studio is available at aistudio.google.com and is used to create API keys, manage projects, and test models. Like the Gemini web app, AI Studio determines access based on the exit IP address.
A static ISP IP is convenient here: it does not change during the lease, so the address does not jump in the middle of work and it is easier to find the cause of an error. AI Studio can have a different country list from the web app, so a working connection does not mean AI Studio is available to you.
In our hourly check of Gemini on 23 October 2026, 15:47 UTC, the United States exit was in Denver on Comcast Cable Communications, LLC (AS7922); the Germany exit was in Köln on NetCologne Gesellschaft fur Telekommunikation mbH (AS8422). One sample, not an average.
You can call the Gemini API from code through the official Python SDK or over HTTP (for example with cURL). In both cases, the proxy is set through environment variables or client parameters.
Set the environment variables before you run the script or command. For an HTTP proxy, use HTTPS_PROXY:
export HTTPS_PROXY='http://username:password@proxy-host:port'Example only: replace the placeholder values with your own.
If your password contains special characters (such as @ or :), encode them with percent encoding: p%40ss instead of p@ss. An unencoded @ symbol breaks proxy address parsing. Add localhost and 127.0.0.1 to the NO_PROXY variable so that local services do not try to route through the proxy:
export NO_PROXY=localhost,127.0.0.1Example only: replace the placeholder values with your own.
For the official Python Gen AI SDK to work with SOCKS5 proxies, you need to additionally install the httpx[socks] package, then pass proxy parameters through HttpOptions when creating the client. For HTTP proxies, the HTTPS_PROXY environment variable alone is sufficient.
When calling the Gemini API via cURL, use the -x flag to specify the proxy, or set HTTPS_PROXY in your environment. To verify functionality, you can execute a models.list request — a successful response with code 200 and a list of models means the proxy configuration is correct.
HTTP proxies are supported by all methods of accessing Gemini: browser, Python SDK, cURL, and command line. SOCKS5 has more limited support: in the official Python Gen AI SDK it works through the httpx[socks] library, while support for SOCKS5 in command-line tools depends on the version. If connection drops occur with SOCKS5, switch to an HTTP proxy.
Gemini CLI reads its proxy from environment variables. According to its source code, it uses the first of HTTPS_PROXY, https_proxy, HTTP_PROXY and http_proxy that is set, in that order. Set one of them to the HTTP address of your proxy before you start gemini.
The Gemini CLI documentation does not describe SOCKS support, so use the HTTP endpoint of your proxy (for Proxy302 that is the HTTP port, 2222).
Sign-in: Google's notice on Gemini Code Assist for individuals says that from June 18, 2026 the Login with Google option no longer gives access to the IDE extensions or Gemini CLI for Gemini Code Assist for individuals, Google AI Pro and Google AI Ultra. Gemini Code Assist Standard and Enterprise subscriptions follow a separate schedule. Read the notice before you plan how to sign in.
# macOS, Linux, WSL
export HTTPS_PROXY='http://username:password@proxy-host:port'
geminimacOS, Linux, WSL. Example only: replace the placeholder values with your own.
# Windows PowerShell
$env:HTTPS_PROXY = "http://username:password@proxy-host:port"
geminiWindows PowerShell, for the current window. Example only: replace the placeholder values with your own.
MCP adds tools to Gemini CLI. With the proxy302-mcp server, Gemini CLI can get a Proxy302 proxy and fetch pages through it. Add the entry below to ~/.gemini/settings.json, or to .gemini/settings.json inside one project.
proxy302-mcp is the official Proxy302 MCP server, open source on GitHub and maintained by the Proxy302 team. Proxy302 also runs it at https://proxy302.com/v1/mcp: clients that can send an Authorization header, such as Claude Code, Cursor and VS Code, connect with an API key and install nothing.
This is a separate setting from the proxy variables above. They decide how Gemini CLI itself connects; the MCP server's tools have their own settings. The guide to the Proxy302 MCP server covers the tools, the other clients and the limits.
{
"mcpServers": {
"proxy302": {
"command": "npx",
"args": [
"-y",
"github:proxy302/proxy302-mcp"
],
"env": {
"PROXY302_API_KEY": "<key id>:<secret>"
}
}
}
}File ~/.gemini/settings.json. Replace <key id>:<secret> with your Proxy302 API key.
This message means Google does not offer the service in the region it associates with you. The Gemini web app, AI Studio and the API can have different country lists, and a proxy does not change Google's terms. To see which address Google receives, check:
Which address is actually in use: make sure other VPNs or proxies are off and traffic goes only through the proxy you chose
These occur due to connection problems with the proxy, incorrect address or port, expired proxy rental period, or network congestion. What to check:
Correctness of the proxy address, port, and credentials
Proxy availability on the network (ping, test request)
Validity period of the proxy rental
These appear when the username or password is incorrect. A common cause is unencoded special characters in the password. Check that the password uses correct percent encoding and that the credentials match those shown in My assets.
Send a request through the proxy to an IP checking service (for example, curl -x http://user:pass@host:port https://ipinfo.io/json for HTTP proxies or curl -x socks5h://user:pass@host:port https://ipinfo.io/json for SOCKS5). In the response, find the country field and compare it with the expected region. Step-by-step instructions are in the guide to checking a proxy's exit IP.
These services can have different lists of supported countries, so one may be available to you while the other is not. A proxy does not change that. The country lists are in the reference guide for supported countries.
A static ISP IP does not change for the entire rental period, while rotating residential proxies are suitable for short checks where you do not need the same address.
For the browser, no: Chrome and Edge use the system proxy. curl and most CLI tools ignore system settings, so the reliable way is to set HTTPS_PROXY (and NO_PROXY) in the same terminal session before running them, including for the Python SDK.
Try switching to an HTTP proxy: most tools support it. If you specifically need SOCKS5, make sure the httpx[socks] package is installed for the Python SDK.
A static ISP lease fits this routine: the IP stays fixed while the lease runs and does not rotate, so one address stays with one account or one tool. The page on Gemini proxies has the preset and the full setup, and the static ISP page describes the product. The table below is our latest hourly check of Gemini through exits in 7 countries. The check runs through rotating residential exits, not static ISP IPs: it shows whether the service responds from these countries, not the quality of a particular leased IP; response time is measured from our probe in Asia.
| Item | Network (ISP) | ASN | Response, ms |
|---|---|---|---|
| United States | Comcast Cable Communications, LLC | AS7922 | 314 |
| United Kingdom | Plusnet | AS6871 | 345 |
| Germany | NetCologne Gesellschaft fur Telekommunikation mbH | AS8422 | 6441 |
| Japan | NTT DOCOMO BUSINESS,Inc. | AS4713 | 331 |
| Singapore | Whiz Communications Pte Ltd | AS135600 | 459 |
| Brazil | KMM TELECOM LTDA-ME | AS264542 | 734 |
| Indonesia | PT Telekomunikasi Indonesia | AS7713 | 367 |
Hourly check of the Proxy302 probe, 23 October 2026, 15:47 UTC: one request to Gemini per country through a dynamic residential exit, using the public Proxy302 entry. Only the first three octets of an IP are public. One sample per country, not an average; later checks will differ.
Open the static ISP page, choose the country, the term and the quantity, and the protocol, HTTP or SOCKS5. The protocol is fixed for each IP when you buy it.
Generate the IPs, then open My assets (the console page that holds everything you bought) and copy HOST, PORT, USERNAME and PASSWORD. The Tools & checks page shows a ready example with your own endpoint.
Enter the details in the browser profile, tool or phone that will use the IP.
Check the exit with https://ipinfo.io/json through the proxy. The country field should match the country you chose.
From mainland China, open Proxy302 Fast Connect from the Tools & checks page, click 「一键加速」 (One-click boost) and keep it open while you use the proxy.
A static ISP IP costs US$0.50 for one day and US$7.99 for 30 days, about US$0.27 per day, the same in every country. Availability changes daily and is shown on the order page. There is no free trial, and the smallest purchase is one IP for one day. An IP does not lift a restriction, undo a ban or raise a limit.
| Item | Price | Protocols | Locations | Fits agent work like |
|---|---|---|---|---|
| Rotating residential | From US$1.50 per GB (Budget line); US$5 per GB (Premium line); lower per GB in larger packages | HTTP, SOCKS5 | 195+ countries and regions; state and major city on lines that support it | Browsing and research agents, data collection |
| Static ISP, per IP | US$0.50 for 1 day, US$7.99 for 30 days, the same in every country | HTTP or SOCKS5, chosen per IP | 30 countries on the order form; stock changes daily | One fixed IP for each account an agent signs in to |
| ISP for AI subscriptions | Per 30 days: Claude 15 PTC, GPT / Grok 10 PTC, Gemini 8 PTC; the first order in each tier is 50% off | HTTP or SOCKS5 | Claude: US, UK, DE, JP. GPT / Grok: US, UK, FR, JP, KR. Gemini: US, UK, FR, JP | Coding tools and agents signed in to ChatGPT, Claude, Gemini or Grok |
| Datacenter, per IP | US$0.25 for 1 day, US$3.99 for 30 days | HTTP or SOCKS5, chosen per IP | 8 countries | API calls and tool traffic where the IP type does not matter |
| proxy302-mcp | Free, open source (MIT) | MCP over stdio, started with npx | Uses the products above | Lets Claude Code, Codex, Cursor and other MCP clients get a proxy and fetch pages through it |
Prices are in PTC, paid from the wallet; 1 PTC = US$1. There is no free trial: the smallest purchase is 1 GB of rotating residential traffic or one IP for one day. Checked on 4 November 2026.
Yes for its own connection: Gemini CLI reads HTTPS_PROXY, https_proxy, HTTP_PROXY and http_proxy, the same kind of variables as above, in that order. Its documentation does not describe SOCKS, so use the HTTP endpoint. An MCP server added to Gemini CLI is a separate setting.
Official documentation · Confirmed on:
Read on 24 October 2026: "You may only access the Services (or make API Clients available to users) within an available region."
Product observation · Confirmed on:
Product facts file of the site (values checked against the console, the backend and the price table on 18-19 October 2026): products, prices in US$ (1 PTC = US$1), lease terms, protocols and ports, countries, quantity limits, no free trial.
Product observation · Confirmed on:
Public JSON of the probe at proxy302.com/live/connectivity/gemini.json, read 23 October 2026, 15:47 UTC: one request per exit country through a dynamic residential exit; exit city, ASN, network and response time.
Official documentation · Confirmed on:
Read on 4 November 2026: the mcpServers object in settings.json with command, args and env; user settings in ~/.gemini/settings.json and project settings in .gemini/settings.json.
Official documentation · Confirmed on:
Source read on 4 November 2026: the proxy value is the first set of HTTPS_PROXY, https_proxy, HTTP_PROXY, http_proxy.
Source code, not user documentation; behaviour can change between versions. The documentation read does not describe a --proxy option, a proxy key in settings.json or SOCKS support.
Official documentation · Confirmed on:
Opened on 4 November 2026: from June 18, 2026 Login with Google no longer gives access to the IDE extensions or Gemini CLI for Gemini Code Assist for individuals, Google AI Pro and Google AI Ultra; Standard and Enterprise subscriptions follow a separate schedule.
Product observation · Confirmed on:
README of the official Proxy302 MCP server: install commands, environment variables, the seven tools, the read-only, spend-free scope and the hosted endpoint https://proxy302.com/v1/mcp.
Product observation · Confirmed on:
Public JSON at proxy302.com/v1/proxy/ai-isp/catalog, read 4 November 2026: three tiers (Claude, GPT / Grok, Gemini), price per 30 days in PTC, 50% off the first order in a tier, cities by country.
Create an account, top up once, then pick rotating residential, static ISP or datacenter IPs and have one running in your browser within minutes.