Added some logic to deal with http(s) proxies for work.