目前,使用 VSCode 绕过需要公司 CA 证书的公司防火墙的唯一方法是在配置中设置“http.proxyStrictSSL = false”。这对我来说是不可行的。我知道 VSCode 使用 Chromium 网络堆栈,所以在构建 VSCode 时有一种方法可以修改证书存储区(例如: Getting Chrome to accept self-signed localhost certificate )?
最佳答案
根据 https://code.visualstudio.com/docs/setup/network ,解决办法是编辑系统证书库:
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.
这意味着您的答案取决于操作系统:
Import-Certificate
或等效的 GUI certutil
用于编辑它们。 关于visual-studio-code - 有没有办法修改VSCode证书库来添加证书?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53794200/