mirror of
https://github.com/cmderdev/cmder.git
synced 2024-11-10 09:49:12 +08:00
Added proxy support
This commit is contained in:
parent
5a1f81655f
commit
5068188059
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user