gemini-proxy-client 1.0.20 → 1.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,12 +5,6 @@ import path from 'path';
5
5
  import { execSync } from 'child_process';
6
6
  import { BrowserManager } from '../browser/manager.js';
7
7
  import { generateToken, ensureDataDir } from '../utils/helpers.js';
8
- /**
9
- * 检查是否是 macOS
10
- */
11
- function isMacOS() {
12
- return process.platform === 'darwin';
13
- }
14
8
  /**
15
9
  * 检查 Camoufox 是否已安装
16
10
  */
@@ -78,12 +72,6 @@ export async function startClient(options) {
78
72
  if (options.virtual) {
79
73
  headless = 'virtual';
80
74
  }
81
- // macOS 上自动使用 Playwright(Camoufox headless 在 macOS 上有问题)
82
- if (isMacOS() && !options.playwright && (options.headless || options.virtual)) {
83
- console.log(chalk.yellow('⚠️ macOS 检测到,自动切换到 Playwright Firefox'));
84
- usePlaywright = true;
85
- headless = true; // macOS 上使用纯 headless
86
- }
87
75
  if (!hasCookies) {
88
76
  console.log(chalk.yellow('⚠️ 未检测到 Google 登录状态'));
89
77
  console.log(chalk.white(' 将打开浏览器,请登录您的 Google 账号...'));
@@ -93,15 +81,8 @@ export async function startClient(options) {
93
81
  else if (!options.headless && !options.virtual) {
94
82
  // 有 cookies,默认使用无头模式
95
83
  headless = true;
96
- if (isMacOS()) {
97
- usePlaywright = true;
98
- console.log(chalk.green('📂 检测到已保存的登录状态'));
99
- console.log(chalk.gray(' macOS: 使用 Playwright Firefox 无头模式'));
100
- }
101
- else {
102
- console.log(chalk.green('📂 检测到已保存的登录状态'));
103
- console.log(chalk.gray(' 使用无头模式'));
104
- }
84
+ console.log(chalk.green('📂 检测到已保存的登录状态'));
85
+ console.log(chalk.gray(' 使用无头模式'));
105
86
  }
106
87
  const spinner = ora('启动浏览器...').start();
107
88
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gemini-proxy-client",
3
- "version": "1.0.20",
3
+ "version": "1.0.21",
4
4
  "description": "Gemini Proxy Build App 客户端 - 使用 Camoufox 自动保持连接",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -14,7 +14,14 @@
14
14
  "postinstall": "camoufox-js fetch || echo 'Camoufox download failed. Run: npx camoufox-js fetch'",
15
15
  "prepublishOnly": "npm run build"
16
16
  },
17
- "keywords": ["gemini", "proxy", "build-app", "camoufox", "automation", "google-ai-studio"],
17
+ "keywords": [
18
+ "gemini",
19
+ "proxy",
20
+ "build-app",
21
+ "camoufox",
22
+ "automation",
23
+ "google-ai-studio"
24
+ ],
18
25
  "author": "",
19
26
  "license": "MIT",
20
27
  "engines": {