Skip to content
Proxy fundamentals

Proxy authentication error (407): exact messages and fixes

The exact 407 and tunnel errors curl, Python, Node and Chrome print, what causes each, and the command that shows whether the proxy or the site said no.

On this page 9 sections
  1. The exact error text, by client
  2. Prove it is the proxy in one command
  3. Causes and fixes, in the order worth checking
  4. 1. No credentials reached the proxy
  5. 2. Wrong username or password
  6. 3. A special character in the password
  7. 4. The proxy wants NTLM and your client sends Basic
  8. 5. Your IP address is not on the allowlist
  9. 6. https:// in front of a plain HTTP proxy
  10. 7. The proxy refused the CONNECT
  11. 8. The proxy could not reach the site
  12. 9. TLS interception
  13. 10. Nothing is listening
  14. SOCKS5 authentication failures
  15. Cause-to-fix table
  16. Answering a proxy password in headless Chrome
  17. Cloudflare 1xxx errors are a different problem
  18. Microsoft 365 and OneDrive: Proxy Authentication Error 2606
  19. How this was tested

A proxy authentication error means your proxy refused the request before it went anywhere. On the wire it is one status line, HTTP/1.1 407 Proxy Authentication Required, plus a Proxy-Authenticate header that names the scheme the proxy expects. The website you were trying to reach never saw you. What makes it confusing is that every client reports the same 407 in different words, and two of the clients we tested hide the number.

The exact error text, by client

Every line below was copied from a terminal. The rig is a local Squid 6.13 proxy that demands Basic authentication, with an HTTPS test server behind it, and each client was sent with no credentials. The versions are the ones we ran; wording changes between releases. Our test server has its own CA, so every command that reaches it also carried --cacert origin-ca.pem or the library’s equivalent. We left that flag out of the listings below and trimmed verbose output to the lines that matter.

Client What it prints for a 407
curl 8.7.1, https:// URL curl: (56) CONNECT tunnel failed, response 407
curl 8.7.1, http:// URL No error at all. Exit code 0, and the body is the proxy’s HTML error page.
Python requests 2.34.2 requests.exceptions.ProxyError: HTTPSConnectionPool(host='localhost', port=39443): Max retries exceeded with url: / (Caused by ProxyError('Unable to connect to proxy', OSError('Tunnel connection failed: 407 Proxy Authentication Required')))
httpx 0.28.1 httpx.ProxyError: 407 Proxy Authentication Required
Node.js 24.2.0, built-in fetch TypeError: fetch failed, with the status two causes down: Proxy response (407) !== 200 when HTTP Tunneling
Chrome 155, headless net::ERR_INVALID_AUTH_CREDENTIALS
OpenSSL 4.0.3 s_client s_client: HTTP CONNECT failed, reason=407 Proxy Authentication Required
curl 8.7.1 over SOCKS5 curl: (97) User was rejected by the SOCKS5 server (1 1). SOCKS has no 407; see below.
Microsoft 365 apps, OneDrive Proxy Authentication Error - 2606, reported by users. Not reproducible on our rig; covered near the end.

Two of those deserve a warning. requests says Unable to connect to proxy, which is false: it connected, sent CONNECT, and the proxy answered with a 407. People read that message and go looking for a firewall. Node is worse. If your code logs err.message you get fetch failed and nothing else, because undici 7.10.0 wraps the real reason in a DOMException that says Request was cancelled. and puts the proxy’s status one level below that.

TypeError: fetch failed
  cause: Error: Request was cancelled.
    cause: AbortError [UND_ERR_ABORTED]: Proxy response (407) !== 200 when HTTP Tunneling

In Node, walk err.cause until it is undefined and log every level. The status code of a failed proxy tunnel is only ever in the innermost message.

Prove it is the proxy in one command

curl can print the status of the CONNECT reply separately from the status of the page. That one write-out variable, %{http_connect}, settles whether the proxy or the site said no.

$ curl -sS -o /dev/null -w 'connect=%{http_connect} http=%{http_code}\n' \
    -x http://127.0.0.1:39401 https://localhost:39443/
