Configure TrueProxies with cURL
Basic Usage
Section titled “Basic Usage”curl -x http://YOUR_HOST:YOUR_HTTP_PORT \ -U "your_username:your_password" \ https://httpbin.org/ipcurl --socks5 YOUR_HOST:YOUR_SOCKS_PORT \ -U "your_username:your_password" \ https://httpbin.org/ipResidential IPv4 country targeting
Section titled “Residential IPv4 country targeting”Use the username parameter to target a specific country:
curl -x http://YOUR_HOST:YOUR_HTTP_PORT \ -U "your_username-country-us:your_password" \ https://httpbin.org/ipResidential IPv4 sticky sessions
Section titled “Residential IPv4 sticky sessions”Keep the same IP across multiple requests:
curl -x http://YOUR_HOST:YOUR_HTTP_PORT \ -U "your_username-session-abc123:your_password" \ https://httpbin.org/ipCommon Options
Section titled “Common Options”# Follow redirectscurl -L -x http://YOUR_HOST:YOUR_HTTP_PORT \ -U "your_username:your_password" \ https://example.com
# Set timeout (30 seconds)curl --max-time 30 -x http://YOUR_HOST:YOUR_HTTP_PORT \ -U "your_username:your_password" \ https://httpbin.org/ip
# Save response to filecurl -o response.json -x http://YOUR_HOST:YOUR_HTTP_PORT \ -U "your_username:your_password" \ https://httpbin.org/ip
# Verbose output for debuggingcurl -v -x http://YOUR_HOST:YOUR_HTTP_PORT \ -U "your_username:your_password" \ https://httpbin.org/ipEnvironment Variables
Section titled “Environment Variables”Set proxy globally for all cURL requests in your shell:
export http_proxy="http://your_username:your_password@YOUR_HOST:YOUR_HTTP_PORT"export https_proxy="http://your_username:your_password@YOUR_HOST:YOUR_HTTP_PORT"
# Now all cURL requests use the proxycurl https://httpbin.org/ip