← all articles

SOCKS5 vs HTTP proxies for a Playwright agent that needs authentication

In this article “Vendor A” is SOCKS5 and “Vendor B” is HTTP(S) proxying. these are protocols, not companies, but they are the real choice you face when a provider hands you a host, a port, a username and a password and offers both. the question comes up often enough that someone filed it on the Playwright tracker as issue 10567: can Playwright use a SOCKS5 proxy that needs a username and password? the short answer is no, not directly in Chromium. Playwright’s proxy option takes server, username and password, and for an http:// proxy that works as you’d hope. for an authenticated socks5:// proxy, Chromium has no way to answer the username/password handshake, so the credentials you pass are not used. as of October 2026 that is still how I treat it, and you should check the issue thread for any change before you build around my claim.

I run browser agents out of Singapore, and I have hit this exact wall. you buy a SOCKS5 port because the provider’s dashboard lists it first, you paste socks5://user:pass@host:1080 into chromium.launch, and the page either fails to load or loads from your own IP. nothing in the error tells you the auth was ignored. so this article is about what Playwright supports today for each proxy type, what the workarounds cost you, and which one I pick for which job.

my verdicts, up front. for a Playwright agent that needs credentialed access, HTTP wins because it works with zero extra moving parts. SOCKS5 wins when the client is not a browser, when you need UDP, or when you already run a local bridge. if your provider only sells SOCKS5 with a password, you can still use it, but you add a small local process and you own that process. everything below is operator experience plus the primary docs I link. I have not run a formal benchmark, so you will not see invented speed or success numbers here.

TL;DR comparison table

axis Vendor A (SOCKS5) Vendor B (HTTP/HTTPS proxy)
Playwright auth support (Chromium) no username/password for SOCKS5 as I understand it. needs a local bridge or IP allowlisting yes, username and password in the proxy option
Protocol layer TCP-level tunnel, UDP possible via the protocol HTTP forward proxy, HTTPS via CONNECT
Pricing usually same per-GB or per-port price as HTTP at the same provider, as of October 2026 same, provider sets it, not the protocol
Features any TCP app, remote DNS, UDP associate headers visible on plain HTTP, Proxy-Authorization, widest tooling support
Support burden higher for Playwright, because of the bridge lower, fewer places for it to break
Target user non-browser clients, mixed tooling, people who need UDP Playwright and Puppeteer agents, scrapers on your own properties, QA teams

Vendor A at a glance

SOCKS5 is defined in RFC 1928, with username/password authentication in RFC 1929. it sits below HTTP. the client connects to the proxy, negotiates an auth method, then asks the proxy to open a TCP connection to a host and port. the proxy does not care whether the bytes inside are HTTP, SSH or a database protocol. it can also relay UDP.

why people like it:

  • protocol agnostic: one SOCKS5 port serves a browser, curl, an SSH client and a custom TCP client
  • remote DNS: the hostname can be resolved by the proxy side rather than your machine, which matters when your local resolver gives different answers than the exit location would
  • no header handling: the proxy does not parse HTTP, so it does not touch your request headers

the catch for this article is authentication. SOCKS5 auth is a separate handshake from HTTP. Chromium’s proxy stack does not implement the username/password method, so a browser launched with --proxy-server=socks5://host:1080 can reach an open SOCKS5 server but cannot log in to a closed one. Playwright launches Chromium, so the limit is inherited. I would not expect Playwright to paper over it, because the browser is doing the networking.

Firefox is different in principle, because Firefox implements SOCKS5 auth. I have not verified how Playwright’s Firefox build behaves with credentials today, so test it before relying on it. and if you are choosing between engines for the agent, I covered that tradeoff in Playwright vs Puppeteer for AI browser agents.

there are three ways to still use an authenticated SOCKS5 endpoint with Playwright:

  • run a local bridge: a small process on 127.0.0.1 that accepts unauthenticated connections from Chromium and forwards them to the real SOCKS5 server with credentials. tools like gost and pproxy do this. check each tool’s own docs for current flags
  • allowlist your egress IP: many providers let you authorize your server’s public IP so no password is needed. then Chromium talks to an open SOCKS5 port. this only works if your agent has a stable IP
  • ask the provider for an HTTP endpoint on the same pool. most mobile and residential vendors offer both. this is usually the easiest fix

Vendor B at a glance

HTTP proxies are the older and simpler sibling for browsers. for plain HTTP the client sends the request to the proxy with the full URL. for HTTPS the client sends a CONNECT host:443 request, the proxy opens a TCP tunnel, and TLS runs end to end through it. authentication is a 407 Proxy Authentication Required challenge answered with a Proxy-Authorization header. browsers have supported this for decades.

Playwright documents it directly in its network guide. the shape is:

import { chromium } from 'playwright';

const browser = await chromium.launch({
  proxy: {
    server: 'http://proxy.example.com:8080',
    username: process.env.PROXY_USER,
    password: process.env.PROXY_PASS,
  },
});
const context = await browser.newContext();
const page = await context.newPage();
await page.goto('https://example.com/');