curl: (56) CONNECT tunnel failed, response 407
connect=407 http=000

Read it like this:

  • connect=407: the proxy refused the tunnel. Everything on this page applies.
  • connect=200 with an http= code of 401, 403 or 429: the proxy worked and the site answered. That is the territory of 403 vs 407 vs 429.
  • connect=000: no tunnel was attempted, either because the URL was plain http://, which needs no CONNECT, or because curl never reached the proxy.

Then look at the challenge itself. RFC 9110 requires a proxy to send at least one Proxy-Authenticate header with every 407 it generates, and that header tells you which scheme to use:

$ curl -v -x http://127.0.0.1:39401 https://localhost:39443/ 2>&1 | grep -E '^[<>] (CONNECT|HTTP/|Server:|X-Squid|Proxy-)'
> CONNECT localhost:39443 HTTP/1.1
> Proxy-Connection: Keep-Alive
< HTTP/1.1 407 Proxy Authentication Required
< Server: squid/6.13
< X-Squid-Error: ERR_CACHE_ACCESS_DENIED 0
< Proxy-Authenticate: Basic realm="proxy.wiki test rig"

Basic means a username and password. NTLM or Negotiate means Windows-domain authentication, which none of the Python and Node clients we tested could answer (cause 4 below). The realm and the Server header tell you which proxy in a chain sent the challenge, which matters on corporate networks where a local agent forwards to a second proxy.

Causes and fixes, in the order worth checking

Every cause in this section was reproduced on the rig. The order is the order we would check them in: cheapest test first.

1. No credentials reached the proxy

One easy way to send no credentials is to send them to the wrong place. In curl, -u is for the website and -U (long form --proxy-user) is for the proxy. With -u on an https:// URL the result is a plain 407. On an http:// URL the -u password goes into an Authorization header meant for the destination; run with both flags, our test origin reported receiving it:

$ curl -sS -u alice:s3cret -x http://127.0.0.1:39401 https://localhost:39443/
curl: (56) CONNECT tunnel failed, response 407

$ curl -sS -U alice:s3cret -x http://127.0.0.1:39401 https://localhost:39443/
origin ok; auth headers seen: none

$ curl -sS -u alice:s3cret -U alice:s3cret -x http://127.0.0.1:39401 http://127.0.0.1:39480/
origin ok; auth headers seen: Authorization

Chrome has its own version of this. It does not accept a username and password inside --proxy-server, and it does not fall back to ignoring them either: it rejects the whole proxy string.

$ chrome --headless=new --proxy-server=http://alice:s3cret@127.0.0.1:39401 ...
Page load failed: net::ERR_NO_SUPPORTED_PROXIES

$ chrome --headless=new --proxy-server=http://127.0.0.1:39401 ...
Page load failed: net::ERR_INVALID_AUTH_CREDENTIALS

The fix in Chrome is to answer the challenge through the automation layer, shown later on this page. In everything else, put the credentials in the proxy URL or the proxy-specific option, and if you rely on environment variables, check that the tool reads the one you set: several read only https_proxy for https:// URLs. The proxy environment variables guide has the per-tool rules.

2. Wrong username or password

A wrong password produces exactly the same 407 as a missing one, in every client we tried. Only the proxy can tell them apart: Squid logged TCP_DENIED/407 ... user=alice for the wrong password and user=- when nothing was sent. The user= label comes from our log format; Squid’s default format shows the bare name or a dash. If you run the proxy, that log line is the fastest answer. If you don’t, confirm what your client actually sent. Basic credentials are base64, not encryption, so you can read them straight back:

$ curl -sv -o /dev/null -x http://alice:s3cret@127.0.0.1:39401 https://localhost:39443/ 2>&1 | grep Proxy-Authorization
> Proxy-Authorization: Basic YWxpY2U6czNjcmV0
$ echo YWxpY2U6czNjcmV0 | base64 -d
alice:s3cret

On some commercial gateways the username is more than a name. Country, session and rotation settings get packed into it with separators, and a malformed parameter reads to the gateway as a wrong username. If a plain username works and the decorated one returns 407, the problem is the decoration. A password rotated upstream looks exactly the same from the client side, which is why the check above is worth doing before anything else. The proxy authentication entry covers the schemes themselves.

