Reputation: 201
I'm testing VSCode by first time and I configure my proxy in settings.json as recommended:
"http.proxy": "http://domain\user:pass@myproxy:port/"
But it doesn't work when I try to install new extensions I get a connected timeout error. I also try to configure the proxy as system environment variable with the same result. Could you help me? Is it a bug or I'm doing something wrong? Is there another way to download extensions?
Thank you very much!
Upvotes: 13
Views: 124398
Reputation: 1
Check system proxy settings,configure manual proxy and then set it to environment variables as well. Restart the system and VS code It should work
Upvotes: 0
Reputation: 11
None was working for me. For NTLM proxy, I've found this project https://github.com/genotrance/px.
python -m pip install px-proxy
px --username=DOMAIN\yourusername --password
px --proxy=proxy.int:8080 --listen=127.0.0.1 --port=3128 --username=DOMAIN\yourusername
Alternative
{
"http.proxy": "http://127.0.0.1:3128",
"http.proxyStrictSSL": false
}
Upvotes: 0
Reputation: 4408
Just by Googling I came across this psudie disclaimer about extensions not being able to benefit from proxy support in VSCode:
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, http.proxyStrictSSL and http.proxyAuthorization variables are still part of VS Code's settings, yet they are only respected in these two scenarios.
It seems to be easiest way with maximum result! Even cadmium works although there is a github issue : CLI proxy support #29910
Upvotes: 1
Reputation: 681
As @Yan QiDonge mentioned you can do that.
But if you want to have a more generic solution, this is what I did. What I did was, I went to Internet Options => Connections => LAN Settings, and then I checked the "Automatically detect setting" and un-checked all other boxes. and it worked like a charm!!!!!
Upvotes: 2
Reputation: 1000
If you are using yarn run this command it worked for me
"yarn config set strict-ssl false"
This worked for me
Upvotes: 0
Reputation: 188
Setting Up VS code behind proxy (Proxy script pac file) in Windows 10 to install extensions and updates
Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings
Upvotes: 10
Reputation: 4441
Here is a solution in Windows 7.
Change the system proxy to your proxy, like localhost:3128
, in Internet Options => Connections => LAN Settings.
After a version (1.35.0 maybe), the proxy settings in the Settings of vscode seems not working. My proxy is down as soon as I update. Finally, I fixed the problem by changing the system proxy.
An official reference: https://code.visualstudio.com/docs/setup/network
Upvotes: 2
Reputation: 177
code --proxy-server="xxx.xx.xx.xx:port"
add command in desktop for vscode
/usr/share/applications/code.desktop
Exec=/usr/share/code/code --proxy-server="xx.x.x.xx:xxx" --unity-launch %F
Upvotes: 14
Reputation: 323
In VS code: File -> Preferences ->Settings.
{
"http.proxyStrictSSL":false,
"http.proxy":"http://USERID:[email protected]:3128"
}
It works for me. And will work for you too. It appears that in http.proxy you have added "domain" after "http://" which is not required.
Upvotes: 5
Reputation: 525
I was having issues too. Try adding:
"http.proxyStrictSSL": false
to your settings.json file.
Upvotes: 3