wget和curl设置代理服务器的命令

来源:互联网 发布:win10如何软件禁用网络 编辑:程序博客网 时间:2024/05/21 16:22

一、wget设置代理

 

eg:

wget -Y on -e "http_proxy=http://10.0.0.172:9201" "www.wo.com.cn"

此命令使用10.0.0.172:9201这个代理服务器IP和端口访问站点www.wo.com.cn

 

参数说明

-Y  是否使用代理

-e  执行命令

 

 

 

二、curl设置代理

 

eg:

curl -x 10.0.0.172:80 www.wo.com.cn

此命令使用10.0.0.172:80这个代理服务器IP和端口访问站点www.wo.com.cn

 

参数说明

-x  设置代理,格式为host[:port],port的缺省值为1080

原创粉丝点击