3. A special character in the password

A password containing @, : or # breaks the proxy URL, because those characters are delimiters in URL syntax (RFC 3986, sections 2.2 and 3.2.1). We gave the test user the password p@ss:w#rd and passed it unencoded. All four clients failed before sending a single byte to the proxy:

Client Error with p@ss:w#rd unencoded
curl 8.7.1 curl: (5) Unsupported proxy syntax in 'http://bob:p@ss:w#rd@127.0.0.1:39401': Port number was not a decimal number between 0 and 65535
requests 2.34.2 requests.exceptions.InvalidURL: Failed to parse: 'ss:w' is not a valid host or port
httpx 0.28.1 httpx.InvalidURL: Invalid port: 'w'
Node.js 24.2.0 Process exits at startup with TypeError: Invalid URL and code: 'ERR_INVALID_URL', raised from setupHttpProxy before any of your code runs

The parsers do not even agree with each other. With p@ss:word, which has no #, requests, httpx and Node all split at the last @ and authenticated fine, while curl 8.7.1 still failed with exit code 5. A URL that works in your Python script can fail in the curl command you paste into a ticket. Percent-encode the password and every client accepts it:

$ python3 -c "from urllib.parse import quote; print(quote('p@ss:w#rd', safe=''))"
p%40ss%3Aw%23rd

$ curl -sS -x 'http://bob:p%40ss%3Aw%23rd@127.0.0.1:39401' https://localhost:39443/
origin ok; auth headers seen: none

In curl you can also skip URL parsing entirely with -U: -U 'bob:p@ss:w#rd' worked unencoded. curl splits that argument at the first colon, which is why the colon inside the password survived. A colon in the username would not. curl’s manual also warns that credentials given on the command line can show up briefly in process listings, so on a shared machine read them from a file instead.

4. The proxy wants NTLM and your client sends Basic

Some corporate proxies accept only Windows authentication. We ran a second Squid instance that offers only NTLM. The challenge looks like this, and a client that only knows Basic gets the same 407 however correct its password is:

> CONNECT localhost:39443 HTTP/1.1
> Proxy-Authorization: Basic YWxpY2U6czNjcmV0
< HTTP/1.1 407 Proxy Authentication Required
< Proxy-Authenticate: NTLM

curl handles it with --proxy-ntlm, or --proxy-anyauth to let it pick from whatever the proxy offers. The verbose log shows the three-leg handshake, a type 1 message, the proxy’s type 2 challenge and a type 3 reply, before the tunnel opens:

$ curl -sv --proxy-ntlm -x http://alice:s3cret@127.0.0.1:39402 https://localhost:39443/
> Proxy-Authorization: NTLM TlRMTVNTUAAB...
< HTTP/1.1 407 Proxy Authentication Required
< Proxy-Authenticate: NTLM TlRMTVNTUAAC...
> Proxy-Authorization: NTLM TlRMTVNTUAAD...
< HTTP/1.1 200 Connection established

requests, httpx and Node’s fetch all received a 407 from the same proxy. Each sends Basic credentials from the proxy URL and has no built-in NTLM support for proxies. The workable options are to ask the network team for an allowlisted or Basic-auth path for automated jobs, or to run a local forwarding proxy that handles NTLM upstream and point the library at it without credentials.

5. Your IP address is not on the allowlist

A proxy that authenticates by source address answers in one of two ways, depending on how it is set up. If it accepts passwords as well, a request from an address that is not allowlisted gets a normal 407 challenge, as in cause 1. If it accepts only allowlisted addresses, it refuses outright. Our allowlist-only port returned:

$ curl -sv -o /dev/null -x http://127.0.0.1:39405 https://localhost:39443/ 2>&1 | grep -E '^< (HTTP|X-Squid)'
< HTTP/1.1 403 Forbidden
< X-Squid-Error: ERR_ACCESS_DENIED 0

