Skip to content

Commit

Permalink
Merge pull request #909 from daxgames/http_proxy
Browse files Browse the repository at this point in the history
Added proxy support
  • Loading branch information
Stanzilla committed Apr 5, 2016
2 parents 5a1f816 + 5068188 commit 528d0ce
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 528d0ce

Please sign in to comment.