cURL for Proxies: A Practical Command-Line Guide

Michael Chen

Tool Guides

cURL is one of those tools that quietly runs the internet. It ships on virtually every Mac, Linux box, and modern Windows install, and it's the fastest way to send a request, inspect a response, or route traffic through a proxy without touching a browser. This guide skips the marketing-speak and gets straight to the flags you'll actually use, with working proxy examples you can paste into a terminal right now.

What cURL Actually Is

cURL (short for "Client URL") is a command-line utility for transferring data to and from servers. It was created in 1997 by Swedish developer Daniel Stenberg, originally to fetch currency exchange rates for IRC users, and it went through the names httpget and urlget before settling on cURL. Today it runs on billions of devices and is baked into everything from shell scripts to car infotainment systems.

Under the hood, cURL is powered by the libcurl library and speaks a long list of protocols: HTTP and HTTPS, of course, but also FTP, FTPS, SFTP, SCP, LDAP, SMTP, IMAP, POP3, and more. That breadth is why it's a permanent fixture in developer and sysadmin toolkits. If you're comparing it to other options, our roundup of data extraction tools for 2025 puts it in context alongside heavier scraping frameworks.

Check Whether cURL Is Installed

Before sending anything, confirm cURL is present and see which protocols and TLS features your build supports:

curl --version

You'll get the version number followed by a list of supported protocols and features (look for HTTPS, SSL, and often HTTP2). If you see "command not found," install it with your package manager — brew install curl on macOS, apt install curl on Debian/Ubuntu — or grab a build from the official curl.se site. Recent Windows 10/11 releases already bundle it in Command Prompt and PowerShell.

The Basic Command Structure

Every cURL command follows the same shape:

curl

If you omit the protocol, cURL assumes HTTP. A plain GET request to a public endpoint looks like this:

curl

Switch protocols simply by changing the URL scheme:

curl

The value comes from the options — flags starting with - or -- — that let you set the request method, attach data, send headers, manage cookies, follow redirects, and route traffic through a proxy. A few you'll reach for constantly:

  • -I — fetch only the response headers (great for quick checks).

  • -L — follow redirects automatically.

  • -v — verbose mode, showing the full request/response handshake including TLS.

  • -o filename — save the response body to a file.

  • -H "Header: value" — add a custom request header.

Routing cURL Through a Proxy

This is where cURL earns its place in a data-collection or QA workflow. When you're gathering public data at scale, testing how a site behaves from a different country, or verifying geo-targeted content, you route requests through a proxy so the request originates from a different IP. The core flag is -x (or --proxy):

curl -x

Most commercial proxies require credentials. Pass them with -U (or --proxy-user) as username:password. With an Evomi residential endpoint, a request looks like this:

curl -x http://rp.evomi.com:1000 -U "username:password"

Pointing the request at geo.evomi.com is a handy way to confirm which IP and location the target server actually sees — useful for validating that your proxy session is working before you script anything larger.

You can also embed the credentials directly in the proxy string, which is convenient inside scripts:

curl -x

For SOCKS5 proxies, swap the scheme so cURL uses the right protocol:

curl -x

The trailing h in socks5h tells cURL to resolve DNS through the proxy rather than locally — the right choice when you want the lookup to happen from the proxy's location. Evomi's residential, mobile, datacenter, and static ISP endpoints all work with these flags; you can spin up a free trial on the residential proxy plans and test the commands above against your own account. For a deeper walkthrough of the credentials side, see our guide to cURL basic auth with proxies.

Sending Data: Headers and POST Requests

Testing an API usually means more than a GET. To send a JSON payload, combine -X POST, a Content-Type header, and the -d flag for the body:

curl -x http://username:password@rp.evomi.com:1000 \
  -X POST https://api.example.net/v1/items \
  -H "Content-Type: application/json" \
  -d '{"name":"widget","qty":3}'

The same request can carry auth tokens, custom user-agent strings, or cookies via additional -H flags. If POST testing is your main use case, our dedicated post on cURL POST requests for proxy and API testing covers form data, multipart uploads, and response inspection in more depth.

Downloading Files Over a Proxy

cURL isn't just for API calls. Combine -O (save with the remote filename) or -o (choose your own name) with a proxy to pull down public assets:

curl -x http://username:password@rp.evomi.com:1000 \
  -O

Add -C - to resume an interrupted download and --limit-rate 2M to cap bandwidth. For a full breakdown, we walk through it step by step in our cURL file downloads guide.

Debugging With Verbose Mode

When a request doesn't behave, -v is your best friend. It prints the DNS resolution, the TLS handshake, the exact headers sent and received, and the proxy connection steps:

curl -v -x

Reading that output teaches you more about how HTTP and proxies work than most tutorials. It's also the fastest way to spot a wrong credential, an unexpected redirect, or a proxy that isn't reachable. cURL follows the HTTP/1.1 semantics defined in RFC 9110, so the request/response you see maps directly to the standard.

When to Reach for Something Heavier

cURL is perfect for single requests, scripts, API testing, and pulling public data that arrives as HTML or JSON. Where it starts to strain is with pages that render content in JavaScript — cURL fetches the raw HTML but won't execute scripts. At that point you either move to a headless browser stack or offload the heavy lifting to a managed service like the Evomi Scraping Browser, which handles rendering and proxy rotation in the cloud. For everything else, cURL remains the most direct, scriptable, and reliable way to move data across a network — and now you have the exact flags to do it through a proxy.

cURL is one of those tools that quietly runs the internet. It ships on virtually every Mac, Linux box, and modern Windows install, and it's the fastest way to send a request, inspect a response, or route traffic through a proxy without touching a browser. This guide skips the marketing-speak and gets straight to the flags you'll actually use, with working proxy examples you can paste into a terminal right now.

