Add support for proxy

This PR add support for proxy.
It obtains the proxy url from resistory for Windows, and environment variables for another OS.