real-browser-mcp-server 1.3.2 → 1.3.3

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.
package/lib/cjs/index.js CHANGED
@@ -233,14 +233,37 @@ async function connect({
233
233
  '--disable-blink-features=AutomationControlled',
234
234
  '--no-sandbox',
235
235
  '--disable-setuid-sandbox',
236
+ '--window-size=1920,1080',
236
237
  ...args
237
238
  ];
238
239
 
239
- const browser = await chromium.launch({
240
- headless,
241
- args: chromiumArgs,
242
- proxy: playwrightProxy
243
- });
240
+ if (headless) {
241
+ chromiumArgs.push(
242
+ '--disable-gpu',
243
+ '--hide-scrollbars',
244
+ '--mute-audio'
245
+ );
246
+ }
247
+
248
+ let browser;
249
+ try {
250
+ // Try launching using the system's real installed Google Chrome first for maximum stealth/fingerprint integrity
251
+ browser = await chromium.launch({
252
+ headless,
253
+ args: chromiumArgs,
254
+ proxy: playwrightProxy,
255
+ channel: 'chrome'
256
+ });
257
+ console.error('[Launch] Successfully launched using system Google Chrome channel');
258
+ } catch (e) {
259
+ // Fallback to pre-packaged Chromium if Chrome is not installed
260
+ browser = await chromium.launch({
261
+ headless,
262
+ args: chromiumArgs,
263
+ proxy: playwrightProxy
264
+ });
265
+ console.error('[Launch] Google Chrome channel not available, falling back to pre-packaged Chromium');
266
+ }
244
267
 
245
268
  if (xvfbInstance) {
246
269
  browser.on('disconnected', () => {
package/lib/esm/index.mjs CHANGED
@@ -236,14 +236,37 @@ export async function connect({
236
236
  '--disable-blink-features=AutomationControlled',
237
237
  '--no-sandbox',
238
238
  '--disable-setuid-sandbox',
239
+ '--window-size=1920,1080',
239
240
  ...args
240
241
  ];
241
242
 
242
- const browser = await chromium.launch({
243
- headless,
244
- args: chromiumArgs,
245
- proxy: playwrightProxy
246
- });
243
+ if (headless) {
244
+ chromiumArgs.push(
245
+ '--disable-gpu',
246
+ '--hide-scrollbars',
247
+ '--mute-audio'
248
+ );
249
+ }
250
+
251
+ let browser;
252
+ try {
253
+ // Try launching using the system's real installed Google Chrome first for maximum stealth/fingerprint integrity
254
+ browser = await chromium.launch({
255
+ headless,
256
+ args: chromiumArgs,
257
+ proxy: playwrightProxy,
258
+ channel: 'chrome'
259
+ });
260
+ console.error('[Launch] Successfully launched using system Google Chrome channel');
261
+ } catch (e) {
262
+ // Fallback to pre-packaged Chromium if Chrome is not installed
263
+ browser = await chromium.launch({
264
+ headless,
265
+ args: chromiumArgs,
266
+ proxy: playwrightProxy
267
+ });
268
+ console.error('[Launch] Google Chrome channel not available, falling back to pre-packaged Chromium');
269
+ }
247
270
 
248
271
  if (xvfbInstance) {
249
272
  browser.on('disconnected', () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "real-browser-mcp-server",
3
- "version": "1.3.2",
3
+ "version": "1.3.3",
4
4
  "description": "MCP Server for Real Browser - Patchright (undetected Playwright fork) with Stealth Mode, Ad Blocker, and Turnstile Auto-Solver for undetectable web automation.",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/esm/index.mjs",