So a 403 on the CONNECT can be an authentication failure too. It starts when the address you leave from changes: a container rescheduled onto another host, a NAT gateway change, a laptop on a different network. Check the address you are actually leaving from with the proxy.wiki tools and compare it with the list held by the proxy. The IP allowlisting entry explains the trade-offs.

6. https:// in front of a plain HTTP proxy

The scheme in a proxy URL describes how you talk to the proxy, not how you talk to the site. An http:// proxy URL is still the right one for https:// sites, because the encryption to the site runs inside the CONNECT tunnel. Put https:// in front of a plain HTTP proxy and the client starts a TLS handshake with a server that is waiting for text:

$ curl -sS -x https://alice:s3cret@127.0.0.1:39401 https://localhost:39443/
curl: (35) LibreSSL/3.3.6: error:1404B42E:SSL routines:ST_CONNECT:tlsv1 alert protocol version

Squid logged NONE_NONE/400 - error:invalid-request. Chrome showed net::ERR_PROXY_CONNECTION_FAILED, the same code it uses for a proxy that is not running at all, so the browser gives you no hint. Use http:// for the proxy unless the provider explicitly documents a TLS endpoint.

7. The proxy refused the CONNECT

Once authentication succeeds, the proxy still decides where a tunnel may go. Squid’s suggested configuration contains http_access deny CONNECT !SSL_ports, with SSL_ports set to 443, so a tunnel to any other port is refused with a 403. We copied that rule onto one port and asked for a tunnel to port 39443:

curl:     curl: (56) CONNECT tunnel failed, response 403
requests: ProxyError('Unable to connect to proxy', OSError('Tunnel connection failed: 403 Forbidden'))
httpx:    httpx.ProxyError: 403 Forbidden
Node:     Proxy response (403) !== 200 when HTTP Tunneling
Chrome:   net::ERR_TUNNEL_CONNECTION_FAILED

Node has a twist here. undici opens a CONNECT tunnel even for plain http:// URLs, where curl and requests send an ordinary GET to the proxy. The Squid log showed TCP_DENIED/403 CONNECT 127.0.0.1:39480 for Node’s fetch of an http:// page on port 39480, which our rig, like the stock rule, does not accept as a CONNECT destination. curl and requests fetched the same page through the same proxy without trouble. If a Node job fails on a non-443 port while curl works, this is why. The fix is on the proxy side: allow the port, or serve the destination on 443.

8. The proxy could not reach the site

A 502 or 503 on the CONNECT means authentication worked and the proxy failed on its side. Squid labels the reason in a header. A closed destination port gave X-Squid-Error: ERR_CONNECT_FAIL 61 (61 is ECONNREFUSED on macOS) and a hostname that does not exist gave ERR_DNS_FAIL 0, both as 503 Service Unavailable. curl, requests, httpx and Node printed the 503 in the same shapes as above, and Chrome again showed ERR_TUNNEL_CONNECTION_FAILED. Chromium’s own source describes that code as a tunnel that could not be established, which covers everything from a refused CONNECT to an unreachable site.

Our first successful-path test failed this way, unplanned. Squid resolved localhost to ::1, the test server listened only on 127.0.0.1, and the result was ERR_CONNECT_FAIL 61. The proxy resolves the destination itself, with its own resolver and its own idea of the network, and that can differ from what your machine sees. Commercial gateways put their own codes and headers on this failure, so read the response headers rather than assuming the code means the same thing everywhere.

9. TLS interception

Corporate networks and some security products decrypt HTTPS by issuing their own certificate for every site, signed by a company CA. If your client does not trust that CA, the tunnel opens fine and then the TLS check fails. We set up Squid’s ssl-bump with a CA called Example Corp TLS Inspection CA:

curl:     curl: (60) SSL certificate problem: self signed certificate in certificate chain
requests: SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1010)'))
httpx:    httpx.ConnectError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1010)
Node:     cause: Error [SELF_SIGNED_CERT_IN_CHAIN]: self-signed certificate in certificate chain
Chrome:   net::ERR_CERT_AUTHORITY_INVALID

None of these mention the proxy, so interception is easy to mistake for a broken site. Check who signed the certificate you receive, through the proxy and without it:

