5-网络连接
VS Code是基于 Electron 开发的,所以所有的网络功能都来自于 Chromium ,这也意味着VS Code用户可以获得大部分 Google Chrome 的网络功能。
公共主机名
一些VS Code的功能要求网络连接,比如自动更新机制、搜索和安装扩展、遥测。只有正确配置好,才能在代理环境下使用这些功能。
如果你使用了防火墙,你需要将VS Code使用的域名添加到白名单中,下面是你需要添加的主机域名:
-
vscode-update.azurewebsites.net
-
vscode.blob.core.windows.net
-
marketplace.visualstudio.com
-
*.gallerycdn.vsassets.io
-
rink.hockeyapp.net
-
vscode.search.windows.net
-
raw.githubusercontent.com
-
vsmarketplacebadge.apphb.com
代理服务器支持
VS Code具有与 Google Chromium 完全相同的代理服务器支持,这里是 Chromium 文档 的一个片段:
"The Chromium network stack uses the system network settings so that users and administrators can control the network settings of all applications easily. The network settings include:
- proxy settings
- SSL/TLS settings
- certificate revocation check settings
- certificate and private key stores"
这意味着你的代理设置应该自动获取。
否则,你可以使用下面的命令行参数来控制你的的代理设置:
# Disable proxy
--no-proxy-server
# Manual proxy address
--proxy-server=<scheme>=<uri>[:<port>][;...] | <uri>[:<port>] | "direct://"