Last active
July 30, 2018 11:32
-
-
Save f-bader/b3cecc2fcda28be231450d440a576641 to your computer and use it in GitHub Desktop.
Proxy, proxy on the wall
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global http.proxy http://myproxy.local.bader.cloud:3128 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$proxyString = "http://myproxy.local.bader.cloud:3128" | |
$proxyUri = new-object System.Uri($proxyString) | |
[System.Net.WebRequest]::DefaultWebProxy = new-object System.Net.WebProxy ($proxyUri, $true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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