# 一次性设置代理
$Env:http_proxy="http://127.0.0.1:7890";
$Env:https_proxy="http://127.0.0.1:7890";
# 永久性设置代理
# 1. 在PowerShell中输入以下命令
if (!(Test-Path -Path $PROFILE )) { New-Item -Type File -Path $PROFILE -Force }
notepad $PROFILE
# 2.使用记事本打开一个文件,并在文件中输入写入对应终端的代理命令
$Env:http_proxy="http://127.0.0.1:7890";
$Env:https_proxy="http://127.0.0.1:7890";
Posted in编程环境