Skip to content

Instantly share code, notes, and snippets.

@zfb132
zfb132 / powershell_proxy.md
Last active August 13, 2025 08:12
Windows配置Powershell代理

方法一:
为 PowerShell 设置代理,命令如下:

$Env:http_proxy="http://127.0.0.1:7890";
$Env:https_proxy="http://127.0.0.1:7890";

这是临时命令,重新代理终端需要重新输入
如果想要永久设置代理,建议使用自定义配置,使每次代理 PowerShell 窗口时,运行如上命令:

在 PowerShell 窗口中运行如下指令: