使用cURL执行HTTP请求(使用PROXY) [英] performing HTTP requests with cURL (using PROXY)

查看:382
本文介绍了使用cURL执行HTTP请求(使用PROXY)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个代理地址:125.119.175.48:8909

如何使用cURL(如curl http://www.example.com)执行HTTP请求,但指定网络的代理地址?

How can I perform a HTTP request using cURL like curl http://www.example.com, but specifying the proxy address of my network?

推荐答案

常规方法:

export http_proxy=http://your.proxy.server:port/

然后,您可以通过来自许多应用程序的代理进行连接.

Then you can connect through proxy from (many) application.

并且,按照下面的注释,对于https:

And, as per comment below, for https:

export https_proxy=https://your.proxy.server:port/

这篇关于使用cURL执行HTTP请求(使用PROXY)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