Cheatsheet Pages / curl Cheatsheet

How to route curl through a proxy — HTTP and SOCKS5

Your traffic has to leave through a proxy — a company gateway, or a local SSH tunnel.

curl -x http://proxy.example.com:8080 https://example.com
# with auth: -x http://user:pass@proxy.example.com:8080
curl -x socks5://127.0.0.1:1080 https://example.com

Good to know

With auth the HTTP form is -x http://user:pass@proxy.example.com:8080; the SOCKS5 form is the classic companion to an ssh -D tunnel.

curl Cheatsheet one-page card — commands that actually work
The full one-page card — curl Cheatsheet. Get the complete cheatsheet on GitHub