Last active
November 12, 2021 01:13
-
-
Save aclk/c12feff3e01f72bea59dd87e75b24fa1 to your computer and use it in GitHub Desktop.
Config proxy channel for IE and depandencies, work enjoy!
This file contains hidden or 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
| try { $null = gcm pshazz -ea stop; pshazz init 'default' } catch { } | |
| function set_proxy_variable { | |
| # replace your URI address | |
| $proxy = 'http://127.0.0.1:1080' | |
| # temporary | |
| $env:HTTP_PROXY = $proxy | |
| $env:HTTPS_PROXY = $proxy | |
| # forever | |
| # [System.Environment]::SetEnvironmentVariable("HTTP_PROXY", $proxy, "User") | |
| # [System.Environment]::SetEnvironmentVariable("HTTPS_PROXY", $proxy, "User") | |
| Write-Host "`n OPEN powershell proxy channel!`n" | |
| } | |
| function unset_proxy_variable { | |
| # temporary | |
| Remove-Item env:HTTP_PROXY | |
| Remove-Item env:HTTPS_PROXY | |
| # forever | |
| # [Environment]::SetEnvironmentVariable('http_proxy', $null, 'User') | |
| # [Environment]::SetEnvironmentVariable('https_proxy', $null, 'User') | |
| Write-Host "`n CLOSE powershell proxy channel!`n" | |
| } | |
| Set-Alias proxy set_proxy_variable | |
| Set-Alias unproxy unset_proxy_variable |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Plz follow as this setups
notepad $PROFILEand press enter keyproxyorunproxycan active proxy featureLike this:
