aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMikhail Klimenko <m.klimenko@module.ru>2017-02-22 14:51:05 +0300
committerMikhail Klimenko <m.klimenko@module.ru>2017-02-22 14:51:05 +0300
commit42ac9bbe1e6440dd9e84b6fdd28a4f61792a73f3 (patch)
tree1fed55f4af9975f8d744b139296573818c05790e /scripts
parentfa3f9dd9628ebafd3ba65fb3abde6c1d6f0448fc (diff)
downloadvcpkg-42ac9bbe1e6440dd9e84b6fdd28a4f61792a73f3.tar.gz
vcpkg-42ac9bbe1e6440dd9e84b6fdd28a4f61792a73f3.zip
Add proxy credential support
Diffstat (limited to 'scripts')
-rw-r--r--scripts/fetchDependency.ps18
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1
index 6a40c9758..7c5c2a989 100644
--- a/scripts/fetchDependency.ps1
+++ b/scripts/fetchDependency.ps1
@@ -81,6 +81,14 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency)
if ($Dependency -ne "git") # git fails with BITS
{
try {
+ $WC = New-Object System.Net.WebClient
+ $ProxyAuth = !$WC.Proxy.IsBypassed($url)
+ If($ProxyAuth){
+ $ProxyCred = Get-Credential -Message "Enter credentials for Proxy Authentication"
+ $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyAuthentication","Basic")
+ $PSDefaultParameterValues.Add("Start-BitsTransfer:ProxyCredential",$ProxyCred)
+ }
+
Start-BitsTransfer -Source $url -Destination $downloadPath -ErrorAction Stop
}
catch [System.Exception] {