curl -x http://proxy.example.com:3128 https://example.com

Category: Web Servers & Proxies

curl -x http://proxy.example.com:3128 https://example.com

Fetch a URL through an HTTP proxy

-x routes the request through the proxy at proxy.example.com:3128, which then fetches example.com on your behalf. Useful to verify a proxy works or to test how a site behaves from another network. The proxy must allow CONNECT for HTTPS targets.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.