$ openssl s_client -proxy 127.0.0.1:39403 -connect localhost:39443 -servername localhost </dev/null 2>/dev/null \
    | openssl x509 -noout -issuer
issuer=CN=Example Corp TLS Inspection CA

$ openssl s_client -proxy 127.0.0.1:39401 -proxy_user alice -proxy_pass pass:s3cret \
    -connect localhost:39443 -servername localhost </dev/null 2>/dev/null | openssl x509 -noout -issuer
issuer=CN=proxy.wiki Test Origin CA

If the issuer through the proxy is your employer or your security product, the fix is to trust that CA in the client, not to turn verification off. Each client takes it differently. With the rig’s CA file in place of corp-ca.pem, all four returned 200 through the intercepting port:

# curl
curl --cacert corp-ca.pem -x http://proxy.corp.example:8080 https://example.com/

# requests 2.34.2 (or set REQUESTS_CA_BUNDLE=corp-ca.pem)
requests.get(url, proxies={"https": proxy}, verify="corp-ca.pem")

# httpx 0.28.1: a string path still works but warns:
# DeprecationWarning: `verify=<str>` is deprecated. Use `verify=ssl.create_default_context(cafile=...)`
#   or `verify=ssl.create_default_context(capath=...)` instead.
ctx = ssl.create_default_context(cafile="corp-ca.pem")
httpx.Client(proxy=proxy, verify=ctx)

# Node.js 24.2.0
NODE_EXTRA_CA_CERTS=corp-ca.pem NODE_USE_ENV_PROXY=1 HTTPS_PROXY=http://proxy.corp.example:8080 node app.mjs

curl -k and verify=False make the error go away by accepting any certificate from anyone. On an intercepted network that hides the problem; on a hostile one it hands over the connection. Apps that pin certificates will keep failing behind interception whatever you trust, which is covered under certificate pinning and TLS interception.

10. Nothing is listening

Not an authentication error, but easy to mistake for one. When the proxy port is closed, curl says curl: (7) Failed to connect to 127.0.0.1 port 39409 after 0 ms: Couldn't connect to server, requests wraps [Errno 61] Connection refused in the same misleading Unable to connect to proxy, Node reports ECONNREFUSED and Chrome shows net::ERR_PROXY_CONNECTION_FAILED. Here the requests message happens to be true. Check the host, the port, and whether the provider uses a different port per protocol.

SOCKS5 authentication failures

SOCKS5 has no status line and no 407. The client offers authentication methods, the server picks one, and username/password failure is a single status byte (RFC 1929: anything other than 0x00 is a failure, and the server must close the connection). We ran a small SOCKS5 server that accepts only username/password auth:

Case curl 8.7.1 requests 2.34.2 + PySocks 1.7.1 httpx 0.28.1 + socksio 1.0.0
No credentials curl: (97) No authentication method was acceptable. All offered SOCKS5 authentication methods were rejected Requested NO AUTHENTICATION REQUIRED from proxy server, but got NO ACCEPTABLE METHODS.
Wrong password curl: (97) User was rejected by the SOCKS5 server (1 1). SOCKS5 authentication failed Invalid username/password
Destination refused curl: (97) Can't complete SOCKS5 connection to localhost. (5) — —
http:// scheme pointed at the SOCKS port curl: (56) Proxy CONNECT aborted — —

The (1 1) in curl’s message is the sub-negotiation version and the failure status the server returned. requests raises these as ConnectionError, not ProxyError, so an except ProxyError block will not catch them. A dash in the table means we did not run that case. The SOCKS5 entry covers socks5 versus socks5h.

Cause-to-fix table

