How do I use Curl with a proxy?

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. The proxy string can be prefixed with protocol: //, for example, http:// or socks5://. If no protocol is specified, Curl will default to http://. If no port number is specified in the proxy string, Curl will default to 1080.
Loading...