← 返回首页
Network Connections in Visual Studio Code

Documentation

Topics Overview Overview Linux macOS Windows VS Code for the Web Raspberry Pi Network Additional Components Uninstall VS Code Tutorial Copilot Quickstart User Interface Personalize VS Code Install Extensions Tips and Tricks Intro Videos Overview Setup Quickstart Overview Language Models Context Tools Agents Customization Trust & Safety Overview Agents Tutorial Agents Window Planning Memory Tools Subagents Local Agents Copilot CLI Cloud Agents Third-Party Agents Overview Chat Sessions Add Context Inline Chat Review Edits Checkpoints Artifacts Panel Debug Chat Interactions Prompt Examples Overview Instructions Prompt Files Custom Agents Agent Skills Language Models MCP Hooks Plugins Context Engineering Customize AI Test-Driven Development Edit Notebooks with AI Test with AI Test Web Apps with Browser Tools Debug with AI MCP Dev Guide OpenTelemetry Monitoring Inline Suggestions Smart Actions Best Practices Security Troubleshooting FAQ Cheat Sheet Settings Reference MCP Configuration Workspace Context Display Language Layout Keyboard Shortcuts Settings Settings Sync Extension Marketplace Extension Runtime Security Themes Profiles Overview Voice Interactions Command Line Interface Telemetry Basic Editing IntelliSense Code Navigation Refactoring Snippets Overview Multi-Root Workspaces Workspace Trust Tasks Debugging Debug Configuration Testing Port Forwarding Integrated Browser Overview Quickstart Staging & Committing Branches & Worktrees Repositories & Remotes Merge Conflicts Collaborate on GitHub Troubleshooting FAQ Getting Started Tutorial Terminal Basics Terminal Profiles Shell Integration Appearance Advanced Overview Enterprise Policies AI Settings Extensions Telemetry Updates Overview JavaScript JSON HTML Emmet CSS, SCSS and Less TypeScript Markdown PowerShell C++ Java PHP Python Julia R Ruby Rust Go T-SQL C# .NET Swift Working with JavaScript Node.js Tutorial Node.js Debugging Deploy Node.js Apps Browser Debugging Angular Tutorial React Tutorial Vue Tutorial Debugging Recipes Performance Profiling Extensions Tutorial Transpiling Editing Refactoring Debugging Quick Start Tutorial Run Python Code Editing Linting Formatting Debugging Environments Testing Python Interactive Django Tutorial FastAPI Tutorial Flask Tutorial Create Containers Deploy Python Apps Python in the Web Settings Reference Getting Started Navigate and Edit Refactoring Formatting and Linting Project Management Build Tools Run and Debug Testing Spring Boot Modernizing Java Apps Application Servers Deploy Java Apps GUI Applications Extensions FAQ Intro Videos GCC on Linux GCC on Windows GCC on Windows Subsystem for Linux Clang on macOS Microsoft C++ on Windows Build with CMake CMake Tools on Linux CMake Quick Start C++ Dev Tools for Copilot Editing and Navigating Debugging Configure Debugging Refactoring Settings Reference Configure IntelliSense Configure IntelliSense for Cross-Compiling FAQ Intro Videos Get Started Navigate and Edit IntelliCode Refactoring Formatting and Linting Project Management Build Tools Package Management Run and Debug Testing FAQ Overview Node.js Python ASP.NET Core Debug Docker Compose Registries Deploy to Azure Choose a Dev Environment Customize Develop with Kubernetes Tips and Tricks Overview Jupyter Notebooks Data Science Tutorial Python Interactive Data Wrangler Quick Start Data Wrangler PyTorch Support Azure Machine Learning Manage Jupyter Kernels Jupyter Notebooks on the Web Data Science in Microsoft Fabric Foundry Toolkit Overview Foundry Toolkit Copilot Tools Create Agents Models Playground Agent Builder Agent Inspector Evaluation Tool Catalog Fine-Tuning (Automated Setup) Fine-Tuning (Project Template) Model Conversion Tracing Profiling (Windows ML) FAQ File Structure Manual Model Conversion Manual Model Conversion on GPU Setup Environment Without Foundry Toolkit Template Project Migrating from Visualizer to Agent Inspector Overview Getting Started Resources View Deployment VS Code for the Web - Azure Containers Azure Kubernetes Service Kubernetes MongoDB Remote Debugging for Node.js Overview SSH Dev Containers Windows Subsystem for Linux GitHub Codespaces VS Code Server Tunnels SSH Tutorial WSL Tutorial Tips and Tricks FAQ Overview Tutorial Attach to Container Create Dev Container Advanced Containers devcontainer.json Dev Container CLI Tips and Tricks FAQ Default Keyboard Shortcuts Default Settings Substitution Variables Tasks Schema
Copy as Markdown

On this page there are 4 sections

Network Connections in Visual Studio Code

