How to use a proxy with cURL (command-line syntax & debugging)

Updated:

The curl command-line utility is the fastest way to verify proxy authentication, inspect HTTP response headers, and benchmark round-trip latency from Linux, macOS, or Windows terminals using your VinaProxy ip:port:user:pass credentials.

cURL · HTTP Proxy Format
curl -x http://user:pass@ip:port https://vinaproxy.com/api/my-ip
Private IPv4 (datacenter)
🇻🇳 Vietnam
Available
From
₫20,000 / IP / month
≈ $0.74 · billed in VND
Volume pricing
  • 1 IP₫40,000
  • 5+ IPs₫35,000
  • 10+ IPs₫25,000
  • 20+ IPs₫25,000
  • 50+ IPs₫25,000
  • 100+ IPs₫25,000
  • 200+ IPs₫25,000
  • 500+ IPs₫25,000
  • 1000+ IPs₫22,000
  • 2000+ IPs₫20,000
Buy Vietnam
Private IPv4 (datacenter)
🇺🇸 United States
Available
From
₫20,000 / IP / month
≈ $0.74 · billed in VND
Volume pricing
  • 1 IP₫40,000
  • 5+ IPs₫35,000
  • 10+ IPs₫25,000
  • 20+ IPs₫25,000
  • 50+ IPs₫25,000
  • 100+ IPs₫25,000
  • 200+ IPs₫25,000
  • 500+ IPs₫25,000
  • 1000+ IPs₫22,000
  • 2000+ IPs₫20,000
Buy United States
Proxies by platform:web-scrapingseo-rank-tracking

Essential cURL proxy flags & one-liners

Pass your proxy via -x (--proxy) and -U (--proxy-user), or combine them into a single http://user:pass@ip:port URL:

TaskcURL CommandWhat It Shows
Check exit IPcurl -x http://user:pass@ip:port https://vinaproxy.com/api/my-ipReturns JSON with the proxy's public IPv4
Separate credentialscurl -x http://ip:port -U "user:pass" https://vinaproxy.com/api/my-ipSafest when passwords contain special characters
Inspect headers onlycurl -I -x http://user:pass@ip:port https://example.comFetches HTTP status code and response headers
Measure TTFB latencycurl -s -o /dev/null -w "Connect:%{time_connect}s TTFB:%{time_starttransfer}s\n" -x http://user:pass@ip:port https://example.comMeasures TCP handshake and first-byte timing

Pro tips for Windows PowerShell & shell scripts

  • In Windows PowerShell, curl is aliased to Invoke-WebRequest by default—always invoke curl.exe -x ... to use the real cURL binary
  • Add -v (verbose) to inspect the CONNECT handshake and confirm HTTP/1.1 200 Connection established
  • Include --connect-timeout 5 --max-time 15 in cronjobs and shell scripts so slow targets never hang your pipeline
  • Store proxy = "http://user:pass@ip:port" in ~/.curlrc if you want a default proxy for all curl invocations

Step by step

  1. 1

    Open your terminal (or cmd / PowerShell on Windows)

    Remember to type curl.exe if you are inside Windows PowerShell.

  2. 2

    Run a test request through your proxy

    Execute curl.exe -x http://user:pass@ip:port https://vinaproxy.com/api/my-ip using your VinaProxy credentials.

  3. 3

    Debug handshake headers with -v if needed

    Append -v to inspect the Proxy-Authorization header and TLS handshake.

  4. 4

    Add timeout guards in production scripts

    Pass --connect-timeout 5 --max-time 15 in automated shell scripts.

Frequently asked questions

Why does `curl -x` fail with a parameter error in Windows PowerShell?

PowerShell aliases curl to Invoke-WebRequest. Run curl.exe -x http://user:pass@ip:port ... with the .exe extension to invoke native cURL.

What does `HTTP/1.1 407 Proxy Authentication Required` mean in `curl -v`?

It means cURL reached the proxy server IP and port, but the username or password passed to -x or -U was incorrect.

Can I test multiple proxies without running cURL in a loop?

Yes—paste up to 100 proxies into our web-based Proxy Checker or Proxy Speed Test.

Get low-latency HTTP(S) proxies for cURL & CLI tools

Instant Dedicated IPv4 and Static ISP credentials across 7 countries.

Buy cURL Proxies

Related articles

Proxies by platform
Proxies for SEO & SERP Tracking: accurate keyword rankings across 7 countries
Track localized keyword rankings, audit geo-redirects, and run Screaming Frog crawls with unmetered dedicated IPv4 and Static ISP proxies.
Proxies by platform
Proxies for Web Scraping: unmetered dedicated IPv4 & ISP pools for 24/7 crawlers
High-speed HTTP(S) dedicated IPv4 and Static ISP proxies for Python, Playwright, Selenium, and Scrapy with unlimited monthly bandwidth.
Proxy setup
How to Configure Proxy on Ubuntu & Debian Linux
Configure VinaProxy HTTP(S) proxies on Ubuntu Server and Desktop across /etc/environment, APT package manager, systemd daemons, and GNOME Network settings.
Free tools
Proxy Checker: Check Your Proxies Online
Free proxy checker: paste up to 100 proxies as ip:port:user:pass and check proxy online for status, exit IP and latency. Learn what each error means.
IPV4 · vietnam
Vietnam Private IPv4 Proxies: Low-Cost Dedicated IPs for Volume Work
Vietnam private IPv4 proxies at a low cost per IP for Facebook seeding, secondary Shopee shops, automation tools and google.com.vn tracking. Unlimited data.
IPV4 · united states
US Private IPv4 Proxies: Fast, Dedicated American Datacenter IPs
Dedicated US private IPv4 proxies for scraping, rank tracking, ad checks and Amazon research. Static IP, one user per IP, unlimited bandwidth, fast activation.
Knowledge base
How to Check a Proxy Before You Use It
How to check a proxy step by step: confirm it connects, verify the IP and country, test speed with curl or an online checker, and fix 407 and timeout errors.
Use cases
Proxies for Web Scraping and Data Collection
Choose proxies for web scraping: fast private IPv4 for most sites, static ISP for stricter ones, unlimited bandwidth, and how to scrape responsibly.