Proxy Toggler
Switch VS Code's HTTP proxy between proxy profiles and off, from the status bar. Table of Contents
:star: Features
Switch profiles from the status bar
Add a profile and test its connection
:clipboard: Requirements
:zap: Quick Start
:keyboard: Commands
:keyboard: KeybindingsProxy Toggler adds no keyboard shortcuts of its own. To add yours, run Preferences: Open Keyboard Shortcuts (JSON) and add entries like these:
:gear: Settings
Managed VS Code SettingsThis extension manages the following VS Code settings:
:globe_with_meridians: How VS Code Uses Proxy SettingsSigning in to a proxyProfiles hold no user name or password. When a proxy asks for a sign-in (HTTP status 407), VS Code shows its own login dialog and can remember what you enter.
Settings SyncSettings Sync uploads both the
To keep either on one machine, list it in When Settings Sync shows a conflict in VS Code ProfilesVS Code's proxy settings are shared by all VS Code Profiles: turning the proxy on in one turns it on in all of them. Proxy Toggler's profiles are shared the same way, and live in the Default profile's settings file (Preferences: Open Application Settings (JSON)). Each VS Code Profile remembers its own current profile. Bypass patternsThe VS Code window and extensions read the bypass list differently. They agree on:
Loopback addresses ( What "off" meansTurning the proxy off removes
The proxy lab measured this on VS Code 1.97 and the latest release; see TESTING.md.
|
| Remote | Proxy settings by default | What the toggle and switcher change |
|---|---|---|
| SSH, Tunnels, remote containers | The remote machine's own | The remote machine's settings, while local windows keep their proxy. The status bar names the host, as in Proxy (devbox): Work. |
| WSL, local Dev Containers | This computer's | This computer's settings, as in a local window. The tooltip says so. |
When the remote machine keeps its own settings:
- Proxy Toggler remembers on or off and the current profile on that machine, for every window connected to it. Local windows keep their own.
- The status bar shows the host name, or the remote type for containers, whose host names are generated.
- Turning the proxy off writes an empty
http.proxyto the remote machine's settings instead of removing it. Without a value there, VS Code can hand the remote side this computer's proxy while a window starts (TESTING.md, checks 1 and 6). For the same reason, Proxy Toggler shows only what the remote machine's own settings hold. - The VS Code window itself, with its Marketplace searches, still uses this computer's proxy settings.
Test Connection runs on the remote side and says where it ran. Where the remote uses this computer's settings, the VS Code window connects from this computer, so the test does not cover it.
Giving a WSL or container remote its own proxy
WSL and local Dev Containers use this computer's proxy settings by default. When their remote side
needs another proxy, pick Use a Separate Proxy for This Remote in the switcher. Proxy Toggler
sets http.useLocalProxyConfiguration to false in the remote machine's settings, which applies
without a reload, and writes an empty http.proxy there, so the remote side starts with no proxy.
From then on the toggle manages that remote's own proxy.
Use This Computer's Proxy Again reverses it, and removes the remote machine's http.* values:
while they remain, a later write would land in the remote file and change nothing.
A proxy on a loopback address, such as 127.0.0.1, is this computer for the VS Code window, but not
for WSL in its default NAT mode, nor for a container. While the current profile uses one, the
switcher lists Use a Separate Proxy for This Remote first.
:bulb: How It Works
flowchart LR
U["You trigger Enable/Disable/Toggle"] --> E["Proxy Toggler"]
E --> C["Apply VS Code settings<br/>(http.proxy, http.proxyStrictSSL, http.noProxy)"]
C --> VS["VS Code network layer"]
VS --> Net["Outbound requests"]
E --> SB["Status bar indicator"]
:lock: Security
- No stored credentials: profiles hold no user name or password, and Proxy Toggler never
writes credentials to
settings.json,globalState, logs, or messages. When a proxy asks for a sign-in, VS Code's own login dialog asks you - No
http.proxyAuthorizationheader is set by this extension - The user name and password that 0.1.0 could store stay under its own extension ID,
aymenhammouda.proxy-toggler, where this version cannot reach them - Works in Restricted Mode: the extension reads no workspace files, so it stays available in folders you have not trusted
- Report vulnerabilities privately; see SECURITY.md
Trusting a company's certificate authority
Some companies inspect HTTPS traffic through a proxy that signs certificates with the company's own certificate authority.
- The VS Code window, and extensions by default, trust the authorities in your operating system's
certificate store (
http.systemCertificates, on by default). Install the company's authority there. - VS Code's command line, such as
code --install-extension, uses Node's built-in list instead. Point theNODE_EXTRA_CA_CERTSenvironment variable at the authority's certificate, a PEM file. - Test Connection checks certificates against Node's built-in list only, so it warns about a company authority even when VS Code trusts it, and names that authority.
:wrench: Troubleshooting
Toggle not changing settings? Ensure user-level proxy settings aren't being overridden by workspace settings.
Connection still blocked after enabling? Some environments require system-level proxy configuration. This extension only manages VS Code's internal HTTP proxy settings.
Asked to sign in to the proxy? VS Code shows its own login dialog when the proxy asks for credentials; Proxy Toggler stores none.
Something failed and the notification did not say why? Open View → Output and pick Proxy Toggler in the dropdown. Errors are logged there with details; credentials never are.
:handshake: Contributing
Getting started
You need Node.js 26 (the version in .nvmrc; run nvm use if you use nvm) and VS Code 1.97 or later.
git clone https://github.com/bluecloud-dev/proxy-toggler.git
cd proxy-toggler
npm ci
npm run check
npm run check runs the format check, lint, the unused-code check, the type check, and the unit and security tests with coverage. It is what CI runs before the integration tests.
Run the extension
- Run
npm run watchto rebuilddist/extension.json every change, ornpm run buildonce. - Open the folder in VS Code and press
F5. If VS Code asks for a debugger, choose VS Code Extension Development. - Use the commands in the new Extension Development Host window. Errors appear in Output → Proxy Toggler.
Common workflows
| Task | Command |
|---|---|
| Format all project files | npm run format |
| Lint (ESLint with type information) | npm run lint |
| Find unused files, exports, and dependencies | npm run lint:unused |
| Type-check | npm run typecheck |
| Unit and security tests | npm test |
| The same, with the coverage gate | npm run coverage |
| Integration tests in VS Code (minimum and stable) | npm run test:integration |
| Build the VSIX and check its contents | npm run package |
| Run the built VSIX in Restricted Mode | npm run test:packaged |
On Linux without a display, prefix the integration and packaged tests with xvfb-run -a. The first run downloads VS Code into .vscode-test/.
Where to look next
- ARCHITECTURE.md: layers, persisted data, the error model, and design decisions.
- TESTING.md: how the tests are organized, the shared fakes, and the manual QA checklist.
- QUALITY_BASELINE.md: the coding, TypeScript, extension, and dependency standards.
- CONTRIBUTING.md: what to read and run before a pull request.
- SECURITY.md: how to report a vulnerability, and the security controls with their tests.
- CHANGELOG.md: version history.

