gemini-proxy-client 1.0.19 → 1.0.20

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.
@@ -91,17 +91,16 @@ export async function startClient(options) {
91
91
  usePlaywright = false; // 登录时使用 Camoufox 有界面模式
92
92
  }
93
93
  else if (!options.headless && !options.virtual) {
94
- // 有 cookies,默认使用虚拟显示模式(如果可用)或无头模式
94
+ // 有 cookies,默认使用无头模式
95
+ headless = true;
95
96
  if (isMacOS()) {
96
- headless = true;
97
97
  usePlaywright = true;
98
98
  console.log(chalk.green('📂 检测到已保存的登录状态'));
99
99
  console.log(chalk.gray(' macOS: 使用 Playwright Firefox 无头模式'));
100
100
  }
101
101
  else {
102
- headless = 'virtual';
103
102
  console.log(chalk.green('📂 检测到已保存的登录状态'));
104
- console.log(chalk.gray(' 尝试使用虚拟显示模式 (需要 xvfb)'));
103
+ console.log(chalk.gray(' 使用无头模式'));
105
104
  }
106
105
  }
107
106
  const spinner = ora('启动浏览器...').start();
@@ -131,19 +130,19 @@ export async function startClient(options) {
131
130
  // 保存 cookies
132
131
  await browserManager.saveCookies();
133
132
  console.log(chalk.green('✅ Google 登录成功!已保存登录状态'));
134
- // 关闭有界面的浏览器,以虚拟显示模式重新启动
135
- console.log(chalk.gray('🔄 切换到虚拟显示模式...'));
133
+ // 关闭有界面的浏览器,以无头模式重新启动
134
+ console.log(chalk.gray('🔄 切换到无头模式...'));
136
135
  await browserManager.close();
137
- // 创建新的虚拟显示模式浏览器实例
136
+ // 创建新的无头模式浏览器实例
138
137
  browserManager = new BrowserManager({
139
- headless: 'virtual',
138
+ headless: true,
140
139
  dataDir,
141
140
  serverUrl: server,
142
141
  token,
143
142
  });
144
143
  // 重新设置信号处理
145
144
  setupSignalHandlers(browserManager);
146
- spinner.start('以虚拟显示模式重新启动...');
145
+ spinner.start('以无头模式重新启动...');
147
146
  await browserManager.launch();
148
147
  spinner.text = '打开 Build App 页面...';
149
148
  await browserManager.openBuildApp();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gemini-proxy-client",
3
- "version": "1.0.19",
3
+ "version": "1.0.20",
4
4
  "description": "Gemini Proxy Build App 客户端 - 使用 Camoufox 自动保持连接",
5
5
  "main": "dist/index.js",
6
6
  "bin": {