Browser Use Proxy: Run an Agent Through an HTTP Proxy
Browser Use runs a browser for an AI agent. If that browser has to reach pages through a proxy, you set it once on the Browser object. This guide covers the current API, one proxy per agent, the same options in plain Playwright and Playwright MCP, matching the time zone and language, and common errors.
The current Browser Use proxy API
Browser Use documents the proxy as a parameter of the browser: proxy takes a ProxySettings object with server, username, password and bypass. Browser is an alias for BrowserSession, so Browser(proxy=...) is the whole setup.
BrowserConfig, which older tutorials import, comes from older releases and is not in the current API; code that imports it fails with an ImportError. Use the example below instead.
Browser Use with ProxySettings: check the exit first
import asyncio
import os
from browser_use import Agent, Browser, ChatOpenAI
from browser_use.browser.profile import ProxySettings
browser = Browser(
proxy=ProxySettings(
server=f"http://{os.environ['PROXY_HOST']}:{os.environ['PROXY_PORT']}", # HTTP endpoint
username=os.environ["PROXY_USER"],
password=os.environ["PROXY_PASS"],
bypass="localhost,127.0.0.1", # optional
)
)
async def main():
agent = Agent(
task=(
"Open https://ipinfo.io/json and report the IP address and country it shows. "
"Then continue with the real task."
),
llm=ChatOpenAI(model=os.environ["LLM_MODEL"]),
browser=browser,
)
history = await agent.run()
print(history.final_result())
asyncio.run(main())
Example only: replace the environment variables with your own values. The task asks the agent to report the exit IP and country before it does anything else.
The first step turns "the proxy is configured" into "the agent's browser really shows the country I chose". Do it at the start of every run, and compare the country with the one you chose when you generated the proxy.
bypass is a comma-separated list of hosts that do not go through the proxy, for example localhost,127.0.0.1. Leave it out if you do not need it.
One proxy per agent
Give each agent its own Browser with its own ProxySettings, and run the agents together with asyncio.gather. A proxy belongs to the browser it was set on, so two agents never share an exit by accident. Browser Use's own parallel example is marked experimental, so keep one agent per Browser object.
import asyncio
import os
from browser_use import Agent, Browser, ChatOpenAI
from browser_use.browser.profile import ProxySettings
def make_browser(host_env, port_env, user_env, pass_env):
return Browser(
proxy=ProxySettings(
server=f"http://{os.environ[host_env]}:{os.environ[port_env]}",
username=os.environ[user_env],
password=os.environ[pass_env],
)
)
async def run_one(task, browser):
agent = Agent(task=task, llm=ChatOpenAI(model=os.environ["LLM_MODEL"]), browser=browser)
return await agent.run()
async def main():
de = make_browser("DE_HOST", "DE_PORT", "DE_USER", "DE_PASS")
jp = make_browser("JP_HOST", "JP_PORT", "JP_USER", "JP_PASS")
results = await asyncio.gather(
run_one("Open https://ipinfo.io/json and report the IP and country", de),
run_one("Open https://ipinfo.io/json and report the IP and country", jp),
)
for history in results:
print(history.final_result())
asyncio.run(main())
Example only: replace the placeholder values with your own.
The same proxy in plain Playwright
Browser Use drives Chromium through Playwright, so Playwright's own proxy options are worth knowing. The proxy can be set for the whole browser in launch, or for one browser context in new_context (newContext in Node.js), and the options are server, bypass, username and password.
The Playwright option reference says username and password are for HTTP proxies. So an authenticated SOCKS5 proxy is not a Chromium option: use the HTTP endpoint. On Proxy302 that is proxy.proxy302.com port 2222; SOCKS5 is port 3333.
If you drive the browser through the Playwright MCP server instead of Python code, the equivalents are the --proxy-server and --proxy-bypass arguments. The README puts the credentials in the proxy URL: http://user:password@host:port. If the password has special characters such as @, : or /, percent-encode them.
The same README lists SOCKS5 in the URL form, but as with Playwright above, use the HTTP endpoint when you need a username and password.
Fetching a page through a proxy from an MCP client
If you only need an agent to read a public page through a Proxy302 proxy, without running a browser, see the proxy-mcp-server guide. proxy302-mcp is the official Proxy302 MCP server, open source on GitHub and maintained by the Proxy302 team. Proxy302 also runs it at https://proxy302.com/v1/mcp: clients that can send an Authorization header, such as Claude Code, Cursor and VS Code, connect with an API key and install nothing.
Some sites show a different currency, language or shipping text depending on where the visitor appears to be. To see the local version of a page, set the browser's language and time zone to the exit region as well as the proxy.
Playwright's context options for this are locale (a language tag such as de-DE) and timezone_id (a time zone ID such as Europe/Berlin; timezoneId in Node.js). Both are listed in the official options. They change what the browser reports; the proxy changes the address.
Hourly check of the Proxy302 probe, 3 November 2026, 18:18 UTC: one request to Amazon per country through a rotating residential exit. Only the first three octets of an IP are public. One sample per country, not an average; later checks will differ.
Check The proxy received the request but did not accept the credentials. Check that ProxySettings or the proxy dict really has username and password, that they match the ones in My assets, and that the port matches the protocol.
Fix Fix the credentials; use the HTTP endpoint (port 2222) in Chromium. If you put them into a URL, percent-encode special characters.
ERR_PROXY_CONNECTION_FAILED
Check The browser could not open a connection to the proxy at all. Check the host and port, that the scheme is http://, and that no other proxy setting is layered on top.
Fix Correct the host, port or scheme and run the exit check again. From mainland China, keep the Helper open (see the steps below).
Timeouts
Check A page that loads without the proxy but times out with it points at the proxy path or the page, not at your code. Try the same request from another exit country.
Fix Raise the navigation timeout for slow pages and retry from a closer country.
The site shows the wrong country
Check The exit may differ from what you chose, or the browser's time zone and language differ from the exit region. Run the IP lookup task again right before the real task.
Fix Set locale and timezone_id for the exit country; for multi-step tasks use a static IP.
What to use it for
Typical uses are reading public pages, checking how a page looks in another region, QA of a localized site, and collecting data in line with the site's terms and rate limits. A proxy changes only the network address a service sees; keep your request rate polite and follow each site's rules.
How to do it with Proxy302
Rotating residential fits agents that read many pages or check several regions: pick the country, generate a proxy as HTTP, and use proxy.proxy302.com port 2222. A static ISP IP fits an agent that signs in to an account and needs one fixed address. See the rotating residential page for the product.
Open the rotating residential page (or the static ISP page), choose the country and the protocol HTTP, and generate the proxy.
Step 2
Open My assets (the console page that holds everything you bought) and copy HOST, PORT, USERNAME and PASSWORD. The Connect page shows a ready example with your own endpoint.
Step 3
Put them into ProxySettings, the Playwright proxy option or the MCP argument.
Step 4
Run the exit check: ask the agent to open https://ipinfo.io/json and report the IP and country. The country should match the one you chose.
Step 5
From mainland China, open the Helper from the Connect page, click 「一键加速」 (One-click boost) and keep it open while you use the proxy.
Rotating residential costs from US$1.50 per GB on the Budget line and US$5 per GB on the Premium line, less in larger packages. A static ISP IP costs US$0.50 for one day and US$7.99 for 30 days. There is no free trial: the smallest purchase is 1 GB or one IP for one day. A proxy does not lift a restriction, undo a ban or raise a limit.
From US$1.50 per GB (Budget line); US$5 per GB (Premium line); lower per GB in larger packages
HTTP, SOCKS5
195+ countries and regions; state and city on lines that support it
Browsing and research agents, data collection
Static ISP, per IP
US$0.50 for 1 day, US$7.99 for 30 days, the same in every country
HTTP or SOCKS5, chosen per IP
30 countries on the order form; stock changes daily
One fixed IP for each account an agent signs in to
ISP for AI subscriptions
Per 30 days: Claude 15 PTC, GPT / Grok 10 PTC, Gemini 8 PTC; the first order in each tier is 50% off
HTTP or SOCKS5
Claude: US, UK, DE, ES, JP, SG. GPT / Grok and Gemini: US, UK, FR, ES, IT, JP, KR, SG
Coding tools and agents signed in to ChatGPT, Claude, Gemini or Grok
Datacenter, per IP
US$0.25 for 1 day, US$3.99 for 30 days
HTTP or SOCKS5, chosen per IP
8 countries
API calls and tool traffic where the IP type does not matter
proxy302-mcp
Free, open source (MIT)
MCP over stdio, started with npx
Uses the products above
Lets Claude Code, Codex, Cursor and other MCP clients get a proxy and fetch pages through it
Prices are in PTC, paid from the wallet; 1 PTC = US$1. There is no free trial: the smallest purchase is 1 GB of rotating residential traffic or one IP for one day. Checked on 4 November 2026.
Yes. Pass proxy=ProxySettings(server, username, password, bypass) to Browser. BrowserConfig is from older releases and is not in the current API.
How do I give each parallel agent its own proxy?
Create one Browser per agent, each with its own ProxySettings, and run the agents with asyncio.gather.
Can I use SOCKS5 with a username and password in Chromium?
No. Playwright's username and password options are for HTTP proxies, so use the HTTP endpoint (port 2222 on proxy.proxy302.com).
Should I rotate the IP or keep one?
Keep one IP when the pages in a task belong to one visit, such as a login and a few steps. For independent single-page reads a new IP per task is simpler.
Why does a site still show the wrong region?
Check the exit IP first. Then set the context's locale and timezone_id to the exit region, which controls what the browser reports.
Playwright proxy setup with username and password: static datacenter IPs for tests and CI, rotating residential from US$1.50/GB when a site blocks servers.
What a proxy MCP server is, how local and remote MCP servers differ, how to install one in Claude Code, Codex CLI and Cursor, and how to route the server's own traffic through a proxy.
Rotating residential, static ISP and datacenter proxies in plain words, matched to four agent tasks: research, signing in, API calls and data collection.
Real household IPs in 195+ countries with state and city targeting. Rotate on every request or keep sticky sessions. From US$1.50/GB, US$1.35/GB at 100 GB. HTTP and SOCKS5.
Check the exit IP, country and ISP your proxy really gives you in 30 seconds — and why IP databases disagree on the city. With our own test of three lookup services.
Read on 4 November 2026: the proxy parameter takes ProxySettings(server, bypass, username, password); Browser is an alias for BrowserSession; BrowserProfile can be passed to Browser.
Source read on 4 November 2026: class ProxySettings has server, bypass, username and password; BrowserProfile.proxy; the current package exports Browser and BrowserSession and has no BrowserConfig.
Read on 4 November 2026: --proxy-server (including the http://user:password@host:port form) and --proxy-bypass.
Proxy302 product facts and price list
Product observation · Confirmed on:
Product facts file of the site (values checked against the console, the backend and the price table on 18-19 October 2026): products, prices in US$ (1 PTC = US$1), lease terms, protocols and ports, countries, quantity limits, no free trial.
Proxy302 ISP for AI subscriptions: public catalog
Product observation · Confirmed on:
Public JSON at proxy302.com/v1/proxy/ai-isp/catalog, read 4 November 2026: three tiers (Claude, GPT / Grok, Gemini), price per 30 days in PTC, 50% off the first order in a tier, cities by country.
README of the official Proxy302 MCP server: install commands, environment variables, the seven tools, the read-only, spend-free scope and the hosted endpoint https://proxy302.com/v1/mcp.
Public JSON of the probe at proxy302.com/live/connectivity/amazon.json (file probe-amazon-20261104.json), generated 3 November 2026, 18:18 UTC: one request per exit country through a rotating residential exit; exit ASN, network and response time.
Ready to try it?
Create an account, top up once, then pick rotating residential, static ISP or datacenter IPs and have one running in your browser within minutes.