you can also set the proxy per context in newContext, which is useful when one agent process serves several consenting users and each needs a different exit. check the network guide for the exact current constraints on per-context proxies for each browser, since those notes have changed across Playwright versions.

what you give up with HTTP:

  • UDP: an HTTP proxy does not carry it, so anything that depends on UDP in the page (some WebRTC paths, QUIC) will not go through the proxy the way TCP does
  • non-HTTP clients: if your toolchain includes something that is not HTTP-aware, you need SOCKS5 or a different approach
  • plain HTTP visibility: on unencrypted http:// URLs the proxy can read the request. on HTTPS it sees only the CONNECT target

for a Playwright agent hitting HTTPS sites, none of those usually bite. if you want the full walkthrough with a mobile exit, I wrote it up in how to route a Playwright agent through a mobile proxy.

head-to-head

most of these axes are properties of the provider and the pool, not of SOCKS5 or HTTP. a provider with a good pool is good on both ports. I flag where the protocol genuinely changes the answer and where it doesn’t.

IP pool size

protocol does not change the pool. a provider’s SOCKS5 and HTTP ports normally front the same set of exit IPs. so pool size is a vendor question, and you should ask the vendor for it in writing rather than trust a marketing number. I am not going to quote one here, because I have no source I would stand behind.

what the protocol changes is how you reach that pool from Playwright. with HTTP you reach all of it directly. with authenticated SOCKS5 you reach it through your bridge. the pool is the same, the plumbing is not.

rotation control

rotation is usually controlled by the provider, through the port, the username (some providers encode a session id or a rotation setting in the username) or an API call. that works the same on both protocols. the difference is practical.

with HTTP, the username string goes straight into Playwright’s username field, so per-session usernames are trivial. with a local SOCKS5 bridge, you either bake one credential into the bridge and restart it to change, or run one bridge per session. that is workable but it is more ports and more processes. if your agent rotates often, HTTP saves you real operational work.

geo coverage

geo is the provider’s catalogue, again identical across protocols in normal setups. one caveat worth knowing: SOCKS5 gives you remote DNS in browser setups I have seen, which can matter when a site serves different content depending on where the name resolves. with HTTP CONNECT the proxy resolves the target host as well, since the client sends the hostname. so for HTTPS browsing the two are close in practice. I’d verify with a DNS test rather than assume.

if you need Singapore specifically, say so up front when asking providers, because “Asia” pools are often thin on Singapore. my own products are Singapore-only, which I mention only so you know where my bias on location comes from.

connection success rate

I have no controlled test to publish, so I won’t print a percentage. what I can say from running both:

  • most failures that look like “the proxy is flaky” in Playwright are config failures: wrong scheme, ignored credentials, a bridge that died
  • an authenticated SOCKS5 endpoint pointed at directly from Chromium fails every time, not intermittently. that is a clear signal that it is the auth limit and not network quality
  • once the config is right, success depends on the pool and the target site’s policies, which is the vendor’s quality, not the protocol’s

so for success rate, HTTP wins by default on a Playwright agent, because there is less that can go wrong between the browser and the proxy.

speed

the extra hop through a local bridge adds a small amount of latency and one more process to saturate, but on loopback that is usually negligible next to the mobile or residential round trip. the larger speed factor is the exit network itself: a mobile exit on a congested cell will be slower than a datacenter exit no matter which protocol carries the bytes.

where HTTP can be slightly slower is plain-HTTP proxies that parse and rewrite requests. for HTTPS through CONNECT, both are byte tunnels. I would not pick a protocol for speed. pick it for whether it authenticates.

pricing per GB

as of October 2026, the providers I have used price by data volume, by port, or by time, and the protocol is not a price tier. a SOCKS5 port and an HTTP port on the same plan cost the same in the dashboards I know. I am not listing per-GB figures, because they change often and differ by pool type. read the vendor’s current pricing page on the day you buy.

one cost that is real: the bridge. it is free software, but you pay in your time to run it, monitor it, and restart it. for a solo operator that is small. for a team with many sessions it adds up.

session persistence

there are two meanings of “session” here, and people mix them up.

the first is the proxy-side session: keeping the same exit IP for a period. that is a provider feature (sticky sessions, long-lived ports) and works on either protocol, as long as your connection keeps landing on the same sticky session id or port.

the second is the browser-side session: cookies, localStorage and logins that survive between runs. that has nothing to do with SOCKS5 versus HTTP. it is about Playwright’s storage state and persistent contexts. if you are building an agent that logs in on behalf of a consenting user, read how to persist browser sessions for AI agents and, if your injected cookies don’t stick, how to make injected storage state cookies actually stick.

where the protocol touches persistence: if your IP changes mid-session, many sites will ask the user to re-verify. a sticky session on a stable HTTP port avoids that without extra pieces. a bridge that restarts and reconnects can silently land you on a new exit, so if you use one, make it a supervised service and watch for restarts.

