Proxy browser requests in remote workspaces#311568
Draft
Conversation
Co-authored-by: Copilot <copilot@github.com>
Contributor
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enables Integrated Browser views to route network traffic through a remote workspace by introducing a shared-process SOCKS5 tunnel proxy, wiring proxy configuration into BrowserView session creation, and adding UI/context cues for remote sessions.
Changes:
- Add a shared-process SOCKS5
TunnelProxyservice and wire it into the desktop workbench + shared process IPC. - Extend BrowserView session creation to use
IBrowserSessionOptions(scope/workspaceId/proxyUrl) and exposeisRemoteSessionin state/model. - Add a remote-session indicator in the BrowserView URL bar and adjust related UI/layout and localhost-link opening behavior for remote.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/workbench.desktop.main.ts | Loads the electron-browser registration for the shared-process tunnel proxy service. |
| src/vs/workbench/contrib/browserView/electron-browser/media/browser.css | Adjusts URL container alignment and adds styles for a remote-session indicator widget area. |
| src/vs/workbench/contrib/browserView/electron-browser/features/browserTabManagementFeatures.ts | Updates localhost external opener to prefer sourceUri in remote sessions. |
| src/vs/workbench/contrib/browserView/electron-browser/features/browserRemoteIndicator.ts | New contribution: URL-bar indicator + context key reflecting remote-session usage. |
| src/vs/workbench/contrib/browserView/electron-browser/features/browserDataStorageFeatures.ts | Adds 'default' option for browser data storage setting with updated descriptions. |
| src/vs/workbench/contrib/browserView/electron-browser/browserViewWorkbenchService.ts | Starts/stops tunnel proxy for remote authority and passes proxy URL into model initialization. |
| src/vs/workbench/contrib/browserView/electron-browser/browserView.contribution.ts | Registers the new remote indicator contribution. |
| src/vs/workbench/contrib/browserView/electron-browser/browserEditor.ts | Adds “pre-URL widgets” slot in the URL container and renders contributed widgets there. |
| src/vs/workbench/contrib/browserView/common/browserView.ts | Plumbs proxyUrl + storage selection into initialization and adds isRemoteSession to the model. |
| src/vs/platform/tunnel/test/node/tunnelProxy.test.ts | Adds unit tests for SOCKS5 greeting/CONNECT handling and basic lifecycle behavior. |
| src/vs/platform/tunnel/node/tunnelProxy.ts | New SOCKS5 proxy implementation that tunnels TCP connections through the remote agent tunnel. |
| src/vs/platform/tunnel/node/sharedProcessTunnelProxyService.ts | New shared-process service managing per-authority proxy instances with ref counting. |
| src/vs/platform/tunnel/electron-browser/sharedProcessTunnelProxyService.ts | Registers the shared-process proxy service client-side (electron-browser). |
| src/vs/platform/tunnel/common/sharedProcessTunnelProxyService.ts | Defines the shared-process proxy service interface + IPC channel name. |
| src/vs/platform/browserView/electron-main/browserViewMainService.ts | Updates BrowserView creation to accept IBrowserSessionOptions. |
| src/vs/platform/browserView/electron-main/browserView.ts | Adds isRemoteSession to BrowserView state returned to renderer. |
| src/vs/platform/browserView/electron-main/browserSession.ts | Creates sessions based on IBrowserSessionOptions and applies session.setProxy() when proxying. |
| src/vs/platform/browserView/common/browserView.ts | Adds IBrowserSessionOptions and updates IBrowserViewService API + state shape. |
| src/vs/code/electron-utility/sharedProcess/sharedProcessMain.ts | Registers the proxy service in the shared process and exposes its IPC channel. |
Copilot's findings
- Files reviewed: 19/19 changed files
- Comments generated: 4
Co-authored-by: Copilot <copilot@github.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.