Use case

Proxies for SeleniumBase: the proxy string, the login and Chrome 142

Set a proxy in SeleniumBase 4.54: the proxy string with its login, the extension, CDP Mode on Chrome 142+, SOCKS5 limits and multi_proxy for parallel runs.

HProxy Team··Updated September 19, 2026·6 min read
HProxy.Use case

Free proxies won't hold up here.

Shared datacenter IPs get flagged and dropped fast. When it has to hold, gaming, streaming, accounts, you need mobile and residential IPs that read as a real device, from $0.44/GB, pay as you go.

Proxies for Web Scraping

SeleniumBase takes a proxy as one string, host:port or user:pass@host:port, in every mode. The string is the easy part. Chrome ignores a login inside its proxy settings, so SeleniumBase answers the proxy's login request itself, and how it does that depends on the mode. Since Google Chrome 142, the stealth modes can no longer load SeleniumBase's login extension, so UC Mode needs CDP Mode for a login. We read every setting on this page in SeleniumBase 4.54.10, released on 18 September 2026, and in its maintainer's answers.

Why would SeleniumBase need a proxy?

UC Mode and CDP Mode change how the browser looks, not where it comes from. On a server, every site still sees a hosting IP. We tested what the address alone changes, on 19 September 2026: plain requests to thirteen sites, twice from our server and twice through a residential line. A residential IP changed the answer at four of them: Zillow, Instagram, Reddit and DuckDuckGo. Indeed, Glassdoor, Amazon and Booking refused both. That test sent plain requests, not a browser. The table per site is on our OpenClaw page.

How do I set a proxy in SeleniumBase?

In pytest, pass the flag:

pytest my_test.py --proxy=USERNAME:PASSWORD@GATEWAY_HOST:GATEWAY_PORT

In code, pass the same string as proxy=. This is Pure CDP Mode, the shape of SeleniumBase's own proxy example:

from seleniumbase import sb_cdp

sb = sb_cdp.Chrome(proxy="USERNAME:PASSWORD@GATEWAY_HOST:GATEWAY_PORT")
sb.goto("https://api.ipify.org/")
print(sb.get_text("body"))

SB(proxy=...) and Driver(proxy=...) take the same string. A few rules apply to it:

  • Schemes. Without one, it is an HTTP proxy. https://, socks4://, socks5:// and socks5h:// are accepted too.
  • Bypass list. --proxy-bypass-list takes hosts separated by semicolons, such as *.foo.com.
  • Bad strings stop the run. A string SeleniumBase cannot parse raises an error by default, so a typo does not send you out on your own IP. Before 4.53.5, single-label hostnames such as a Docker service name were rejected too.
  • Firefox. It takes a proxy without a login. The login is for Chromium browsers only.

How does SeleniumBase answer the proxy login?

Each mode answers it its own way:

ModeHow the login is answered
Regular mode, any Chromium browsera generated extension in downloaded_files/
UC Mode on Google Chrome 142 or neweronly once CDP Mode is on
CDP Modea DevTools handler on the first tab
Firefoxno login at all

Google Chrome 142 removed --load-extension and the flag that had kept it working. The maintainer's summary: the regular mode works as before, "If using CDP Mode, then CDP handles the special features like Authenticated Proxy", and UC Mode without CDP Mode needs activate_cdp_mode(). open(url) in UC Mode now switches CDP Mode on by itself. Browsers that are not Google Chrome, such as Chromium, Edge or Brave, still load extensions.

Three details come from the code:

  • The password sits on disk. The regular mode writes the extension into downloaded_files/ in your working directory, with the username and password in plain text. Keep that folder out of git and off shared machines.
  • Every login request gets the proxy login. Both the extension and the CDP handler answer every login request, without checking whether the proxy or a website asked. A site that asks for HTTP authentication would be offered your proxy login.
  • Watch the characters. CDP Mode cuts the login at the first @ and splits it at :, so a password with either character breaks there.

What about SOCKS5?

SeleniumBase accepts socks5:// and socks5h://, but Chrome takes no login on a SOCKS5 proxy. The maintainer closes such reports with one line: "Chrome doesn't support direct SOCKS5 authenticated proxies". A SOCKS5 line works only when it needs no login, for example from an allowed IP. For a line with a login, use its HTTP address.

How do I run several proxies at once?

Set multi_proxy=True, or --multi-proxy in pytest. Parallel browsers otherwise reuse one login extension folder, and in the maintainer's words, "they'll overlap and possibly use the same proxy". With it, each browser gets its own folder and its own login.

Which proxy type fits SeleniumBase?

Residential, for the sites that refuse a hosting IP. A test that logs in or fills a cart should keep one IP for the whole flow, so a sticky line fits it. Page-by-page reads suit a rotating line.

HProxy residential gateways fit both, and an allowed IP makes SeleniumBase's login path unnecessary. Allow your server's IP on a Residential Premium plan, up to 150 per plan, and the string is just GATEWAY_HOST:GATEWAY_PORT: no extension, no CDP handler, no password on disk. Rotating ports change the IP, and a sticky port holds one. An allowed IP takes no country or city targeting. For a country, use a generated line: its username carries the targeting, so it goes in the string with the password. A sticky IP can still change early if its device leaves the network, so let the test retry. The residential proxies page lists the plans, and the plan API generates lines and manages allowed IPs from code.

