系统代理环境变量可以让Postman及终端中的其他工具共享代理配置,步骤如下:
~/.bashrc或~/.bash_profile):nano ~/.bashrc # 或 nano ~/.bash_profile
your_proxy_server替换为代理服务器地址,port替换为代理端口):export http_proxy=http://your_proxy_server:port
export https_proxy=http://your_proxy_server:port
Ctrl+O保存,Ctrl+X退出)。source ~/.bashrc # 或 source ~/.bash_profile
无论是否配置系统代理,都需在Postman中明确代理设置,步骤如下:
localhost或代理服务器IP)。5858或常用端口8080)。localhost)。localhost,127.0.0.1),用逗号分隔。~/.zshrc(如Zsh shell),请根据实际使用的shell调整配置文件路径。