What you see Likely cause Check Fix
response 407, Tunnel connection failed: 407, ERR_INVALID_AUTH_CREDENTIALS No credentials sent, or sent to the site curl -v: is there a Proxy-Authorization line? Use -U or credentials in the proxy URL
Same 407 with credentials present Wrong password, bad username parameters, expired plan Decode the Basic header; try a bare username Correct the credentials or the parameter syntax
curl: (5) Unsupported proxy syntax, InvalidURL, ERR_INVALID_URL @, : or # in the password Look for delimiters in the password Percent-encode it, or use -U
407 with Proxy-Authenticate: NTLM or Negotiate Proxy wants Windows auth Read the challenge header --proxy-ntlm / --proxy-anyauth; for libraries, an NTLM-capable local proxy
403 on the CONNECT, ERR_ACCESS_DENIED Source IP not allowlisted, or port not allowed Compare your egress IP and the destination port with the proxy’s rules Update the allowlist; use port 443
curl: (35) ... tlsv1 alert protocol version, ERR_PROXY_CONNECTION_FAILED https:// scheme on a plain HTTP proxy Look at the proxy URL scheme Use http:// for the proxy
502 or 503 on the CONNECT, ERR_TUNNEL_CONNECTION_FAILED Proxy could not reach the site Response headers, e.g. X-Squid-Error Fix DNS or reachability on the proxy side
curl: (60), CERTIFICATE_VERIFY_FAILED, ERR_CERT_AUTHORITY_INVALID TLS interception openssl s_client -proxy ... | openssl x509 -noout -issuer Trust the interception CA in the client
curl: (7), ECONNREFUSED Proxy not listening Host and port Correct the address
curl: (97) SOCKS5 method or password rejected Credentials present and correct? Send user and password; check the server offers method 0x02

Answering a proxy password in headless Chrome

Because Chrome will not take credentials in --proxy-server, automation has to answer the 407 when it arrives. Over the DevTools protocol that means enabling Fetch with handleAuthRequests: true and replying to Fetch.authRequired. This is the core of the script we ran against Chrome 155 with Node 24.2.0:

await send('Fetch.enable', { handleAuthRequests: true });
// on each Fetch.authRequired event:
const again = tried.has(requestId); tried.add(requestId);
await send('Fetch.continueWithAuth', {
  requestId,
  authChallengeResponse: again
    ? { response: 'CancelAuth' }                       // a second challenge means the password was wrong
    : { response: 'ProvideCredentials', username, password },
});
// on each Fetch.requestPaused event:
await send('Fetch.continueRequest', { requestId });

The tried set is there for a reason we found the hard way. Our first version answered every challenge with the same credentials. Given a wrong password, Chrome challenged again immediately, the script answered again, and the loop ran until we stopped it. Answer once per request, then cancel. With the cancel in place, the wrong password ended on Squid’s own Cache Access Denied. page and the right one loaded the test page:

$ node chrome_auth.mjs 39420 http://localhost:39480/ alice wrong
authRequired: source=Proxy scheme=basic realm="proxy.wiki test rig"
authRequired: source=Proxy scheme=basic realm="proxy.wiki test rig" (repeat, cancelling)
body: "ERROR\nCache Access Denied. ..."

$ node chrome_auth.mjs 39420 http://localhost:39480/ alice s3cret
authRequired: source=Proxy scheme=basic realm="proxy.wiki test rig"
body: "origin ok; auth headers seen: none"

Playwright exposes the same thing as username and password fields on its proxy launch option. We did not run Playwright for this page. For proxies in Node outside the browser, see proxies in Node.js; for Python, proxies in requests and httpx; for curl flags, how to use a proxy with curl.

Cloudflare 1xxx errors are a different problem

A page reading Error 1020 Access denied or error code: 1003 is not a proxy authentication error. Your proxy did its job; the request reached Cloudflare, and Cloudflare answered on behalf of the site. The easiest one to see for yourself is 1003, which is what you get for asking a Cloudflare address directly instead of by hostname. This is proxy.wiki’s own edge address:

$ curl -sS -D - http://104.21.91.68/
HTTP/1.1 403 Forbidden
Content-Type: text/plain; charset=UTF-8
Content-Length: 17
Server: cloudflare
CF-RAY: a4e2b518ed10a2bf-SOF

error code: 1003

(Response headers trimmed to the relevant lines.) The CF-RAY value is the Ray ID. It is the one thing a site owner needs to find your request in their logs, so keep it whenever you report one of these. The meanings below are Cloudflare’s own, from its 1xxx error documentation:

