Visual Studio Code can synchronize extensions, settings, and snippets across devices—but all of this works through Microsoft servers, which are often inaccessible behind corporate firewalls, in office networks with strict filtering, or from regions with limited access. The result is that the Extensions Marketplace hangs, Settings Sync fails to connect, and updates do not download. In this article, we will discuss how to properly configure a proxy in VS Code so that all these issues disappear once and for all.
Why VS Code Doesn't Work Without a Proxy in Some Networks
Visual Studio Code is not just a text editor. Under the hood, it constantly communicates with external servers: downloading extension updates from marketplace.visualstudio.com, synchronizing settings through vscode.dev and GitHub/Microsoft Account servers, checking for updates to the editor itself, and sending telemetry (if not disabled).
All these requests go through standard HTTPS connections. And this is where the problems begin:
- Corporate Networks — system administrators block direct internet access, requiring all traffic to go through a corporate proxy server. VS Code "doesn't know" about this and simply cannot connect.
- Office Firewalls with Whitelisting — only specific domains are allowed, and
marketplace.visualstudio.comis not on this list. - Regional Restrictions — in several countries and regions, access to Microsoft services is limited or unstable. A proxy with an IP from the required country solves the problem.
- VPN Conflicts — some corporate VPNs intercept traffic but do not forward it correctly, causing VS Code to lose connection to the Marketplace.
- Unstable Internet + Proxy with Caching — a proxy server can cache extension packets and speed up installation in teams with slow connections.
The symptoms of all these problems are similar: extensions do not install or hang on loading, Settings Sync gives an authorization error or "failed to connect," VS Code updates do not download, and the Output panel shows errors like ECONNREFUSED or ETIMEDOUT.
How VS Code Handles Proxies: What You Need to Know
VS Code is built on Electron, which uses the Chromium engine for network requests. This means that proxy settings work similarly to browser settings—the editor supports HTTP, HTTPS, and SOCKS5 proxies.
It is important to understand the hierarchy by which VS Code looks for proxy settings:
- System Proxy Settings — if a system proxy is configured in Windows/macOS/Linux, VS Code will automatically pick it up (the
http.systemProxyparameter). - Environment Variables —
HTTP_PROXY,HTTPS_PROXY,NO_PROXY— standard method for Linux/macOS. - Settings in settings.json — explicit proxy specification through the
http.proxyparameter and related options. - Command Line Arguments — you can launch VS Code with proxy flags directly.
Priority: explicit settings in settings.json override environment variables, which in turn override system settings. If something isn't working—check in this order.
💡 Important Note
VS Code uses two separate network stacks: one for the editor itself (Electron/Chromium) and another for extensions, which may make their own HTTP requests via Node.js. Configuring the proxy in settings.json covers both stacks, but some extensions ignore system settings and require separate configuration.
Configuring Proxy via settings.json: Step by Step
This is the most reliable and recommended way. Settings in settings.json apply globally to all network requests in VS Code.
Step 1: Open settings.json
Press Ctrl+Shift+P (or Cmd+Shift+P on Mac), type “Open User Settings (JSON)” and select this option. The user settings file will open.
Step 2: Add Proxy Parameters
Insert the necessary lines inside the JSON object. Examples for different types of proxies:
HTTP/HTTPS Proxy (without authentication):
{
"http.proxy": "http://192.168.1.100:3128",
"http.proxyStrictSSL": false
}
HTTP/HTTPS Proxy with Username and Password:
{
"http.proxy": "http://username:password@proxy-host:3128",
"http.proxyStrictSSL": false
}
SOCKS5 Proxy:
{
"http.proxy": "socks5://username:password@proxy-host:1080",
"http.proxyStrictSSL": false
}
Step 3: Understand the Parameters
| Parameter | Value | When to Use |
|---|---|---|
http.proxy |
Proxy URL | Main parameter, required |
http.proxyStrictSSL |
true / false | false — if the proxy uses a self-signed certificate |
http.proxyAuthorization |
Base64 string | Alternative way to pass username/password |
http.noProxy |
List of domains | Domains that should bypass the proxy (localhost, internal hosts) |
http.systemProxy |
on / off / override | Manage system proxy (new parameter in VS Code 1.87+) |
Step 4: Restart VS Code
After saving settings.json, completely close and reopen VS Code. A partial reload (Reload Window) sometimes does not apply new network settings.
Proxy via Environment Variables (HTTP_PROXY / HTTPS_PROXY)
This method is especially convenient on Linux and macOS, as well as in teams where the proxy is configured at the system level and should apply to all development tools—not just VS Code, but also npm, pip, git, etc.
Linux / macOS — Permanent Configuration
Add to ~/.bashrc, ~/.zshrc or ~/.profile:
export HTTP_PROXY="http://username:password@proxy-host:3128" export HTTPS_PROXY="http://username:password@proxy-host:3128" export NO_PROXY="localhost,127.0.0.1,*.local,*.internal"
After that, run source ~/.bashrc (or re-login to the session) and launch VS Code from the terminal with the command code . — the variables will be inherited.
Windows — via System Variables
Open “System Properties” → “Advanced System Settings” → “Environment Variables”. Add the variables HTTP_PROXY and HTTPS_PROXY in the “User Variables” section (or “System Variables” for application to all users). After saving, restart VS Code.
Launching VS Code with Proxy Directly from the Command Line
If you need to quickly check without permanent configuration:
# Linux/macOS HTTP_PROXY=http://proxy-host:3128 HTTPS_PROXY=http://proxy-host:3128 code . # Windows PowerShell $env:HTTP_PROXY="http://proxy-host:3128"; $env:HTTPS_PROXY="http://proxy-host:3128"; code .
Settings Sync via Proxy: Diagnosis and Troubleshooting
Settings Sync is a built-in feature of VS Code that synchronizes settings, extensions, snippets, keyboard shortcuts, and profiles between devices via a Microsoft or GitHub account. It works through HTTPS requests to Microsoft and GitHub servers, and this is where the proxy is critically important.
Typical Settings Sync Errors Behind a Proxy
| Error | Cause | Solution |
|---|---|---|
| “Cannot connect to the server” | Proxy not configured or blocked | Configure http.proxy in settings.json |
| “Authentication failed” | Proxy intercepts OAuth token | Disable SSL inspection for *.microsoft.com |
| “Sync is turned on but not syncing” | Corporate proxy blocks WebSocket | Use a proxy that supports WebSocket |
| Sync hangs on “Syncing...” | Connection timeout through a slow proxy | Switch to a faster proxy |
Diagnosis via Output
Open View → Output and select “Settings Sync” from the dropdown list. Here you can see all connection attempts and error codes. Look for lines with ECONNREFUSED, 407 Proxy Authentication Required, or CERT_UNTRUSTED—each of these codes indicates a specific problem with the proxy.
If you see the error 407—the proxy requires authentication, add the username and password to the proxy URL. If CERT_UNTRUSTED—set "http.proxyStrictSSL": false or add the corporate CA root certificate.
Domains That Must Be Accessible for Settings Sync
Make sure the following hosts are accessible through your proxy:
login.microsoftonline.com— authorization via Microsoft Accountgithub.com— authorization via GitHubapi.github.com— GitHub API for synchronization via Gistvscode.dev— VS Code synchronization service*.vscode-cdn.net— CDN for VS Code resources
Extensions Marketplace: Why Extensions Fail to Install and How to Fix It
The VS Code Marketplace operates through the domain marketplace.visualstudio.com and Microsoft CDN servers. If the proxy is configured correctly, installing extensions works seamlessly. However, there are several specific issues.
Extension Installs but Doesn't Work
Many extensions make their own network requests at startup—for example, downloading language servers (LSP), binary dependencies, or database updates. These requests go through Node.js within the extension, and they adhere to the VS Code proxy settings, but only if the extension is written with the HTTP_PROXY variables in mind.
If the extension still does not work behind a proxy—check its documentation. Many popular extensions have their own proxy settings. For example:
- Python (Pylance/Pylint) — uses system environment variables
- ESLint, Prettier — work locally, no proxy needed
- GitHub Copilot — requires access to
api.github.com, picks up the proxy from settings.json - Remote - SSH — proxy needed for SSH tunnel, configured separately in SSH config
- Docker — uses the system proxy of the Docker daemon
Installing Extensions Manually (Offline)
If the proxy is unavailable or unstable, extensions can be installed manually via a .vsix file. Download the extension file from marketplace.visualstudio.com on a machine with internet access, then in VS Code: Extensions → ··· → Install from VSIX.
Which Type of Proxy to Choose for VS Code
The choice of proxy type depends on the task. Let's consider the main options relevant to development.
| Proxy Type | Speed | Reliability | When Suitable for VS Code |
|---|---|---|---|
| Datacenter Proxies | ⚡ High | ✅ Stable | Bypassing corporate restrictions, downloading extensions, CI/CD pipelines |
| Residential Proxies | 🔄 Medium | ✅ High Trust | Access to geo-restricted resources, testing from a specific region |
| Mobile Proxies | 🔄 Medium | ✅ Maximum Trust | Rarely needed for VS Code, but useful for mobile app development with geo-testing |
| Corporate Proxy (Squid, ISA) | ⚡ High | ⚠️ Depends on settings | Office environment, required by company policy |
For most developers who simply need to bypass corporate restrictions or work from a country with unstable access to Microsoft servers, datacenter proxies will be the optimal choice—they are fast, stable, and well-suited for technical tasks like downloading packages and synchronizing settings.
If the task is to test an application from a specific geographic region (for example, to check how your service works for users in Germany or the USA), then residential proxies with real IPs of home users from the required country will be useful.
Corporate Proxy with SSL Inspection: A Special Case
Corporate proxies with SSL inspection (man-in-the-middle) are a separate headache for developers. Such a proxy decrypts HTTPS traffic, checks it, and re-encrypts it, signing it with its corporate certificate. As a result, VS Code sees an "unknown" certificate and refuses to work.
Symptoms
- Error
CERT_UNTRUSTEDorunable to verify the first certificatein Output - Extensions do not install, even though the proxy is specified correctly
- Settings Sync does not authorize
- npm and pip also complain about certificates
Solution 1: Disable SSL Verification (Quick but Less Secure)
{
"http.proxyStrictSSL": false
}
This is a quick solution that disables the verification of the proxy's SSL certificate. Suitable for an internal corporate network where the proxy is trusted.
Solution 2: Add Corporate CA Certificate (The Right Way)
Obtain the corporate root certificate (file .pem or .crt) from the system administrator and add it to the settings:
{
"http.proxy": "http://corporate-proxy:3128",
"http.proxyStrictSSL": true,
"http.proxyCertificates": true
}
Also, add the certificate to the OS's system store—VS Code uses system certificates starting from version 1.40. On Windows, simply install the certificate in “Trusted Root Certification Authorities” via certmgr.msc. On Linux, add the certificate to /usr/local/share/ca-certificates/ and run update-ca-certificates.
Solution 3: NODE_EXTRA_CA_CERTS Variable
VS Code and its extensions run on Node.js, so you can specify additional CA certificates via an environment variable:
# Linux/macOS export NODE_EXTRA_CA_CERTS="/path/to/corporate-ca.pem" # Windows PowerShell $env:NODE_EXTRA_CA_CERTS="C:\certs\corporate-ca.pem"
Checklist: VS Code + Proxy Works Correctly
Use this checklist to ensure everything is set up correctly or quickly find the cause of the problem.
✅ Basic Proxy Setup
- The
http.proxyparameter with the correct URL is specified insettings.json - The proxy URL includes the scheme:
http://orsocks5:// - If the proxy requires authentication—the username and password are specified in the URL
- VS Code has been fully restarted after changing settings
✅ SSL and Certificates
- If the proxy has SSL inspection—a corporate CA certificate is installed
- Or
"http.proxyStrictSSL": falseis set as a temporary solution - There are no
CERT_UNTRUSTEDerrors in Output
✅ Settings Sync
- The domains
login.microsoftonline.comandvscode.devare accessible via the proxy - Authorization via Microsoft Account or GitHub is successful
- There are no connection errors in Output → Settings Sync
- The sync status in the status bar shows an active icon
✅ Marketplace and Extensions
- Searching for extensions in the Marketplace works and displays results
- Extension installation completes without errors
- Extensions requiring network access (Copilot, Remote) work correctly
- Extension updates download automatically
✅ Additional Developer Tools
- npm is configured to work through the proxy:
npm config set proxy http://proxy:3128 - git is configured:
git config --global http.proxy http://proxy:3128 - pip (if using Python):
HTTP_PROXYvariables are set
Conclusion
Configuring a proxy in VS Code is a task that, once solved, frees you from issues with a hanging Marketplace, non-functional Settings Sync, and extensions that cannot download dependencies. Key takeaways from this article:
- The most reliable way is to specify
http.proxyinsettings.json: it works for the editor itself and for most extensions. - Environment variables (
HTTP_PROXY,HTTPS_PROXY) are convenient for unifying proxy settings for the entire developer environment. - Corporate proxies with SSL inspection require either disabling
proxyStrictSSLor installing a corporate CA certificate. - Settings Sync works through the proxy without additional settings—as long as Microsoft and GitHub domains are accessible.
- Diagnosis always starts with Output → Settings Sync and Output → Extensions—there you can see all network errors with codes.
If you work in an environment with limited internet access or need to test an application from a specific geographic region, we recommend using datacenter proxies for stable and fast work with development tools—they provide high connection speeds and are excellent for technical tasks like downloading packages, synchronizing settings, and working with remote repositories.