Skip to content

Commit 582ab6f

Browse files
authored
Set Chromium MaxConnectionsPerProxy default to 16 (#183)
**Summary** Set Chromium’s default managed policy `MaxConnectionsPerProxy` to `16` in the `kernel-images` browser images. **Why** In live testing on a stealth Envoy VM with a 6-tab workload, Chromium’s default behavior allowed substantially higher upstream proxy fanout than desired. Setting `MaxConnectionsPerProxy` effectively clamps Chrome-to-proxy and proxy-to-origin connection counts much closer to the configured limit. Observed results from the same workload: - Default: peak ~34 Chrome->Envoy connections, ~33 Envoy->Ping connections - `MaxConnectionsPerProxy=16`: peak ~17 / ~17 - `MaxConnectionsPerProxy=8`: peak ~9 / ~9 - `MaxConnectionsPerProxy=4`: peak ~7 / ~7 This makes `16` a good default for reducing proxy connection fanout without needing per-session configuration. **What changed** - Added `"MaxConnectionsPerProxy": 16` to the shared managed Chromium policy baked into the browser images. - Added assertions in existing e2e tests that read `/etc/chromium/policies/managed/policy.json` to verify the default is present. **Implementation details** The default policy is sourced from the shared image policy file and copied into the VM at `/etc/chromium/policies/managed/policy.json`, so this change applies to the browser image startup path directly. **Validation** - Confirmed the managed policy JSON contains `MaxConnectionsPerProxy: 16` - Ran: - `go test ./lib/policy` - `go test -run '^$' ./e2e` <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Changes a Chromium managed policy that can affect browser networking/concurrency behavior across all images. Added e2e checks reduce regression risk but policy changes may have wide runtime impact. > > **Overview** > **Updates the default managed Chromium policy** to set `MaxConnectionsPerProxy` to `16` in `shared/chromium-policies/managed/policy.json`. > > **Hardens e2e coverage** by asserting `MaxConnectionsPerProxy` exists and equals `16` in both the Chromium policy test and the enterprise extension policy test, so missing/changed policy values are caught early. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 524dd6b. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent 11c57ac commit 582ab6f

3 files changed

Lines changed: 9 additions & 0 deletions

File tree

server/e2e/e2e_chromium_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -754,6 +754,10 @@ func TestWebBotAuthInstallation(t *testing.T) {
754754
err = json.Unmarshal([]byte(policyContent), &policy)
755755
require.NoError(t, err, "failed to parse policy.json")
756756

757+
maxConnectionsPerProxy, ok := policy["MaxConnectionsPerProxy"].(float64)
758+
require.True(t, ok, "MaxConnectionsPerProxy not found in policy.json")
759+
require.Equal(t, float64(16), maxConnectionsPerProxy, "unexpected MaxConnectionsPerProxy value")
760+
757761
// Check ExtensionInstallForcelist exists
758762
extensionInstallForcelist, ok := policy["ExtensionInstallForcelist"].([]interface{})
759763
require.True(t, ok, "ExtensionInstallForcelist not found in policy.json")

server/e2e/e2e_enterprise_extension_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,10 @@ func verifyEnterprisePolicy(t *testing.T, ctx context.Context, c *TestContainer)
253253
err = json.Unmarshal([]byte(policyContent), &policy)
254254
require.NoError(t, err, "failed to parse policy.json")
255255

256+
maxConnectionsPerProxy, ok := policy["MaxConnectionsPerProxy"].(float64)
257+
require.True(t, ok, "MaxConnectionsPerProxy not found in policy.json")
258+
require.Equal(t, float64(16), maxConnectionsPerProxy, "unexpected MaxConnectionsPerProxy value")
259+
256260
// Check ExtensionInstallForcelist exists and contains our extension
257261
extensionInstallForcelist, ok := policy["ExtensionInstallForcelist"].([]interface{})
258262
require.True(t, ok, "ExtensionInstallForcelist not found in policy.json")

shared/chromium-policies/managed/policy.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"DefaultSearchProviderName": "DuckDuckGo",
1010
"DefaultSearchProviderSearchURL": "https://duckduckgo.com/?q={searchTerms}",
1111
"DefaultSearchProviderSuggestURL": "https://duckduckgo.com/ac/?q={searchTerms}",
12+
"MaxConnectionsPerProxy": 16,
1213
"NewTabPageLocation": "https://start.duckduckgo.com/",
1314
"ExtensionSettings": {
1415
"*": {

0 commit comments

Comments
 (0)