Proxy works in curl but not in browser: 8 causes, tested
Your proxy works in curl but not in the browser? Eight causes tested side by side in curl, Chrome and Firefox, with the exact error each prints and the fix.

Quick summary · TL;DR
- Look at the proxy's log before you touch the browser. In about half of the causes in this run, the browser's request never showed up there. That means the proxy is fine and the browser is reading its proxy from somewhere else, such as system settings, a PAC file or an extension.
- Chrome doesn't read http_proxy, and curl does. With every proxy variable set, Chrome 157 on macOS loaded the page directly and its NetLog showed from_system. Give the browser its own --proxy-server or Playwright proxy option.
- A local test proxy sees nothing from raw Chrome. curl sends 127.0.0.1 and [::1] through the proxy. Chrome skips the proxy for both unless --proxy-bypass-list="<-loopback>" is set, and Playwright adds that rule itself, so Playwright and a raw Chrome disagree.
- If curl only worked with -k, the proxy is intercepting TLS. Chrome then shows ERR_CERT_AUTHORITY_INVALID and Firefox SEC_ERROR_UNKNOWN_ISSUER, and the site sees the proxy's handshake instead of yours.
When a proxy works in curl but not in browser automation or a desktop browser, the proxy itself is usually fine. curl and the browser are two clients with two config sources and two TLS stacks, so one of them isn’t doing what you think it’s doing. Check the proxy’s own log first. In about half of the causes below, the browser’s request never reached the proxy at all.
The browser’s error rarely says so. Chrome shows ERR_PROXY_CONNECTION_FAILED or a certificate warning, and Playwright’s Firefox calls a missing login NS_ERROR_PROXY_CONNECTION_REFUSED. This guide runs each common cause with the same proxy and the same target in three clients, with the curl output, the browser error and the fix for each one.
Everything below was run on 5 November 2026 between 22:25 and 22:41 UTC on macOS 26.6.2, and re-run twice from 22:52 UTC on fresh test servers:
/usr/bin/curl8.7.1 (SecureTransport, LibreSSL 3.3.6)- Google Chrome 157.0.8103.38 in headless mode, both as a raw command and driven by playwright-core 1.64.1
- Playwright’s Firefox build 132.0, driven by playwright-core 1.49.1
Proxies (plain, Basic, Digest, and one that intercepts TLS) and targets were small Node servers on 127.0.0.1 and [::1]. They logged every request, every TLS ClientHello and every UDP packet, and refused to forward anything that wasn’t loopback. Every browser ran on a fresh temporary profile with test credentials. Windows and Linux weren’t tested, so OS facts here come from the Chromium docs and say so.
Proxy works in curl but not in browser
Here’s the whole run on one screen. “Proxy log” means what the test proxy recorded, which is the only neutral witness in this argument.
Why curl and the browser disagree
curl does exactly what its command line and environment say, and nothing else. A browser has more inputs. The Chromium proxy docs (checked 6 November 2026) list four places Chrome takes its proxy from:
- managed policy
- command-line flags
- extensions
- the system settings for the current network
On top of those it applies rules curl doesn’t have, like skipping the proxy for loopback.
And once the request does go through the proxy, the target sees two very different clients. That’s the second half of this guide.
Where each client gets its proxy
Most “curl works, browser doesn’t” reports end here, with the browser never asking the proxy anything.
Environment variables vs system settings
curl reads environment variables. Its man page (curl 8.7.1) says lower case wins and http_proxy is the exception that only works in lower case. In the run, http_proxy=http://127.0.0.1:19410 sent the request through the proxy, while HTTP_PROXY in capitals gave * Connected to 127.0.0.1 (127.0.0.1) port 19401, which is the target, direct.
Chrome on macOS didn’t read any of them. With http_proxy, https_proxy, HTTP_PROXY, HTTPS_PROXY and all_proxy all set, the page loaded and the proxy log stayed empty. Its NetLog showed why. The proxy config event held a from_system entry and no mention of the test proxy’s port anywhere in the file. A loopback target proves little on its own, since Chrome bypasses loopback anyway, so the re-run used a made-up name, cb.test, pointed at 127.0.0.1 with --host-resolver-rules. Raw Chrome and Playwright’s Chromium, with the same variables set, both loaded it directly. Add --proxy-server and the same URL showed up in the proxy log. Playwright’s Firefox ignored the variables too.
Linux is the exception, and it wasn’t tested here. Chromium’s Linux proxy page (checked 6 November 2026) says Chrome uses the GNOME or KDE settings when it detects them, and flags or environment variables on other desktops. So the same shell can drive Chrome through the proxy on one Linux desktop and not on another. Which variables each tool reads is a topic of its own.
The fix. Give the browser its own setting. On the command line that’s --proxy-server=http://HOST:PORT, and in Playwright it’s the proxy option (Playwright proxy guide). Don’t rely on the shell’s variables reaching a browser.
Loopback and IPv6 bypass
This one is easy to miss when you test locally, and it makes a local test proxy lie to you. Chrome never sends localhost, 127.0.0.1/8 or [::1] through a proxy unless told to, which the Chromium docs call implicit bypass rules. The SOCKS5 side of the same trap has its own guide. What matters here is that curl, raw Chrome and Playwright each handle it differently.
Here’s what each client did:
- curl sent
http://127.0.0.1:19401/andhttp://[::1]:19401/through the proxy. curl has no loopback exception, onlyno_proxy, andno_proxy=127.0.0.1sent it direct. - Raw Chrome with
--proxy-serverloaded both pages directly. The proxy log had nothing for either. - Raw Chrome with
--proxy-bypass-list="<-loopback>"added sent them through the proxy. That rule subtracts the implicit bypass. - Playwright’s Chromium sent loopback through the proxy without being asked. In Playwright 1.64.1’s source,
shouldProxyLoopbackadds<-loopback>unless the Node process hasPLAYWRIGHT_DISABLE_FORCED_CHROMIUM_PROXIED_LOOPBACKset or yourbypassoption already names a loopback host such aslocalhostor127.0.0.1. With the variable set, the page went direct. - Playwright’s Firefox sent loopback through the proxy even with
network.proxy.allow_hijacking_localhostset to false, because its build routes requests through Playwright’s own proxy filter.
Desktop Firefox has its own version of this. Since Firefox 67, localhost skips the proxy unless network.proxy.allow_hijacking_localhost is true, according to Mozilla bug 1535581. That pref was set in the run but not tested on a plain desktop profile.
PAC and WPAD
A PAC file is JavaScript that picks a proxy per URL. curl doesn’t run it. The everything curl book (checked 6 November 2026) puts it plainly: with no JavaScript engine, curl has no PAC support. So a browser on PAC and curl on http_proxy can be using two different proxies, and both of them look “configured”.
In one run http_proxy pointed at the working proxy and gave Firefox a PAC file that returned a dead one. curl got 200. Firefox followed the PAC and stopped at NS_ERROR_PROXY_CONNECTION_REFUSED, with the PAC server logging the fetch. With a PAC that pointed at the working proxy, Firefox went through it.
Chrome fetched the PAC file three times per run but still loaded the loopback target directly, with or without <-loopback>. So Chrome’s PAC routing couldn’t be shown on loopback here.
WPAD is the version where the browser finds a PAC file on its own, through DHCP or DNS. It’s from the Chromium docs only, nothing here was run. DHCP-based WPAD works only in Chrome on Windows and ChromeOS, and macOS Chrome set to auto-detect skips it. If a PAC download fails, Chrome falls back to DIRECT without telling you. To see which PAC a browser uses, look at chrome://net-internals/#proxy, or Firefox’s connection settings, before you copy any proxy into curl.
Extensions and cached proxy decisions
An extension can set Chrome’s proxy for the whole profile, and so can policy. This run used fresh profiles, so neither applied. When one does, chrome://settings/system names the extension that controls the setting. A profile that works and a clean one that doesn’t is the clue here.
Chrome also remembers failures. According to the docs, a proxy that fails in a list is marked bad for 5 minutes and moved to the back, with no option to turn that off. The same docs say the Clear bad proxies button on chrome://net-internals/#proxy empties that list by hand. Firefox 132’s own defaults file sets network.proxy.failover_timeout to 1800 seconds. A browser can keep avoiding a proxy you’ve already fixed, while every new curl process starts with a clean slate. Neither timer was measured here.
What happens on the wire
Now the cases where the browser does reach the proxy and still fails.
HTTPS interception and certificates
Some proxies don’t just tunnel. They end your TLS session, read the request, and open a new one to the site with their own certificate. Corporate filters and debugging proxies work this way. curl tells you straight away:
curl: (60) SSL certificate problem: unable to get local issuer certificate
People add -k, get a 200, and move on. With -k -v the run showed issuer: CN=canary mitm test CA on the intercepting proxy and issuer: CN=canary target test CA through the plain tunnel, so the verbose output tells you who you’re talking to. --cacert with the proxy’s CA also returned 200 without -k.
Browsers have no -k. Chrome failed with net::ERR_CERT_AUTHORITY_INVALID and Firefox with SEC_ERROR_UNKNOWN_ISSUER. Firefox couldn’t be given the test site’s own CA in this setup, so it showed that error through the plain tunnel too, and only Chrome’s pair of results isolates the proxy. Chrome loaded the page once it trusted the proxy’s key with --ignore-certificate-errors-spki-list, and Playwright’s ignoreHTTPSErrors did the same in both. For a real browser profile, the fix is to trust the proxy’s CA certificate in the browser or OS, which wasn’t done here because it changes the machine.
Interception had a second effect, too. Through the plain tunnel the target saw Chrome’s own handshake, HTTP/2 and GREASE values included. Through the intercepting proxy it saw the proxy’s own client, with no ALPN, 52 cipher suites, no GREASE and HTTP/1.1. A site that scores TLS sees the proxy software, not your browser.
Proxy authentication in each client
curl sends Basic credentials from -U USERNAME:PASSWORD or from the proxy URL itself, and both returned 200. With nothing, plain HTTP came back as 407, and HTTPS as (56) CONNECT tunnel failed, response 407.
Browsers are pickier about where the login comes from:
- Headless Chrome with no login gave
net::ERR_INVALID_AUTH_CREDENTIALS. Headless has nowhere to show a prompt. - Playwright’s Firefox with no login gave
NS_ERROR_PROXY_CONNECTION_REFUSED, a misleading name for a 407. The proxy log showed a second attempt with a Basic header that the proxy rejected. - The login inside the URL (
http://USERNAME:PASSWORD@HOST:PORTin Playwright’sserver) gave the same two errors. Chrome sent no login at all, and Firefox’s retry carried a Basic header the proxy rejected. - Playwright’s username and password fields worked in both browsers. The proxy log showed the first request without a login, then the retry with it.
Digest went the other way. Chrome and Firefox answered a Digest-only proxy on their own, on HTTP and HTTPS. curl with -U alone sent Basic and got 407. --proxy-digest fixed plain HTTP, but on HTTPS, against a proxy that closed the connection after its 407, curl stopped with Proxy CONNECT aborted. Against a proxy that kept the connection open, --proxy-digest and --proxy-anyauth both returned 200.
NTLM and Negotiate weren’t tested. Chromium’s HTTP authentication page says Chrome can answer those proxy challenges with your Windows or Kerberos login without prompting. curl needs --proxy-ntlm or --proxy-negotiate. That’s the usual reason a corporate proxy works in the browser and not in curl, the reverse of this guide’s case. SOCKS5 logins don’t work in Chrome at all, which is a separate story.
HTTP/3, QUIC and HSTS
QUIC came up the most in the questions, and through an HTTP proxy it doesn’t apply. For this test the target answered with Alt-Svc: h3=":19402".
Direct, Chrome sent 1,250-byte UDP packets to that port and Firefox sent 1,252-byte ones, so both tried HTTP/3. Through the proxy, neither sent a single UDP packet across three page loads, and everything went over the CONNECT tunnel as HTTP/2.
The same test turned up two smaller results. Forcing QUIC with no QUIC server listening gave net::ERR_QUIC_PROTOCOL_ERROR direct, and macOS curl 8.7.1 refused --http3 with the installed libcurl version doesn't support this. A firewall that blocks UDP can change a direct browser test, but it isn’t why the proxied one fails.
HSTS made no difference on IP addresses. Over HTTPS the target sent Strict-Transport-Security: max-age=600. Chrome and Firefox both sent the next http:// request as plain HTTP, and curl’s --hsts file stayed empty. That matches RFC 6797 section 8.1.1, which says a host given as an IP literal is never noted as an HSTS host. Chrome’s automatic HTTPS upgrade didn’t touch the IP literal either.
On a real hostname HSTS does apply, and this run didn’t test one. Still, the logic is simple. A browser that remembers HSTS sends https:// through the proxy as a CONNECT, where curl sends http:// as a plain GET, so a proxy that handles only plain HTTP fails in the browser alone. Compare the method in the proxy log.
Fingerprints and headers at the target
Sometimes both clients reach the proxy, the tunnel opens, and the site still treats them differently. A CONNECT tunnel passes your TLS and headers through untouched, so the site is judging your client, not the proxy. Here’s what the test target logged from each ClientHello:
Chrome’s hash changed every time because it shuffles the order of its TLS extensions. Chrome Platform Status (checked 5 November 2026) lists TLS ClientHello extension permutation as enabled by default from Chrome 110, and Fastly described it in the wild on 8 February 2023. The re-run got 15 different JA3 hashes from 15 Chrome handshakes, and sorting each extension list gave one identical set. That’s why a JA3 rule can’t pin Chrome, and why newer schemes sort the list first (JA3 vs JA4).
Headers differed just as much. Headless Chrome sent HeadlessChrome/157.0.0.0 in its user agent, from Playwright and from the raw command alike, plus sec-ch-ua client hints. curl sent curl/8.7.1 and two headers. Firefox sent no client hints. Four simple rules on the test target split the clients through the same proxy:
| Target rule | curl | Chrome 157 | Firefox 132 |
|---|---|---|---|
Block HeadlessChrome in the user agent | 200 | 403 | 200 |
Block curl/ in the user agent | 403 | 200 | 200 |
| Block a ClientHello with no GREASE | 403 | 200 | 403 |
Block requests with no sec-ch-ua | 403 | 200 | 403 |
So “works in curl, blocked in the browser” can be a site rule about headless Chrome, and the reverse can be one about curl. curl with -A 'Mozilla/5.0' got past the user-agent rule. The TLS and client-hint rules don’t look at the user agent, so a header change alone won’t move those. None of it is the proxy, and changing the proxy won’t touch it. Check what the site’s terms allow before you change how a client presents itself.
Test both clients side by side
Use this method and the proxy log settles most of these arguments. Run curl and the browser against the same URL, one after the other, and check three things.
- Did the browser reach the proxy? Watch the proxy’s log, or your provider’s usage view, while the browser loads the page. Nothing there means the problem is config: environment, system settings, loopback, PAC or an extension.
- What did the browser decide? Start Chrome with
--log-net-log=FILEand search the file forPROXY_CONFIG_CHANGEDandPROXY_RESOLUTION_SERVICE_RESOLVED_PROXY_LIST. In the run, Chrome with only the environment variables logged"from_system": trueandDIRECT, while Chrome with--proxy-serverloggedsingle_proxyandPROXY 127.0.0.1:19410.from_systemmeans system settings won, whatever your shell says. - What did curl actually do?
curl -v -x http://HOST:PORT URLprints the CONNECT, the 407s and the certificate issuer. Add--proxy-digestor--cacertbefore you reach for-k. The curl proxy guide covers the flags, and the ERR_TUNNEL_CONNECTION_FAILED guide covers what each CONNECT status means.
A minimal pair, using placeholders:
curl -v -x http://USERNAME:PASSWORD@HOST:PORT https://SITE/
google-chrome --headless --user-data-dir="$(mktemp -d)" \
--proxy-server="http://HOST:PORT" --log-net-log=chrome-netlog.json \
--dump-dom https://SITE/
On macOS the Chrome binary is at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome. Raw Chrome can’t take the login from that command, so for a proxy that needs one, run the browser half through Playwright’s username and password fields.
Proxy works in curl but not in browser: next
When a proxy works in curl but not in browser tests, sort the case by what the proxy log shows.
- The proxy log shows nothing from the browser. It’s config. Give the browser its own proxy setting, add
<-loopback>if the target is local, and check for PAC, policy and extensions. - The proxy log shows a 407. Use Playwright’s
usernameandpasswordfields, or a prompt in a headed browser, not credentials inside the URL. - The browser shows a certificate error and curl needed
-k. The proxy is intercepting. Trust its CA in the browser or use a proxy that tunnels. - The tunnel opens and the site blocks only one client. That’s the client’s fingerprint or headers, not the IP.
Every proxymint tier speaks HTTP and SOCKS5 with a username and password, and for a browser profile that should keep one address over days, static ISP proxies keep one ISP-registered address for the whole term.
Frequently asked questions
Usually because Chrome isn't using the proxy you gave curl. Chrome takes its proxy from flags, policy, extensions or system settings rather than your shell, and it skips the proxy for localhost on top of that. Once Chrome does reach the proxy, what's left is a login, an intercepting proxy's certificate or a site rule that treats headless Chrome differently.
Not on macOS or Windows. In a test with Chrome 157 on macOS, every proxy variable was set and Chrome still loaded the page directly, with its NetLog showing a from_system config. On Linux, Chromium's docs say Chrome uses GNOME or KDE settings when it finds them and flags or environment variables on other desktops.
The -k flag tells curl to accept any certificate, which hides a proxy that intercepts TLS with its own certificate authority. Browsers have no such switch, so Chrome shows ERR_CERT_AUTHORITY_INVALID and Firefox SEC_ERROR_UNKNOWN_ISSUER. Run curl -v -k and read the issuer line to see whose certificate it is, then trust that CA or use a proxy that tunnels.
Chromium has implicit bypass rules for localhost, 127.0.0.1/8 and [::1], so loopback traffic goes direct even with --proxy-server set. Add --proxy-bypass-list="<-loopback>" to send it through the proxy. Playwright adds that rule on its own, and curl has no loopback exception at all, only no_proxy.
No. curl has no JavaScript engine, so it can't run a PAC script, and it ignores WPAD as well. If the browser gets its proxy from a PAC file, open the file, find the proxy it returns for your URL, and pass that to curl with -x or http_proxy.
Yes. A CONNECT tunnel passes the client's TLS handshake and headers through unchanged, so the site judges the client. In a local test, a rule against HeadlessChrome in the user agent blocked Chrome and let curl through. Rules against a ClientHello without GREASE, or a request without sec-ch-ua, blocked curl and Firefox instead.
Not through an HTTP proxy. In a loopback test against a server offering HTTP/3, Chrome 157 and Firefox 132 sent QUIC packets straight away when they went direct. Through the HTTP proxy they sent none, and everything ran over the CONNECT tunnel as HTTP/2. A UDP block can change a direct test, but it isn't why a proxied browser fails.
Researched and drafted with AI tools, then checked against our publishing rules before it went live: 9 outside links, 5 links to other proxymint pages, no prices and a fact-check pass against our product records. How we write.
