If proxy is in use, use cached system credentials with it

TODO consider using proxy parameters defined in environment variables instead, if they are provided