What breaks when the proxy is on?

  • The browser asks for the proxy password. UC Mode on Google Chrome 142 or newer, without CDP Mode. Call activate_cdp_mode().
  • Every thread shows the same IP. Set multi_proxy=True.
  • "Proxy String ... is NOT in the expected format". The string is malformed. A Docker service name needs 4.53.5 or newer.
  • A SOCKS5 line with a login fails. Use the HTTP address instead.
  • The login fails with a special password. CDP Mode split it at @ or :. Use an allowed IP or a password without them.
  • 407 Proxy Authentication Required. On our gateways this means a wrong password or a line from another plan. Our 407 guide walks through it.
  • A WebRTC test shows your own IP. A leak on navigations outside the proxy was fixed in 4.51.2. Update.

What this page does not cover

We read SeleniumBase 4.54.10's docs and code, and its maintainer's answers. We did not run SeleniumBase. We did not test whether tabs other than the first get the login in CDP Mode, or what a site sees when it asks for HTTP authentication. The blocking test used plain requests from one server IP and one residential line, over one afternoon. SeleniumBase ships a release almost every day, so we will read these settings again by 19 October 2026.

Where to go from here

How to use proxies in Selenium covers plain Selenium. Proxies for Camoufox and proxies for Scrapling cover two other stealth scraping tools. HTTP vs SOCKS5 explains the two proxy types.

Sources

  • Customizing test runs, the proxy options. SeleniumBase documentation, seleniumbase/SeleniumBase release v4.54.10, 18 September 2026.
  • proxy_helper.py, settings.py, constants.py, browser_launcher.py, cdp_driver/browser.py and cdp_util.py, and examples/cdp_mode/raw_proxy.py. SeleniumBase source code, release v4.54.10.
  • Issue #4179 (the Chrome 142+ changes) and issues #4111, #3847, #4119, #4428, #4488, #4414 and #3843. SeleniumBase issue tracker, 2025 to 2026.
  • Proxy support in Chrome: credentials and SOCKSv5. The Chromium Authors, net/docs/proxy.md, read 19 September 2026.
  • Plans, IP whitelist and sticky sessions; errors; the proxy API. HProxy documentation, hproxy.com/docs, 19 September 2026.
  • Our own test of 19 September 2026: plain GET requests to 13 sites and 3 controls, two runs from our server and two through a residential line of our own house plan, with curl 8.5.0. Raw output is kept in the research folder of our OpenClaw page.

Frequently asked questions

How do I use a proxy with a username and password in SeleniumBase?
Pass it as one string: --proxy=USERNAME:PASSWORD@HOST:PORT in pytest, or proxy='USERNAME:PASSWORD@HOST:PORT' in SB(), Driver() or sb_cdp.Chrome(). SeleniumBase answers the proxy's login request itself, with a generated Chrome extension in the regular mode and over the DevTools protocol in CDP Mode.
Why does SeleniumBase UC Mode ask for the proxy password?
Google Chrome 142 stopped loading command-line extensions, so UC Mode cannot use SeleniumBase's login extension on Google Chrome anymore. Switch CDP Mode on with activate_cdp_mode(), or use open(url), which does it for you. CDP Mode answers the login over the DevTools protocol.
Does SeleniumBase support SOCKS5 proxies with a login?
It accepts socks4://, socks5:// and socks5h:// proxies, but Chrome takes no login on a SOCKS5 proxy. SeleniumBase's maintainer closes such reports as a Chrome limit. Use the HTTP address of the same proxy, or a SOCKS5 proxy that allows your IP without a login.
How do I use several authenticated proxies at once in SeleniumBase?
Set multi_proxy=True, or --multi-proxy in pytest. Without it, parallel browsers reuse one login extension folder, and in the maintainer's words they will overlap and possibly use the same proxy.
Where does SeleniumBase store my proxy password?
In the regular mode it writes a small Chrome extension into the downloaded_files folder of your working directory, with the username and password in plain text in its background.js. Keep that folder out of version control and shared machines.
What happens if the proxy string is malformed?
By default SeleniumBase raises an error and stops, because RAISE_INVALID_PROXY_STRING_EXCEPTION is True. Only with that setting switched off does it warn and run without a proxy. Before version 4.53.5 it also rejected single-label hostnames such as Docker service names.

Proxies that don't die mid-job

Residential, ISP, datacenter and mobile, verified by the same engine that runs tens of millions of checks. They read as a real device and hold up under load. Pay as you go, and your balance never expires. $0.44/GB is the 2,000 GB+ rate; a single gigabyte is $0.50/GB, with no minimum order.

129M+ proxy checks run · 100+ countries · HTTP / HTTPS / SOCKS · re-checked every few minutes · no signup

HProxy.

Honest guides and comparisons on proxies, scraping and staying unblocked, from the team that runs the network.

RSS feed