Visual Studio Code is built on top of Electron and benefits from all the networking stack capabilities of Chromium. This also means that VS Code users get much of the networking support available in Google Chrome.

Common hostnames

A handful of features within VS Code require network communication to work, such as the auto-update mechanism, querying and installing extensions, and telemetry. For these features to work properly in a proxy environment, you must have the product correctly configured.

If you are behind a firewall that needs to allow specific domains used by VS Code, here's the list of hostnames you should allow communication to go through:

  • update.code.visualstudio.com - Visual Studio Code download and update server
  • code.visualstudio.com - Visual Studio Code documentation
  • go.microsoft.com - Microsoft link forwarding service
  • marketplace.visualstudio.com - Visual Studio Marketplace
  • *.gallery.vsassets.io - Visual Studio Marketplace
  • *.gallerycdn.vsassets.io - Visual Studio Marketplace
  • rink.hockeyapp.net - Crash reporting service
  • raw.githubusercontent.com - GitHub repository raw file access
  • vsmarketplacebadges.dev - Visual Studio Marketplace badge service
  • *.vscode-cdn.net - Visual Studio Code CDN
  • vscode.download.prss.microsoft.com - Visual Studio Code download CDN
  • download.visualstudio.microsoft.com - Visual Studio download server, provides dependencies for some VS Code extensions (C++, C#)
  • vscode-sync.trafficmanager.net - Visual Studio Code Settings Sync service
  • vscode-sync-insiders.trafficmanager.net - Visual Studio Code Settings Sync service (Insiders)
  • vscode.dev - Used as a fallback when logging in with GitHub or Microsoft for an extension or Settings Sync (just vscode.dev/redirect)
  • *.vscode-unpkg.net - Used when loading web extensions
  • default.exp-tas.com - Visual Studio Code Experiment Service, used to provide experimental user experiences

Proxy server support

VS Code has exactly the same proxy server support as Google Chromium. Here's a snippet from Chromium's documentation:

# Disable proxy --no-proxy-server # Manual proxy address --proxy-server=<scheme>=<uri>[:<port>][;...] | <uri>[:<port>] | "direct://" # Manual PAC address --proxy-pac-url=<pac-file-url> # Disable proxy per host --proxy-bypass-list=(<trailing_domain>|<ip-address>)[:<port>][;...]

To learn more about these command-line arguments, see Chromium Network Settings.

Authenticated proxies

Authenticated proxies should work seamlessly within VS Code with the addition of PR #22369.

The authentication methods supported are:

  • Basic
  • Digest
  • NTLM
  • Negotiate

When using VS Code behind an authenticated HTTP proxy, the following authentication popup should appear:

Note that SOCKS5 proxy authentication support isn't implemented yet; you can follow the issue in Chromium's issue tracker.

See Chromium HTTP authentication to read more about HTTP proxy authentication within VS Code.

SSL certificates

Often HTTPS proxies rewrite SSL certificates of the incoming requests. Chromium was designed to reject responses which are signed by certificates which it doesn't trust. If you hit any SSL trust issues, there are a few options available for you:

  • Since Chromium uses the OS's certificate trust infrastructure, the preferred option is to add your proxy's certificate to your OS's trust chain. See the Chromium Root Certificate Policy documentation to learn more.
  • If your proxy runs in localhost, you can always try the --allow-insecure-localhost command-line flag.
  • If all else fails, you can tell VS Code to ignore all certificate errors using the --ignore-certificate-errors command-line flag. Warning: This is dangerous and not recommended, since it opens the door to security issues.

Note for Linux users: To add your proxy's certificate on Linux, you need to add it to the system trust store and the NSS trust store. The exact steps vary by distribution:

  • For Ubuntu/Debian: Copy the certificate to /usr/local/share/ca-certificates/ and run sudo update-ca-certificates
  • For RHEL/CentOS/Fedora: Use sudo trust anchor --store <certificate-file> or place in /etc/pki/ca-trust/source/anchors/ and run sudo update-ca-trust
  • Additionally, use certutil -A -n "ProxyCA" -t "CT,," -i <certificate-file> -d sql:$HOME/.pki/nssdb to add it to the NSS trust store.

Legacy proxy server support

Extensions don't benefit yet from the same proxy support that VS Code supports. You can follow this issue's development in GitHub.

Similarly to extensions, a few other VS Code features don't yet fully support proxy networking, namely the CLI interface. The CLI interface is what you get when running code --install-extension vscodevim.vim from a command prompt or terminal. You can follow this issue's development in GitHub.

Due to both of these constraints, the http.proxy Open in VS Code Open in VS Code Insiders , http.proxyStrictSSL Open in VS Code Open in VS Code Insiders and http.proxyAuthorization Open in VS Code Open in VS Code Insiders variables are still part of VS Code's settings, yet they are only respected in these two scenarios.

Troubleshooting

Here are some helpful links that might help you troubleshoot networking issues in VS Code: