Instantly share code, notes, and snippets.

Embed
What would you like to do?
Proxy, proxy on the wall
<configuration>
<system.net>
<defaultProxy>
<proxy usesystemdefault="false" autoDetect="false" proxyaddress="http://myproxy.local.bader.cloud:3128" bypassonlocal="true"/>
<bypasslist>
<add address="[a-z]+\.local\.bader\.cloud$" />
</bypasslist>
</defaultProxy>
</system.net>
</configuration>
git config --global http.proxy http://myproxy.local.bader.cloud:3128
# Install Chocolatey through a proxy
$env:chocolateyProxyLocation = "http://myproxy.local.bader.cloud:3128"
$proxy = new-object System.Net.WebProxy
$proxy.Address = $env:chocolateyProxyLocation
$wc = New-Object System.Net.WebClient
$wc.proxy = $proxy
iex ($wc.DownloadString('https://chocolatey.org/install.ps1'))
# Set Proxy for package download
choco config set proxy $env:chocolateyProxyLocation
$proxyString = "http://myproxy.local.bader.cloud:3128"
$proxyUri = new-object System.Uri($proxyString)
[System.Net.WebRequest]::DefaultWebProxy = new-object System.Net.WebProxy ($proxyUri, $true)
$proxy = "http://myproxy.local.bader.cloud:3128"
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force -Proxy $proxy
Register-PSRepository -Default -InstallationPolicy Trusted -Proxy $proxy
netsh winhttp set proxy "myproxy.local.bader.cloud:3128" bypass-list="*.local.bader.cloud;<local>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment