From 5068188059e30142c8c6512e58756f8c13426eb0 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Tue, 5 Apr 2016 09:27:53 -0500 Subject: [PATCH] Added proxy support --- scripts/utils.ps1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/utils.ps1 b/scripts/utils.ps1 index 9c5679a..548eef2 100644 --- a/scripts/utils.ps1 +++ b/scripts/utils.ps1 @@ -99,6 +99,9 @@ function Download-File { $File = $File -Replace "/", "\" Write-Verbose "Downloading from $Url to $File" $wc = new-object System.Net.WebClient - $wc.Proxy.Credentials=[System.Net.CredentialCache]::DefaultNetworkCredentials; + if ($env:https_proxy) { + $wc.proxy = (new-object System.Net.WebProxy($env:https_proxy)) + } + $wc.Proxy.Credentials=[System.Net.CredentialCache]::DefaultNetworkCredentials; $wc.DownloadFile($Url, $File) }