Repository navigation
Proxy browser requests in remote workspaces - #315843
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds support for proxying integrated browser (Browser View) network requests through the remote connection when running in a remote workspace, implemented via a shared-process HTTPS proxy with certificate pinning and automatic proxy auth.
Changes:
- Introduces a shared-process tunnel proxy (TLS + basic auth) and wires it into Browser View session creation/configuration.
- Adds a remote-proxy enablement setting plus a Browser View URL-bar indicator for remote/proxy status.
- Adds node-level test coverage for the proxy server and self-signed certificate generation.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/workbench.desktop.main.ts | Registers the shared-process tunnel proxy service in the desktop workbench entrypoint. |
| src/vs/sessions/sessions.desktop.main.ts | Registers the shared-process tunnel proxy service in the Sessions window entrypoint. |
| src/vs/workbench/contrib/browserView/electron-browser/media/browser.css | Adds styling for pre-URL widgets and a remote connection indicator. |
| src/vs/workbench/contrib/browserView/electron-browser/features/browserTabManagementFeatures.ts | Ensures localhost link opening uses the original source URI when remote proxying is enabled. |
| src/vs/workbench/contrib/browserView/electron-browser/features/browserRemoteFeatures.ts | Adds the remote indicator contribution and workbench.browser.enableRemoteProxy setting registration. |
| src/vs/workbench/contrib/browserView/electron-browser/features/browserDataStorageFeatures.ts | Adds 'default' as the new default for workbench.browser.dataStorage and updates enum descriptions. |
| src/vs/workbench/contrib/browserView/electron-browser/browserViewWorkbenchService.ts | Starts/stops the tunnel proxy for remote authorities and passes proxy info in sessionOptions. |
| src/vs/workbench/contrib/browserView/electron-browser/browserView.contribution.ts | Wires in the new remote Browser View features contribution. |
| src/vs/workbench/contrib/browserView/electron-browser/browserEditor.ts | Adds preUrlWidgets extension point and renders contributed widgets before the URL input. |
| src/vs/workbench/contrib/browserView/common/browserView.ts | Extends Browser View model/service contracts with willUseRemoteProxy() and isRemoteSession. |
| src/vs/workbench/contrib/browserView/browser/browserView.contribution.ts | Implements willUseRemoteProxy() for web (non-electron) as always false. |
| src/vs/platform/tunnel/common/sharedProcessTunnelProxyService.ts | Defines the shared-process tunnel proxy service contract and ITunnelProxyInfo. |
| src/vs/platform/tunnel/electron-browser/sharedProcessTunnelProxyService.ts | Registers the shared-process remote service channel on the renderer side. |
| src/vs/platform/tunnel/node/sharedProcessTunnelProxyService.ts | Implements a refcounted shared-process service that starts/stops TunnelProxy per authority. |
| src/vs/platform/tunnel/node/tunnelProxy.ts | Implements the local-loopback TLS HTTPS proxy that forwards via remote-agent tunnels. |
| src/vs/platform/tunnel/node/selfSignedCert.ts | Implements in-memory self-signed cert generation and fingerprinting. |
| src/vs/platform/tunnel/test/node/tunnelProxy.test.ts | Adds unit tests for proxy auth, forwarding, CONNECT, pooling, and lifecycle behavior. |
| src/vs/platform/tunnel/test/node/selfSignedCert.test.ts | Adds unit tests for the generated cert structure and fingerprint calculation. |
| src/vs/code/electron-utility/sharedProcess/sharedProcessMain.ts | Instantiates and exposes the shared-process tunnel proxy service over IPC. |
| src/vs/platform/browserView/common/browserView.ts | Updates Browser View IPC types to include sessionOptions and isRemoteSession. |
| src/vs/platform/browserView/electron-main/browserViewMainService.ts | Passes sessionOptions into BrowserSession.getOrCreate(...). |
| src/vs/platform/browserView/electron-main/browserSession.ts | Applies proxy config to Electron sessions via setProxy() when tunnel proxy is present. |
| src/vs/platform/browserView/electron-main/browserView.ts | Auto-supplies tunnel proxy credentials on webContents login and exposes isRemoteSession in state. |
| src/vs/platform/browserView/electron-main/browserSessionTrust.ts | Trusts the tunnel proxy’s self-signed certificate by fingerprint in the cert verify proc. |
| src/vs/platform/native/electron-main/auth.ts | Avoids global proxy-auth prompting for Browser View webContents (intended to defer to per-webContents handling). |
Copilot's findings
Comments suppressed due to low confidence (1)
src/vs/workbench/contrib/browserView/electron-browser/features/browserRemoteFeatures.ts:70
- The comment says the icon is "Always" displayed in remote workspaces, but the actual condition uses
willUseRemoteProxy(), which is false in remote workspaces whenworkbench.browser.enableRemoteProxyis disabled. Either adjust the comment to reflect the setting gate, or change the condition if the intent is to show the indicator wheneverremoteAuthorityis present.
// Always display the icon in remote workspaces -- just update the state based on whether we're actually serving via remote.
this._container.style.display = isConnected || this.browserViewWorkbenchService.willUseRemoteProxy() ? '' : 'none';
}
- Files reviewed: 25/25 changed files
- Comments generated: 4
Contributor
|
Base:
|
Kyle Cutler (kycutler)
marked this pull request as ready for review
June 9, 2026 20:39
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Robo (@deepak1556)Matched files:
Joaquín Ruales (@jruales)Matched files:
|
Dmitriy Vasyura (dmitrivMS)
approved these changes
Jun 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.