Code Cloudflare’s description If you are the visitor If you own the site
1003 Direct IP access not allowed Use the hostname, not a Cloudflare IP address Nothing to change
1005 ASN banned by the site owner Send the owner a screenshot with the Ray ID Find the Ray ID in Security Events; check IP Access rules for the ASN
1006, 1007, 1008 Your IP address has been banned by the site owner Ask the owner to review the block; Cloudflare support cannot override it Review the security settings that matched the address
1009 Country or region banned Contact the site owner Check IP Access rules for the reported address
1010 Banned based on your browser’s signature Tell the owner; Cloudflare points to Whois for contact details Browser Integrity Check is the setting involved
1012 Access denied after malicious activity was detected from your computer or network Cloudflare’s advice is to scan for malware, then contact the owner Review the block for that address
1015 You are being rate limited Wait; Cloudflare warns that retrying quickly can extend the block Review rate limiting thresholds
1020 A security rule configured by the owner blocked the request, returned as HTTP 403 Send the owner a screenshot with the Ray ID Search Security Events for the Ray ID or IP; it shows the rule

Two details from that documentation are easy to miss. Requests blocked by WAF custom rules or WAF managed rules do not get a 1020 at all; they get the WAF block response, so a 1020 points at another feature, such as API Shield schema validation. And for the ban codes Cloudflare says plainly that its support cannot override a customer’s settings. When you see these through a proxy, the exit address, its ASN or its request rate is what the owner’s rules matched. This page does not cover getting past a particular site’s protection. If you need access, the route is the site owner, and the general background is in anti-bot systems and rate limiting.

Microsoft 365 and OneDrive: Proxy Authentication Error 2606

If you came here from Windows, you probably saw one specific dialog: OneDrive, Outlook or Teams refusing to sign in with Proxy Authentication Error - 2606. We could not reproduce it: the reports come from Windows machines and our rig runs on macOS. We also found no Microsoft documentation that defines code 2606. What exists is a long Microsoft Q&A thread.

In that thread a Microsoft moderator asked whether a proxy, VPN or firewall was active and suggested disabling it to test. The accepted answer is to sign out, run RunDll32.exe InetCpl.cpl,ResetIEtoDefaults without ticking the checkbox in the dialog it opens, and sign in again. One reply reported the error on the corporate LAN but not over VPN, fixed by the same command. Microsoft’s Internet Explorer team documented what that reset does when it shipped in IE7: it resets security, privacy and zone settings and clears cookies, cached files and saved passwords, and it does not reset connection settings, the place where proxy configuration lives. So if the command helps, it is unlikely to be because it changed your proxy.

On a managed device, ask IT first; the proxy policy probably comes from them. To see the system-wide proxy Windows services use, Microsoft documents netsh winhttp show proxy, which displays the current WinHTTP proxy settings. Compare it with the proxy shown under Settings, then Network and internet, then Proxy.

How this was tested

Every reproduction above ran on one macOS machine on 21 October 2026, against servers we started locally: two Squid 6.13 instances (Homebrew build) with Basic, NTLM (Squid’s ntlm_fake_auth helper), an IP allowlist, the stock CONNECT port rule and ssl-bump interception on separate ports; a Python HTTPS test server with its own CA; and a 56-line asyncio SOCKS5 server implementing RFC 1928 and RFC 1929. Clients: curl 8.7.1 (the macOS build, SecureTransport and LibreSSL 3.3.6), Python 3.12.13 with requests 2.34.2, urllib3 2.8.0, httpx 0.28.1, PySocks 1.7.1 and socksio 1.0.0, Node.js 24.2.0 with its bundled undici 7.10.0, Google Chrome 155.0.8059.85 headless, and OpenSSL 4.0.3.

Each case ran once. These are error strings, not rates, so a single run shows the text; it says nothing about how often each cause happens in the wild, and we have not measured that. Other builds word things differently. curl built against OpenSSL, for example, reports TLS failures in OpenSSL’s terms rather than LibreSSL’s, so match on the curl exit code and the status number, not the full sentence. Two kinds of traffic left the machine: the Cloudflare 1003 capture, sent to proxy.wiki’s own edge, and background requests Chrome made to Google services on its own, which went out through the test proxy and played no part in the results.

