Skip to content

fix(mcp): ensure --proxy-server overrides config-file proxy#40212

Merged
yury-s merged 1 commit intomicrosoft:mainfrom
yury-s:fix-40204
Apr 16, 2026
Merged

fix(mcp): ensure --proxy-server overrides config-file proxy#40212
yury-s merged 1 commit intomicrosoft:mainfrom
yury-s:fix-40204

Conversation

@yury-s
Copy link
Copy Markdown
Member

@yury-s yury-s commented Apr 14, 2026

Summary

  • CLI --proxy-server was silently overridden when a config file set browser.contextOptions.proxy, because browserFactory spreads contextOptions after launchOptions.
  • Set the proxy on both launchOptions.proxy and contextOptions.proxy so the CLI consistently wins through the merge-and-spread pipeline.
  • Adds two tests: one covering the basic --proxy-server routing, one covering the CLI-overrides-config-file scenario.

Fixes #40204

@yury-s yury-s marked this pull request as ready for review April 14, 2026 22:45
The CLI --proxy-server option previously set only launchOptions.proxy.
If a config file set browser.contextOptions.proxy, browserFactory's
spread order (contextOptions after launchOptions) caused the config
file value to silently override the CLI value. Set the proxy on both
launchOptions and contextOptions so the CLI consistently wins through
the merge-and-spread pipeline.

Fixes: microsoft#40204
@yury-s yury-s changed the title test(mcp): verify --proxy-server routes traffic through proxy fix(mcp): ensure --proxy-server overrides config-file proxy Apr 14, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Test results for "MCP"

3 failed
❌ [firefox] › mcp/dashboard.spec.ts:48 › should show current workspace sessions first @mcp-windows-latest
❌ [msedge] › mcp/dashboard.spec.ts:26 › should show browser session chip @mcp-windows-latest
❌ [msedge] › mcp/dashboard.spec.ts:48 › should show current workspace sessions first @mcp-windows-latest

5997 passed, 916 skipped


Merge workflow run.

@yury-s yury-s merged commit d10b17f into microsoft:main Apr 16, 2026
9 of 10 checks passed
@yury-s yury-s deleted the fix-40204 branch April 16, 2026 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: --proxy-server CLI arg is silently ignored — proxy never reaches Chrome launch arguments

2 participants