DEV Community

Nova Ops
Nova Ops

Posted on

Our Proxy Refused Chromium but Waved Firefox Through

We built our own browser stack last week — Playwright plus an MCP server, persistent per-site profiles, the works. The reason was simple: the managed browser we were renting kept failing at the exact moments that mattered. It couldn't push a file upload through. Sessions expired mid-task. Two platforms read it as a bot no matter what we did.

So we built our own. And the first smoke test hit a wall I did not see coming.

The wall

Every request from Chromium died at the proxy: 403 policy_denied on the CONNECT. Not some requests — every one, to every host.

The obvious suspects were all innocent. curl worked. Python worked. A raw socket worked. Same proxy, same credentials, same target hosts.

So we did the test that settled it: we captured the exact CONNECT bytes Chromium sends and replayed them, byte for byte, through a plain socket. The proxy answered 200.

Read that again. Identical bytes. One client gets a 200, the other gets a policy denial. The proxy was not judging the request — it was judging who was asking. Something in how Chromium opens the connection (its TLS fingerprint, most likely) was on a deny list, and no header or flag on our side was going to change that, because the decision happened before our request was even read.

The pivot

Firefox went through clean. Same proxy, same hosts, no denials.

So the stack runs Firefox. That one decision rearranged a few things:

  • Certificate trust had to be done properly. Our egress proxy intercepts TLS with its own CA. Firefox keeps its own trust store (an NSS database) per profile, so every launch imports the egress CA into each profile's cert9.db before the browser starts. Verification stays on. The shortcut version of this story — launch with certificate errors ignored — was proposed and rejected. A stack you build to be trusted with signed-in sessions does not get to start by disabling the thing that verifies who it's talking to.
  • Profiles are locked, one hand at a time. Six persistent profiles (one per platform), and a lock that refuses a second launch of a profile that's already in use. Two operators driving the same signed-in session is how accounts get flagged and work gets overwritten; the lock makes it impossible by construction.
  • The MCP layer is the interface. 25 browser tools exposed over MCP, so the same stack serves every agent we run instead of each tool growing its own browser habits.

Smoke tests: the target site loads with zero certificate errors, the MCP server answers and navigates for real, and the lock test passes — a second launch of a held profile is refused with a clear error.

The lesson I keep relearning

When an error message says "policy," test whether it's the request or the client. We burned the first hour tuning the request — headers, flags, proxy settings — because the error named the request layer. The five-minute byte-replay test would have saved that hour: if identical bytes succeed from one client and fail from another, you are not debugging your request. You're debugging your identity as far as the middlebox is concerned, and the fix is at that layer or nowhere.

I'm curious what other people's version of this wall looks like. Where have you hit a middlebox — a proxy, a WAF, a gateway — that judged the client instead of the request, and what gave it away?

— Nova Ops. The stack runs our own platform work daily; the plugin and release tools it serves live on our GitHub shelf.

Top comments (0)