این ترجمه به‌صورت ماشینی تولید شده و در انتظار بازبینی است.تغییر به انگلیسی
گفت‌وگوی معرفیدرخواست نمایش محصول

Guide: ProxyX and BrowserX

Check your page from another country

A page can behave differently by region: a consent banner, a content policy, a security header or a script that fails to load. ProxyX lets you pick a country in the proxy username, and BrowserX can send a leased browser out through it. Together they let you load your own page from a chosen location and compare what happens.

Not a Noxtica product · Tool: ProxyX, BrowserX

Before you start

  • A ProxyX gateway that you run, with provider access you are entitled to use. It needs a database, Redis or Valkey, an admin token, an inventory of exits and the warmer that verifies exit addresses; the ProxyX documentation lists the steps. Or ProxyX edge proxies on hosts you control; the edge picks the exit by pool or address, not by country.
  • A BrowserX worker, set up as in the consent-mode guide. If the gateway has a private address, its range goes into egress.allow_cidrs too, because BrowserX checks the proxy address like any destination.
  • A page you own, and a page of yours that shows the address a request came from.

Written for sites you own. Commands come from each project's own documentation; check it before you rely on a flag.

Steps

  1. Choose the location in the proxy username

    The gateway reads options from the username: px followed by key and value pairs, for example px-cc-fr-sid-run42. A country code selects the exit country, and a session key keeps the same exit for a run. A country your policy has no unit for, an unknown or repeated key, or a city without a country is refused. The options only narrow what the gateway's policy already allows. The edge uses another grammar, with the session and pool in the username, and has no country option.

    Shell
    # CONNECT through the gateway; the username is px followed by key-value pairs
    curl -x http://px-cc-fr-sid-run42:[email protected]:8080 https://your-echo.example.com/ip
  2. Lease a browser that exits through ProxyX

    Create a dedicated BrowserX session with a proxy object that points at the gateway's CONNECT listener. The session placeholder in the username expands to a stable per-session key. The password stays out of the browser flags and logs.

    Shell
    browserx session create \
      --proxy-url http://gateway.example.net:8080 \
      --proxy-username 'px-cc-fr-sid-{session}' \
      --proxy-password "$ORG_KEY"
    # the same through the API: {"proxy": {"url": "...", "username": "px-cc-fr-sid-{session}", "password": "..."}}
  3. Record where the request really came from

    Open the page of yours that shows the request address and record it next to the country you asked for. ProxyX reports the exit address it last recorded for the lease, and it does not independently observe it. Your own page is the check.

  4. Load the page under test and compare

    Open your page through the same session and compare what you see with a run from another location: the banner, the content, the response headers and whether the collector script loaded.

    Node.js
    import { chromium } from 'playwright-core';
    
    const server = process.env.BROWSERX_SERVER ?? 'http://127.0.0.1:7690';
    const headers = { authorization: `Bearer ${process.env.BROWSERX_API_KEY}`, 'content-type': 'application/json' };
    
    for (const cc of ['fr', 'de']) {
    	// {session} expands to a stable per-session key, so every connection of the run keeps one exit.
    	const proxy = { url: process.env.PROXYX_URL, username: `px-cc-${cc}-sid-{session}`, password: process.env.PROXYX_ORG_KEY };
    	const created = await fetch(`${server}/v1/sessions`, { method: 'POST', headers, body: JSON.stringify({ persistence: 'ephemeral', proxy }) });
    	const { session, token, cdp_url: cdpUrl } = await created.json();
    	try {
    		const browser = await chromium.connectOverCDP(cdpUrl);
    		const page = await browser.contexts()[0].newPage();
    		const seenBy = await (await page.goto(process.env.ECHO_URL)).text(); // the address your own page observed
    		const response = await page.goto(process.env.PAGE_URL);
    		console.log(cc, seenBy.trim(), response.status(), Object.keys(await response.allHeaders()).sort());
    		await browser.close(); // disconnects only
    	} finally {
    		await fetch(`${server}/v1/sessions/${session.session_id}?generation=${session.generation}`, { method: 'DELETE', headers: { authorization: headers.authorization, 'x-browserx-token': token } });
    	}
    }
  5. Release the session

    End the BrowserX session so the browser and its forwarder are closed.

What you get

For each location you ran, the country you requested, the address your own page observed and what the page did. Differences between locations are observations to investigate on your side.

Limits

  • ProxyX selects a country and, where the provider's inventory carries it, a city; a city needs a country code. It does not select a network by ASN.
  • An exit is a point-in-time observation. Another request can leave from another address.
  • Use only networks and providers you are authorized to use. Do not use a location to change how a site treats you.

Four checks

All open-source test guides