在Linux中配置Postman代理可以通过两种方式进行:通过系统代理设置和使用Postman Desktop Agent。以下是详细的步骤:
设置系统代理环境变量:
~/.bashrc
或 ~/.bash_profile
文件(取决于你的系统配置),在文件末尾添加以下内容,将 your_proxy_server
和 port
替换为你的代理服务器的地址和端口:export http_proxy=http://your_proxy_server:port
export https_proxy=http://your_proxy_server:port
source ~/.bashrc
或source ~/.bash_profile
在Postman中配置代理:
安装Postman Desktop Agent(如果尚未安装):
启动Postman Desktop Agent:
在Postman应用内设置代理:
localhost
。5858
(或者根据Postman Desktop Agent显示的实际端口填写)。通过以上步骤,你就可以在Linux系统下的Postman中成功设置代理。如果需要取消代理设置,只需在Postman的设置页面将“HTTP Proxy”和“SSL Proxy”字段留空即可。