ESC
AI 1 分钟阅读

Gemini配置检查器:链式区域扫描器,寻找能让你进入Google AI Studio和Gemini的代理配置(登录浏览器检查,抗DPI,支持Windows/macOS/Linux/Android)

链式区域扫描器,通过登录浏览器检查寻找能访问Google AI Studio和Gemini的代理配置,支持抗DPI,覆盖Windows/macOS/Linux/Android平台,帮助用户突破区域限制。

来源:GitHub

\"Gemini/Check\"

\n\n

\n 英文 · فارسی\n

\n\n

\n \n \"Download\n \n

\n\n# Gemini 配置检查器\n\n找到真正能让你进入 **Google AI Studio 和 Gemini** 的代理配置,通过模拟真实用户的方式测试每个配置:在\n*已登录*的浏览器中,通过你实际使用的路线进行访问。\n\n> **版本 0.1.0,早期预发布版。** 目前已在 Windows 上完成端到端测试(唯一实际运行过的平台)。macOS、Linux 和 Android 构建来自 CI 流程,尚未在真实设备上验证。欢迎报告测试结果。\n\n## 两种模式,一个开关\n\n页头处的 **简单 / 高级** 开关决定了测试内容。标题下方的路线图会随之变化。\n\n| | **简单** | **高级** |\n|---|---|---|\n| 解决的问题 | *我的哪些配置可用?* | *通过我的配置,哪些免费配置可用?* |\n| 路线 | 你 → **配置** → AI Studio / Gemini | 你 → **基础配置** → **免费配置** → AI Studio / Gemini |\n| 你需要提供 | 你的配置(链接、订阅 URL 或 base64),或选择现成的免费列表 | 一个可用的基础配置,加上一个免费列表或粘贴的配置 |\n| 抗 DPI 配置文件应用于 | 每个被测试的配置(每个配置从你的机器发起连接) | 基础配置的第一跳(免费配置在其隧道内运行) |\n| 典型用途 | 检查一堆已有的配置;在依赖某个配置前进行验证 | 你的 Cloudflare 配置可用,但需要一个 Google 可接受的*不同出口* |\n| 导出 | 链接、base64、单个配置的完整 Xray 配置 | 链接、base64、链式 Xray 配置(`基础 → 免费`) |\n\n## 目录\n[致谢](#致谢与参考) · [为什么需要已登录的浏览器](#为什么需要已登录的浏览器) · [下载与安装](#下载与安装) ·\n[用户指南](#用户指南) · [故障排除](#故障排除与常见问题) · [隐私与安全](#隐私与安全) · [从源码构建](#从源码构建) · [发布与 CI](#发布与 ci)\n\n## 致谢与参考\n\n本项目因其他人的工作而存在。请去使用并为他们点星。\n\n| 项目 | 贡献 |\n|---|---|\n| [**0xRadikal/Free-v2ray-Configs**](https://github.com/0xRadikal/Free-v2ray-Configs) | 自动更新的免费配置列表(`已验证`、`快速`、`安全`等),本工具扫描的就是这些列表 |\n| [**patterniha**](https://github.com/patterniha) | [PattN](https://github.com/patterniha/PattN)(Windows / Linux / macOS 客户端)和 [PattNG](https://github.com/patterniha/PattNG)(Android):抗 DPI 配方,以及其 [Xray-core 分支](https://github.com/patterniha/Xray-core) 中的 `finalmask` 语义,我们的分片转发器据此复现 |\n| [**bia-pain-bache/BPB-Worker-Panel**](https://github.com/bia-pain-bache/BPB-Worker-Panel) | Cloudflare Worker 面板,生成本工具链式使用的许多基础配置(patterniha 维护了一个 [分支](https://github.com/patterniha/BPB-Worker-Panel)) |\n| [抗 DPI 配方帖子](https://t.com/MatinSenPaii/5469) | 用作默认值的确切 Finalmask / 指纹 / ALPN / 密钥值 |\n| [MatinSenPai/SenPaiScanner](https://github.com/MatinSenPai/SenPaiScanner) | 用于查找干净 Cloudflare IP 的配套工具,可作为配置的地址 |\n| [XTLS/Xray-core](https://github.com/XTLS/Xray-core) | 内嵌在应用中的代理引擎 |\n| [2dust/v2rayN](https://github.com/2dust/v2rayN) | “带链导出”遵循的配置布局(PattN 是其分支) |\n| [Wails](https://wails.io) | 原生桌面外壳 |\n| [Vazirmatn](https://github.com/rastikerdar/vazirmatn) 和 [JetBrains Mono](https://github.com/JetBrains/JetBrainsMono) | UI 使用的字体(SIL 开源字体许可) |\n\n## 为什么需要已登录的浏览器?\n\nGoogle 根据**已登录账户**在页面加载后决定区域可用性。普通的 HTTP 请求(即使使用 Gemini API 的假密钥)会从每个国家回答“正常”,因此连通性检测会将每个在线配置标记为健康。实测过程中发现:出口位于美国、香港和新加坡的配置被阻止,且同一出口可能随时间变化。唯一可靠的信号是 Google 向已登录用户显示的内容,因此本工具读取的是该信息:\n\n| 产品 | “被阻止”的表现 |\n|---|---|\n| AI Studio | 重定向至 `/docs/available-regions` |\n| Gemini | “Gemini 目前不支持您所在的国家/地区” |\n\n## 下载与安装\n\n从 [发布](../../releases) 页面获取适合您系统的构建版本。每个发布都附带 `SHA256SUMS.txt`。\n\n| 平台 | 桌面应用(原生窗口) | Web 服务器(UI 在浏览器中) | 区域检查 |\n|---|---|---|---|\n| Windows | amd64, arm64 | amd64, arm64 | ✅ 需要 Chrome / Edge / Brave |\n| macOS | 通用(Intel + Apple Silicon) | amd64, arm64 | ✅ 需要 Chrome / Edge / Brave |\n| Linux | amd64 (GTK 3 + WebKitGTK 4.1) | amd64, arm64, armv7 | ✅ 需要 Chrome / Chromium / Edge / Brave |\n| Android 8+ | **APK** (arm64-v8a) | 从源码构建适用于 Termux(`GOOS=android`) | ❌ 仅连通性模式 |\n\n
Windows\n\n1. 下载 `gemini-config-checker-desktop__windows_amd64.zip`(或 `arm64`)并解压到任意位置。\n2. 运行 `GeminiConfigChecker.exe`。Windows 10/11 已内置 WebView2;如果 SmartScreen 警告,请选择 *更多信息 → 仍然运行*(构建未签名)。\n
\n\n
macOS\n\n1. 下载 `..._macos_universal.zip`,解压并将 `.app` 移动到 *应用程序*。\n2. 首次启动:右键点击应用 → *打开*。如果 macOS 仍拒绝:`xattr -dr com.apple.quarantine \"/Applications/GeminiConfigChecker.app\"`。\n
\n\n
Linux\n\n1. 一次性安装运行时库:`sudo apt install libgtk-3-0 libwebkit2gtk-4.1-0`(Debian/Ubuntu;使用发行版对应的等价命令)。\n2. `tar -xzf gemini-config-checker-desktop__linux_amd64.tar.gz`,然后运行 `./GeminiConfigChecker`。\n3. 如果没有桌面环境?改用 **Web 服务器** 构建:`./gemini-config-checker` 并打开 `http://localhost:8787`。\n
\n\n
Android\n\n1. 在手机上下载 `gemini-config-checker__android_arm64.apk`。\n2. 为浏览器或文件管理器允许 *安装未知应用*,然后打开 APK。\n3. 启动应用。持久通知(“扫描引擎运行中”)是预期的:引擎作为前台服务运行,以便长时间扫描在屏幕关闭后仍能继续。使用其 **停止** 操作退出引擎。\n4. APK 仅运行 **连通性** 模式(见 [设置参考](#7-settings-reference))。Android 不允许应用驱动已登录的 Chromium,因此无法在该平台上验证区域。\n5. 发布的 APK 使用仓库密钥签名(如果配置了),否则使用一次性密钥:它可以安装,但后续构建无法就地更新,因此请先卸载。\n
\n\n
Web 服务器(任何 OS、服务器、Termux)\n\n`./gemini-config-checker` 在 `http://localhost:8787` 提供相同的 UI 并打开浏览器。标志:`-addr 127.0.0.1:8787`、`-no-open`、`-version`。\nUI **无身份验证**:请保持在本地主机上,或通过隧道(`ssh -L 8787:localhost:8787 your-server`)而非直接暴露。\n
\n\n## 用户指南\n\n### 1. 首次启动\n窗口有三个标签页:**扫描**(测试内容及方式)、**结果**(实时列表、筛选、复制按钮)和**导出**。\n页头包含 **简单 / 高级** 开关、扫描状态和明/暗主题按钮。勾选“记住”时,输入内容会在本设备上 remembered(在共享计算机上请取消勾选)。\n\n### 2. 选择模式\n* 使用 **简单** 模式当你已有配置并想知道哪些可用,或正要依赖某个配置前进行验证。\n* 使用 **高级** 模式当你的 Cloudflare 配置可连接但 Google 阻止其出口:在其后链入免费配置以获得其他出口。\n* 随时可切换开关。结果保留产生它们的扫描模式;导出和复制按钮随之变化。\n\n### 3. 使用 Google 登录(区域检查)\n区域检查会以*你*的身份打开 AI Studio 和 Gemini。点击 **使用 Google 登录** 一次:\n1. Chrome / Edge / Brave 窗口会在**单独的配置文件**中打开,仅本应用使用。正常登录。应用不会看到你的密码。\n2. 检测到登录后,窗口会自动关闭,卡片变为“Google 账户已连接”。登录信息会为下次记住。\n3. 最好使用 **次要账户**:请求来自多个 IP,Google 可能显示“可疑登录”提示。\n4. **从应用中移除账户** 仅删除该私有配置文件。它从不触及你的日常浏览器或账户。\n\n未安装浏览器,或在 Android 上?将 *检查类型*(设置)切换为 **仅连通性**:无需登录或浏览器。\n\n### 4. 简单模式逐步操作\n1. 将配置粘贴到框中,每行一个:`vless://`、`vmess://`、`trojan://`、`ss://`。订阅 URL(`https://…`)或 base64 文本也可。\n 留空框以测试现成的免费列表(在下方选择一个)。\n2. 如果你处于普通 Cloudflare 配置无法连接的网络,请保持 **抗 DPI** 开启(见 [第6节](#6-the-anti-dpi-profile))。\n3. 登录(区域检查)或选择仅连通性。\n4. 按 **开始扫描**(或 `Ctrl`+`Enter`)。观察 **结果** 标签页填充。\n\n### 5. 高级模式逐步操作\n1. **基础配置**:一个对你可用且*不会*在 AI Studio 遇到区域墙的配置。粘贴分享链接,或完整的 Xray JSON,甚至多跳链\n (例如一个 ex

it that already dials through a Cloudflare worker). This is the route every free config will be chained behind. 2. Anti-DPI: applied to the base config’s first hop, the connection that leaves your machine. 3. Source: choose a ready-made list (verified is recommended) or paste free configs yourself. custom accepts any subscription URL. 4. Settings, sign-in, Start scan. Before testing the free configs, the app tests your base config first and stops with a clear message if the base itself cannot reach Google.

6. The anti-DPI profile

Inside Iran, plain Cloudflare configs mostly connect only with the settings below (recipe by patterniha / PattN). The values can change, so every one is editable; Suggested values restores the defaults.

SettingDefaultWhat it does
Finalmask (JSON)two fragment masks: tlshello with lengths [0,104,1], then 1-1 with lengths [114,1]splits the TLS ClientHello so filters cannot read the server name
Fingerprintunsafenative Go TLS instead of a browser imitation, so the cipher list below applies
ALPNhttp/1.1
Cipher suitesthe 13-suite list from the recipe
Clean IPemptyreplaces the connection address (the old domain stays as SNI and Host)
  • Read from config: if the config you pasted already carries these values (finalmask, cipherSuites, alpn in JSON, or fm, ciphers, alpn, fp link parameters), this button copies them into the form.
  • Stock xray-core only supports one length/delay per fragment mask, while the recipe uses per-segment lengths/delays (a PattN fork feature). The app runs the same fragmenting algorithm in a small local forwarder in front of the connection. Only fragment masks are supported; other mask types are rejected with a clear message.
  • Switch the profile off outside filtered networks; it only adds latency there.

7. Settings reference

SettingDefaultMeaning
Check typeRegion with signed-in browserRegion: opens AI Studio and Gemini and reads Google’s verdict (accurate, 20–40 s per config). Connectivity only: just proves the route reaches Google and measures latency (fast, no sign-in, but the region is not checked)
“Healthy” meansAI Studio and GeminiRequire both, only AI Studio, or only Gemini
Max configs60How many configs to test (the list is shuffled first)
Simultaneous browser checks4Each uses about 200 MB of RAM; lower it on small machines
Simultaneous connectivity tests20The cheap first stage that drops dead configs before the browser stage
Connectivity timeout10 sRaise it on slow links
RememberonStores configs and settings in the app’s local storage on this device only

8. Reading the results

  • Healthy / Connected: white label. In region mode it means your “healthy” rule passed; in connectivity mode it only means “reachable”.
  • Region blocked: Google showed the region wall for at least one product you require. The AI Studio and Gemini columns show each product (✓ free, ✗ blocked).
  • Error: dead config, timeout, or a browser problem; hover the label for the reason.
  • Ping is the latency of one request through the full route. The first tile shows the number tested, and “base ping” (advanced) or “lowest ping” (simple).
  • Filter by status, search by name or address, sort by ping or name, and select several rows for bulk copy.
  • A verdict is a sample, not a guarantee. The exit of a Cloudflare Worker can change between connections, so the same route may pass now and fail a minute later. Re-test the config you intend to keep.

9. Using what you found

  • Copy puts the share link on the clipboard. Paste it into your client (v2rayN, Hiddify, PattN, …), or into BPB’s Chain Proxy field.
  • Copy with chain (advanced) / Copy full config (simple) puts a ready-to-import Xray config on the clipboard. The Export tab does the same and can save a .json file. Choose the target client:
TargetOptionfinalmask in the file
PattN / PattNGPattN / PattNG (with finalmask)included
Xray / v2rayN with the stock coreXray / v2rayN standardremoved (stock cores cannot parse the fork’s schema)

The file uses the classic vnext / servers layout (old and new cores accept it), mixed inbounds on 10808 and 10809, pinned DNS and a UDP/443 block. In v2rayN: Servers → Add custom configuration server and pick the file. To try it without a GUI: xray run -c file.json.

  • Export tab: links (one per line), a base64 subscription, or the Xray config; limit how many, copy, or save.

10. Android notes

Same UI, connectivity mode only, default Simple. The foreground notification keeps the engine alive during a scan; tapping it reopens the app, Stop shuts the engine down. “Save to file” opens Android’s file picker.

Troubleshooting and FAQ

SymptomWhat to do
“No Chrome / Edge / Brave found”Install one, or choose connectivity only. Searched: Windows Program Files / per-user installs / the registry “App Paths” (Chrome, Edge, Brave, Chromium, Vivaldi, Opera); macOS /Applications, ~/Applications and Spotlight; Linux PATH, /usr/bin, /snap/bin, /opt/.... A browser somewhere else: set GCC_BROWSER (or CHROME_BIN) to its executable. Flatpak browsers cannot be driven.
Linux: sign-in window does not openThe window needs a graphical session (DISPLAY / WAYLAND_DISPLAY); on a server, sign in on a desktop. Snap browsers work (the profile is kept under ~/snap/<browser>/common); as root the browser starts with --no-sandbox.
“Google session expired, sign in again”Press Sign in with Google again. A sign-in redirect must persist for several seconds before the app believes it, so a brief redirect no longer aborts a scan; if it still happens, Google really asked you to sign in again (often a security check after many IPs).
Everything times outThe base config (advanced) or the configs themselves (simple) cannot connect. Inside a filtered network turn the anti-DPI profile on and try a clean IP; make sure the base config works in your normal client.
AI Studio passes but Gemini is blocked (or the reverse)They use different region rules. Change “Healthy” means if you only need one.
A config passed, then failed laterSee “A verdict is a sample”: the exit varies per connection. Re-test before relying on it.
“A scan is already running”Stop it first (the red button in the bar or in Results).
Windows SmartScreen / macOS Gatekeeper warnsThe builds are unsigned. Use Run anyway / right-click → Open (see Download).
Linux: window does not openInstall libgtk-3-0 and libwebkit2gtk-4.1-0, or use the web server build.
Android: install blockedAllow “Install unknown apps” for the app you used to open the APK.
Android: “App not installed as package appears to be invalid”The file is damaged or incomplete (a half-finished download, or a repository page saved as .apk). Download it again, check its size and SHA256SUMS.txt, or install it from a computer with adb install file.apk. It also appears when an APK signed with a different key is installed over an older build: uninstall the old app first.
Start over completelyRemove account from app, then delete the app’s local storage (Windows: %AppData%\GeminiConfigChecker; macOS: ~/Library/Application Support/GeminiConfigChecker; Linux: ~/.config/GeminiConfigChecker).

Privacy and security

  • Sign-in happens in your browser, not in the app; cookies live in memory only. The isolated profile never touches your everyday browser profile or accounts.
  • Traffic to Google is end-to-end TLS; a free-config operator sees destinations, not content. Do not push sensitive traffic through free configs.
  • Your configs and settings are stored only in the app’s local storage, and only if “remember” is ticked. They are never sent anywhere except through your own routes.
  • The web server binds to 127.0.0.1 and rejects foreign Host headers and non-JSON POSTs, but it has no authentication.

Details and reporting: SECURITY.md.

Build from source

Requires Go (see go.mod). The desktop app additionally needs Wails v2 and the platform webview (WebView2 on Windows, WebKit on macOS, GTK 3 + WebKitGTK 4.1 on Linux). The Android app needs the Android SDK, JDK 17+ and Gradle 8.10.

make test                      # vet + unit tests
make web                       # ./dist/gemini-config-checker
make desktop                   # native app via Wails (on the target OS)
make android                   # APK (engine for arm64 + Gradle)
make dist VERSION=0.1.0        # cross-compiled web binaries for all targets

Releases and CI

  • ci.yml: gofmt, vet and tests on Linux / Windows / macOS; cross-compile check for every web target.
  • release.yml: builds desktop apps (Windows amd64/arm64, macOS universal, Linux amd64), web servers (Linux, Windows, macOS) and the Android APK, writes SHA256SUMS.txt and publishes the GitHub release v<VERSION>. It runs by itself only when a push to main changes VERSION (ordinary pushes run just ci.yml): if that release does not exist yet it is built and published, otherwise the run does nothing. To ship a new version, bump VERSION and CHANGELOG.md and push. A tag vX.Y.Z matching VERSION, or Actions → Release → Run workflow (tick “publish”, also how you retry a failed release), works too.
  • Optional repository secrets keep one Android signature across releases: ANDROID_KEYSTORE_BASE64, ANDROID_KEYSTORE_PASSWORD, ANDROID_KEY_ALIAS, ANDROID_KEY_PASSWORD.

Project layout

main.go              web server (HTTP API + embedded UI)
desktop/             Wails desktop shell around the same engine and UI
android/             Android app: foreground service + WebView around the same engine
internal/scan/       engine: config parsing, anti-DPI forwarder, chain builder, browser region check
internal/ui/         single-page UI and fonts (shared by every build)
internal/buildinfo/  version stamped at release time
VERSION              the version the release workflow publishes

Disclaimer

This tool measures connectivity and regional availability. Use it in accordance with the laws of your country and the terms of the services you access. Free configs are run by unknown third parties; do not send sensitive data through them.

License

MIT. The bundled engine (Xray-core) and fonts keep their own licenses (MPL-2.0 and SIL OFL).