What cURL Actually Is

cURL (short for "Client URL") is a command-line utility for transferring data to and from servers. It was created in 1997 by Swedish developer Daniel Stenberg, originally to fetch currency exchange rates for IRC users, and it went through the names httpget and urlget before settling on cURL. Today it runs on billions of devices and is baked into everything from shell scripts to car infotainment systems.

Under the hood, cURL is powered by the libcurl library and speaks a long list of protocols: HTTP and HTTPS, of course, but also FTP, FTPS, SFTP, SCP, LDAP, SMTP, IMAP, POP3, and more. That breadth is why it's a permanent fixture in developer and sysadmin toolkits. If you're comparing it to other options, our roundup of data extraction tools for 2025 puts it in context alongside heavier scraping frameworks.

Check Whether cURL Is Installed

Before sending anything, confirm cURL is present and see which protocols and TLS features your build supports:

curl --version

You'll get the version number followed by a list of supported protocols and features (look for HTTPS, SSL, and often HTTP2). If you see "command not found," install it with your package manager — brew install curl on macOS, apt install curl on Debian/Ubuntu — or grab a build from the official curl.se site. Recent Windows 10/11 releases already bundle it in Command Prompt and PowerShell.

The Basic Command Structure

Every cURL command follows the same shape:

curl

If you omit the protocol, cURL assumes HTTP. A plain GET request to a public endpoint looks like this:

curl

Switch protocols simply by changing the URL scheme:

curl

The value comes from the options — flags starting with - or -- — that let you set the request method, attach data, send headers, manage cookies, follow redirects, and route traffic through a proxy. A few you'll reach for constantly:

  • -I — fetch only the response headers (great for quick checks).

  • -L — follow redirects automatically.

  • -v — verbose mode, showing the full request/response handshake including TLS.

  • -o filename — save the response body to a file.

  • -H "Header: value" — add a custom request header.

Routing cURL Through a Proxy

This is where cURL earns its place in a data-collection or QA workflow. When you're gathering public data at scale, testing how a site behaves from a different country, or verifying geo-targeted content, you route requests through a proxy so the request originates from a different IP. The core flag is -x (or --proxy):

curl -x

Most commercial proxies require credentials. Pass them with -U (or --proxy-user) as username:password. With an Evomi residential endpoint, a request looks like this:

curl -x http://rp.evomi.com:1000 -U "username:password"

Pointing the request at geo.evomi.com is a handy way to confirm which IP and location the target server actually sees — useful for validating that your proxy session is working before you script anything larger.

You can also embed the credentials directly in the proxy string, which is convenient inside scripts:

curl -x

For SOCKS5 proxies, swap the scheme so cURL uses the right protocol:

curl -x

The trailing h in socks5h tells cURL to resolve DNS through the proxy rather than locally — the right choice when you want the lookup to happen from the proxy's location. Evomi's residential, mobile, datacenter, and static ISP endpoints all work with these flags; you can spin up a free trial on the residential proxy plans and test the commands above against your own account. For a deeper walkthrough of the credentials side, see our guide to cURL basic auth with proxies.

Sending Data: Headers and POST Requests

Testing an API usually means more than a GET. To send a JSON payload, combine -X POST, a Content-Type header, and the -d flag for the body:

curl -x http://username:password@rp.evomi.com:1000 \
  -X POST https://api.example.net/v1/items \
  -H "Content-Type: application/json" \
  -d '{"name":"widget","qty":3}'

The same request can carry auth tokens, custom user-agent strings, or cookies via additional -H flags. If POST testing is your main use case, our dedicated post on cURL POST requests for proxy and API testing covers form data, multipart uploads, and response inspection in more depth.

Downloading Files Over a Proxy

cURL isn't just for API calls. Combine -O (save with the remote filename) or -o (choose your own name) with a proxy to pull down public assets:

curl -x http://username:password@rp.evomi.com:1000 \
  -O

Add -C - to resume an interrupted download and --limit-rate 2M to cap bandwidth. For a full breakdown, we walk through it step by step in our cURL file downloads guide.

Debugging With Verbose Mode

When a request doesn't behave, -v is your best friend. It prints the DNS resolution, the TLS handshake, the exact headers sent and received, and the proxy connection steps:

curl -v -x

Reading that output teaches you more about how HTTP and proxies work than most tutorials. It's also the fastest way to spot a wrong credential, an unexpected redirect, or a proxy that isn't reachable. cURL follows the HTTP/1.1 semantics defined in RFC 9110, so the request/response you see maps directly to the standard.

When to Reach for Something Heavier

cURL is perfect for single requests, scripts, API testing, and pulling public data that arrives as HTML or JSON. Where it starts to strain is with pages that render content in JavaScript — cURL fetches the raw HTML but won't execute scripts. At that point you either move to a headless browser stack or offload the heavy lifting to a managed service like the Evomi Scraping Browser, which handles rendering and proxy rotation in the cloud. For everything else, cURL remains the most direct, scriptable, and reliable way to move data across a network — and now you have the exact flags to do it through a proxy.

Author

Michael Chen

AI & Network Infrastructure Analyst

About Author

Michael bridges the gap between artificial intelligence and network security, analyzing how AI-driven technologies enhance proxy performance and security. His work focuses on AI-powered anti-detection techniques, predictive traffic routing, and how proxies integrate with machine learning applications for smarter data access.

Like this article? Share it.
You asked, we answer - Users questions:
What is the difference between the -x and -U flags in cURL?+
How can I check which IP a cURL proxy request is using?+
Can cURL scrape JavaScript-heavy websites?+
Is cURL free to use?+
How do I debug a failing cURL proxy request?+

In This Article