Skip to content

Commit

Permalink
Added proxy support
Browse files Browse the repository at this point in the history
  • Loading branch information
Dax T. Games committed Apr 5, 2016
1 parent 5a1f816 commit 5068188
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/utils.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

0 comments on commit 5068188

Please sign in to comment.