fix: support proxy authentication credentials in URL (closes #4)

Parse user:pass from proxy URLs into separate Playwright username/password
fields. Puppeteer wrapper strips credentials from --proxy-server and
auto-calls page.authenticate(). Bump Python 0.1.6, JS 0.1.3.
This commit is contained in:
CloakHQ
2026-02-24 19:00:12 +01:00
parent 4e809b9678
commit 4d96db1448
9 changed files with 197 additions and 6 deletions
+2 -1
View File
@@ -7,6 +7,7 @@ import type { Browser, BrowserContext } from "playwright-core";
import type { LaunchOptions, LaunchContextOptions } from "./types.js";
import { getDefaultStealthArgs } from "./config.js";
import { ensureBinary } from "./download.js";
import { parseProxyUrl } from "./proxy.js";
/**
* Launch stealth Chromium browser via Playwright.
@@ -32,7 +33,7 @@ export async function launch(options: LaunchOptions = {}): Promise<Browser> {
headless: options.headless ?? true,
args,
ignoreDefaultArgs: ["--enable-automation"],
...(options.proxy ? { proxy: { server: options.proxy } } : {}),
...(options.proxy ? { proxy: parseProxyUrl(options.proxy) } : {}),
...options.launchOptions,
});