Tuesday, May 14, 2013

Curl : Accessing a url through a proxy server from command line

To access a URL through a proxy server from the command line, curl comes handy


$ curl -x http://<myproxy.com>:<port_no>   http://google.co.in

Suppose if the proxy server is password protected, try the following

$ curl -U user:password -x http://<myproxy.com>:<port_no>   http://google.co.in