Windows Subsystem for Linux (WSL) behind Proxy
Recently I came accross the issue of wanting to install apt packages in WSL behind a corporate proxy. Plus I wanted to update my yarn package by using
curl -o- -L https://yarnpkg.com/install.sh | bash which also needs to go through the proxy.
The solution is the same as if we want to set the proxy in a standard Ubuntu. So simply create a proxy.conf inside the apt config folder as follows.
Aditionally we need to set the proxy for curl. For that we create or modify an user specific
~/.curlrc file in our homefolder.
Thats it. You are now using apt and curl through your corporate proxy.