In many enterprises when it comes to Internet access you will find yourself behind a proxy server. In such conditions many application do require a specific setup or they will not work at all. Recently I had to install a npm package from the official public npm repository and the “usual” command doesn’t work. Thus in case of npm client behind a proxy server, you need to pass the following argument --proxy
.
My command from:
npm install -g tfx-cli
became
npm --proxy http://my.proxy.com:8080 install -g tfx-cli
Also, as I am actively using Visual Studio Code, I had an unpleasant surprise. If you do tend to install a Visual Studio Code extension (plugin) and you are behind a proxy, at the moment you are doomed. There is no way, in the latest version at the time of writing, to install Visual Studio Code extension if behind a proxy.
When it comes to .NET software development, all of the commonly used classes as HttpClient do cope well with proxy, the only problems is that developers rarely think about it and do not implement adequate support. In this particular case specifying a proxy in HttpClientHandler is the solution, which then needs to be passed to the HttpClient constructor.
So fellow developers please have mercy for all of the people behind a proxy, it ain’t an easy life!
[…] common that all of the internet access is made via a proxy server. Recently I wrote a post about a Tough life behind a proxy, you may check that for some of my rants and tips. What if your servers do also require internet […]
[…] post is kind of a continuation of Tough life behind a proxy series. This time is the moment of Visual Studio Code. This application does require the web access […]