如何设置curl来永久使用代理?
我如何设置“curl”在terminal中永久使用代理服务器?
你可以在你的〜/ .bashrc文件中创build一个别名:
alias curl="curl -x <proxy_host>:<proxy_port>"  另一个解决scheme是使用(也许更好的解决scheme) ~/.curlrc文件(如果它不存在,创build它): 
 proxy = <proxy_host>:<proxy_port> 
 许多UNIX程序都遵守http_proxy环境variables,包括curl。  curl接受的格式是[protocol://]<host>[:port] 。 
在你的shellconfiguration中:
 export http_proxy http://proxy.server.com:3128 
 对于代理HTTP S请求, https_proxy设置https_proxy 。 
  Curl也允许你在你的.curlrc文件(Windows上的_curlrc )中设置它,你可能认为这是永久的: 
 http_proxy=http://proxy.server.com:3128 
一个通知。 在Windows上,将_curlrc放入'%APPDATA%'或'%USERPROFILE%\ Application Data'中。
Curl将在启动时在您的home文件夹中查找.curlrc文件。 您可以创build(或编辑)该文件并添加以下行:
 proxy = yourproxy.com:8080