MinGW installer not working with proxy

New MSYS2 finally has proxy capabilites

The new MSYS2 now uses pacman, the package manager from the arch linux project, to manage both msys and mingw packages. Pacman is capable of using authenticated http(s) proxies, see this article in the Arch Linux wiki for more information.
I added the following lines to \msys64\etc\profile:

# proxy settings
export HTTP_PROXY="username:[email protected]:port"
export HTTPS_PROXY=$HTTP_PROXY
export http_proxy=$HTTP_PROXY
export https_proxy=$HTTP_PROXY

and I can now finally install and update minGW and msys packages using pacman through the authenticated http(s) proxy here.