concurrent connections

SOCKS5 and HTTP both handle many parallel connections, and the limit is set by the provider’s plan (threads, ports or bandwidth caps) and by your own machine. with HTTP and Playwright, you open as many contexts and pages as the plan allows. with a bridge, your bridge also needs enough file descriptors and CPU for the parallel load, and a single-threaded bridge can become the bottleneck before the provider does.

if you run many agents at once, I prefer HTTP and one credential per agent. fewer shared choke points.

use-case verdicts

a Playwright agent logging in as a consenting user

winner: HTTP (Vendor B). this is the question from the issue. you need credentials for the proxy, a stable exit for the session, and low operational risk. HTTP with Playwright’s username and password fields is the most direct path, and it keeps your failure modes small.

a QA or monitoring job on your own properties from several countries

winner: HTTP (Vendor B). same reasoning, plus per-context proxies let one process test several regions. you are not fighting the browser’s proxy stack.

a mixed toolchain, browser plus non-HTTP clients on one proxy

winner: SOCKS5 (Vendor A), with a bridge for the browser. if you also run SSH tunnels, database clients or a custom TCP tool through the same exit, a single SOCKS5 endpoint is cleaner. then you put the local unauthenticated bridge in front of it for Chromium, and accept the extra process.

a phone-like Singapore mobile exit for a browser agent

winner: HTTP (Vendor B), if the provider offers it. mobile exits matter for some legitimate regional testing, and I wrote about the tradeoffs in residential vs mobile proxies for browser agents. for the Singapore case, Singapore Mobile Proxy sells real Singapore mobile IPs with sticky sessions. it is Singapore-only, so it only helps if Singapore is the location you need. the sticky session is what keeps the exit IP steady across a browsing session, and you can use it over HTTP with Playwright’s credentials fields as described above.

who should pick Vendor A

pick SOCKS5 if:

  • your agent is not only a browser, and other TCP clients need to share the exit
  • you need UDP, and you have confirmed that your target flow really uses it
  • you already run a local forwarder in your infrastructure and are comfortable supervising it
  • your provider offers only SOCKS5 on the pool you need, and you accept the bridge or IP allowlist route

if you go this way, write down the bridge setup, run it as a service, log its restarts, and test from the Playwright side that the egress IP is what you expect. a simple check is to load an IP-echo page in a throwaway context before the real run.

who should pick Vendor B

pick HTTP if:

  • you drive Chromium through Playwright and want authentication to just work
  • you rotate or switch exits per session or per context
  • you run several agents in parallel and want fewer shared components
  • you are a small team and do not want one more daemon to babysit

this describes most people reading this article. and if you are still choosing your automation stack, remember that the proxy choice is downstream of the browser. a bridge adds less friction in an agent that already has several local services, such as the sandboxed setups in how to sandbox a computer use agent.

verdict overall

for the question in the title, the answer is HTTP. Playwright supports authenticated HTTP proxies directly through its proxy option, as its network documentation shows. authenticated SOCKS5 in Chromium does not work directly, which is the substance of issue 10567, and the working options are a local bridge, an IP allowlist, or asking your provider for an HTTP endpoint. these facts are as of October 2026, and I have not re-run a fresh test matrix for this write-up, so confirm against the current Playwright release notes before you commit.

my default is simple. ask your provider for an HTTP endpoint first. use SOCKS5 only if you have a reason that HTTP cannot meet, like UDP or a non-browser client, and in that case plan for the bridge from day one.

the protocol rarely decides pool quality, geo, price or speed. the vendor does. so spend your evaluation time on the vendor, and let the protocol choice be the easy part. more articles on running browser agents are on the blog index.

this is not legal advice. use proxies only for legitimate agent work: your own properties, consenting users, and within each site’s terms.

Written by Xavier Fok

disclosure: this article may contain affiliate links. if you buy through them we may earn a commission at no extra cost to you. verdicts are independent of payouts. last reviewed by Xavier Fok on 2026-10-05.

free download
Why did my agent get blocked? A triage checklist

The checks we run, in order, when a browser or phone agent starts failing: network, fingerprint, behaviour, account. Leave your email and we will also tell you when we publish a new field note, a few times a month at most.

from the team behind this site
A Singapore mobile IP for browser agents

Singapore Mobile Proxy runs real mobile IPs on SingTel, StarHub and M1, with sticky sessions so one task keeps one IP. Singapore only: a fit for SEA or location-agnostic work, the wrong tool if you need a US IP.

see plans →
from the team behind this site
A real Android phone for phone-use agents

cloudf.one hosts real Android phones in Singapore on dedicated hardware, each with a persistent Singapore mobile IP. For agents that need an actual device and a stable carrier identity.

get a phone →
read on
More from The Agent Ops Report

Blocks, sessions, retries, traces, cost per task and phone-use agents. Browse all articles →