One notice. On Windows, place your _curlrc in '%APPDATA%' or '%USERPROFILE%\Application Data'.
Many UNIX programs respect the http_proxy
environment variable, curl included. The format curl accepts is [protocol://]<host>[:port]
.
In your shell configuration:
export http_proxy http://proxy.server.com:3128
For proxying HTTPS requests, set https_proxy
as well.
Curl also allows you to set this in your .curlrc
file (_curlrc
on Windows), which you might consider more permanent:
http_proxy=http://proxy.server.com:3128
Curl will look for a .curlrc file in your home folder when it starts. You can create (or edit) this file and add this line:
proxy = yourproxy.com:8080
Source: Stackoverflow.com