powershell走代理
加入到启动脚本中 notepad $PROFILE
开启代理
function on {
$env:HTTP_PROXY = "http://127.0.0.1:1087"
$env:HTTPS_PROXY = "http://127.0.0.1:1087"
$env:ALL_PROXY = "socks5://127.0.0.1:1086"
Write-Host "HTTP/HTTPS Proxy on" -ForegroundColor Green
}
关闭代理
function off {
Remove-Item Env:HTTP_PROXY
Remove-Item Env:HTTPS_PROXY
Remove-Item Env:ALL_PROXY
Write-Host "HTTP/HTTPS Proxy off" -ForegroundColor Green
}

浙公网安备 33010602011771号