Frequently asked questions

What does "407 Proxy Authentication Required" mean?
Your proxy refused the request because it carried no valid proxy credentials. The 407 comes from the proxy, not the website, and the proxy has to name the scheme it wants in a Proxy-Authenticate header. Fix the proxy username, password or authentication method. Nothing about the destination site is involved.
Why does Python requests say "Unable to connect to proxy" when the proxy is up?
requests 2.34.2 uses that wording for any failed tunnel, including one where the proxy answered perfectly well with a 407. Read the end of the message instead. "Tunnel connection failed: 407 Proxy Authentication Required" means the proxy was reached and rejected your credentials.
How do I use a password containing @, : or # in a proxy URL?
Percent-encode it: @ becomes %40, : becomes %3A and # becomes %23. In our tests the password p@ss:w#rd broke curl, requests, httpx and Node when unencoded, and the encoded form worked in all four. In curl you can also pass the credentials with -U and skip URL parsing.
Why does Chrome fail when I put user:pass in --proxy-server?
Chrome 155 rejects a proxy string that contains credentials and reports net::ERR_NO_SUPPORTED_PROXIES. Leave the credentials out of the flag and answer the 407 from your automation tool, for example the DevTools Fetch.authRequired event or Playwright's proxy username and password options.
Is Cloudflare error 1020 a proxy authentication error?
No. Cloudflare documents 1020 as a security rule set by the site owner blocking the request, returned as HTTP 403. Your proxy worked. Only the site owner can change the rule, so give them the Ray ID from the error page.
What is Proxy Authentication Error 2606?
A sign-in error shown by Microsoft 365 apps such as OneDrive and Outlook. We found no Microsoft documentation that defines the code. In Microsoft's Q&A forum the accepted fix is resetting Internet Explorer settings and signing in again. On a managed device, check the proxy policy with IT first.

Sources

  1. RFC 9110 §15.5.8: 407 Proxy Authentication Required
  2. RFC 9110 §11.7.1: Proxy-Authenticate
  3. RFC 9110 §9.3.6: CONNECT
  4. RFC 7617: The Basic HTTP Authentication Scheme
  5. RFC 3986 §3.2.1: user information in a URI
  6. RFC 1929: Username/Password Authentication for SOCKS V5
  7. curl manual: --proxy-user, --proxy-ntlm, --proxy-anyauth, %{http_connect}
  8. libcurl error codes 5, 7, 35, 56, 60 and 97
  9. Chromium net_error_list.h: TUNNEL_CONNECTION_FAILED, PROXY_CONNECTION_FAILED, INVALID_AUTH_CREDENTIALS
  10. Chrome DevTools Protocol: Fetch.authRequired and Fetch.continueWithAuth
  11. Playwright: HTTP proxy with username and password
  12. Node.js CLI: NODE_USE_ENV_PROXY
  13. Node.js CLI: NODE_EXTRA_CA_CERTS
  14. requests: proxies
  15. requests: SSL certificate verification and REQUESTS_CA_BUNDLE
  16. httpx: SSL configuration
  17. Squid http_access, including the default CONNECT !SSL_ports rule
  18. Cloudflare: 1xxx errors
  19. Cloudflare: Error 1003, direct IP access not allowed
  20. Cloudflare: Error 1005, ASN banned
  21. Cloudflare: Errors 1006, 1007, 1008, IP address banned
  22. Cloudflare: Error 1009, country or region banned
  23. Cloudflare: Error 1010, browser signature banned
  24. Cloudflare: Error 1012, access denied
  25. Cloudflare: Error 1015, rate limited
  26. Cloudflare: Error 1020, access denied
  27. Microsoft Q&A: Proxy Authentication Error - 2606 for OneDrive
  28. Microsoft IE team: Reset Internet Explorer Settings (what it does and does not reset)
  29. Microsoft: netsh winhttp

Read this page as Markdown · Quote it freely under CC BY 4.0 with a link back.