Browser execution layer

Browser automation proxies for isolated, location-aware test and data workflows

Configure the proxy before a browser context starts, keep cookies and network identity aligned, validate the page you actually received, and close every context cleanly.

proxy-session.log

$ configure route

country=US mode=rotating timeout=15s

$ validate response

route

matched

status

200

bytes

tracked

✓ bounded retry policy active

Configure the proxy at browser launch or context creation

Keep credentials in environment variables and create one isolated context per independent job.

browser-check.ts
import { chromium } from 'playwright';

const browser = await chromium.launch({ headless: true });
const context = await browser.newContext({
  proxy: {
    server: 'http://p1.bytesflows.com:8001',
    username: process.env.BF_PROXY_USER,
    password: process.env.BF_PROXY_PASS,
  },
  locale: 'en-US',
  timezoneId: 'America/New_York',
});

const page = await context.newPage();
await page.goto('https://example.com', {
  waitUntil: 'domcontentloaded',
  timeout: 30_000,
});
console.log({ title: await page.title(), url: page.url() });
await context.close();
await browser.close();

Use a unique context and session identifier for unrelated jobs. Do not print credentials.

A reliable browser task lifecycle

Treat the browser as a disposable execution environment with a declared route and acceptance criteria.

STEP 01

Build the task contract

Define target, permission, requested market, session mode, maximum navigation time, and what counts as a usable page.

STEP 02

Create an isolated context

Set proxy, locale, timezone, storage state, and resource policy before navigation. Never reuse unrelated account state.

STEP 03

Navigate and validate

Check status, final URL, expected DOM markers, locale, and challenge signals before extracting or taking evidence.

STEP 04

Capture and close

Store a redacted result, classify failures, close pages and contexts, and retry only within the task budget.

Browser automation FAQ

Should the proxy be configured at browser launch or context creation?+

Use the narrowest isolation boundary supported by the framework. Context-level configuration is useful for independent jobs; launch-level configuration may be required by some clients.

Why does curl work while the browser fails?+

A browser loads more resources, executes scripts, stores state, follows redirects, and exposes a richer client profile. Validate the actual page and resource failures instead of assuming the proxy is the only difference.

Should images and media always be blocked?+

Block nonessential media for data workflows to reduce bytes, but retain required assets for visual QA or screenshot evidence. Make the policy task-specific.

Will rotating IPs solve every challenge page?+

No. Challenges can depend on request behavior, browser state, account history, protocol characteristics, or explicit policy. Record the response and stop uncontrolled retries.

Test one browser workflow with explicit session rules

Start with one permitted target and record navigation, route, page markers, bytes, and failure categories before increasing concurrency.