Added proxy support

I hope this does not break anything, I just added proxy support whenever the http_proxy env variable is set.