CMD 临时环境变量
set http_proxy=http://127.0.0.1:7890
set https_proxy=http://127.0.0.1:7890输入协议、IP 和端口,自动生成 CMD、PowerShell、Git Bash、Linux Bash 的代理环境变量和持久化指令。
如果 Clash 不在本机运行,可以把 IP 改成局域网内运行代理的机器地址,例如
192.168.31.233。
当前代理地址:http://127.0.0.1:7890
set http_proxy=http://127.0.0.1:7890
set https_proxy=http://127.0.0.1:7890set http_proxy=
set https_proxy=$Env:HTTP_PROXY = "http://127.0.0.1:7890"
$Env:HTTPS_PROXY = "http://127.0.0.1:7890"'$Env:HTTP_PROXY = "http://127.0.0.1:7890"' >> $PROFILE
'$Env:HTTPS_PROXY = "http://127.0.0.1:7890"' >> $PROFILE$Env:HTTP_PROXY = $null
$Env:HTTPS_PROXY = $nullexport HTTP_PROXY="http://127.0.0.1:7890"
export HTTPS_PROXY="http://127.0.0.1:7890"echo 'export HTTP_PROXY="http://127.0.0.1:7890"' >> ~/.bashrc
echo 'export HTTPS_PROXY="http://127.0.0.1:7890"' >> ~/.bashrc
source ~/.bashrcgit config --global http.proxy http://127.0.0.1:7890
git config --global https.proxy http://127.0.0.1:7890git config --global http.proxy socks5://127.0.0.1:7891
git config --global https.proxy socks5://127.0.0.1:7891export HTTP_PROXY="http://127.0.0.1:7890"
export HTTPS_PROXY="http://127.0.0.1:7890"
export ALL_PROXY="socks5://127.0.0.1:7891"echo 'export HTTP_PROXY="http://127.0.0.1:7890"' >> ~/.bashrc
echo 'export HTTPS_PROXY="http://127.0.0.1:7890"' >> ~/.bashrc
echo 'export ALL_PROXY="socks5://127.0.0.1:7891"' >> ~/.bashrc
source ~/.bashrcunset HTTP_PROXY
unset HTTPS_PROXY
unset ALL_PROXYcurl -I https://www.google.com