I have this proxy address: 125.119.175.48:8909
How can I perform a HTTP request using cURL like curl http://www.example.com
, but specifying the proxy address of my network?
To use a proxy with Curl, you must pass the required proxy address using the -x (or --proxy) command-line option and proxy credentials using the -U (or --proxy-user) command-line switch. Proxy credentials may also be passed in the proxy string and will be URL decoded by Curl.
Many UNIX programs respect the http_proxy environment variable, curl included. The format curl accepts is [protocol://]<host>[:port] . For proxying HTTPS requests, set https_proxy as well.
From man curl
:
-x, --proxy <[protocol://][user:password@]proxyhost[:port]> Use the specified HTTP proxy. If the port number is not specified, it is assumed at port 1080.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With