sleepm / shell-proxy-utils

快速的切换shell代理设置

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

usage

if your proxy is 127.0.0.1:1080 or change PROXY in this script

#bash / zsh user
curl https://raw.githubusercontent.com/sleepm/shell-proxy-utils/main/proxy.sh -o ~/proxy
source ~/proxy
source ~/proxy npm

#fish user
curl https://raw.githubusercontent.com/sleepm/shell-proxy-utils/main/proxy.fish -o ~/proxy
source ~/proxy
source ~/proxy npm

#powershell user
$Response = Invoke-WebRequest -Uri "https://raw.githubusercontent.com/sleepm/shell-proxy-utils/main/proxy.ps1"
$Stream = [System.IO.StreamWriter]::new('~\proxy.ps1', $false, $Response.Encoding)
try {
    $Stream.Write($Response.Content)
}
finally {
    $Stream.Dispose()
}
. ~\proxy.ps1
. ~\proxy.ps1 npm

About

快速的切换shell代理设置

License:GNU General Public License v2.0


Languages

Language:Shell 75.9%Language:PowerShell 24.1%