Affiliate Program

10% commission



User & Pass Auth

IP Allowlist

< Back to Blog
cURL usage guide: How to combine curl with residential proxies
by lina

cURL is a powerful command line tool for transferring data, supporting various protocols, including HTTP, HTTPS, FTP, etc. Sometimes, we need to access the Internet through a proxy server, and cURL provides good support to achieve this. This guide will show you how to use a proxy server with cURL commands and discuss some common use cases and best practices.

What is curl

Curl is a file transfer tool that works from the command line using URL syntax, and is a cross-platform library for sending or receiving data over various protocols.

The Curl proxy parameter is -x (or --proxy). The basic format is: -x, --proxy [protocol://]host[:port]. Therefore, to use proxy access, you can use: curl -x httpbin/ip.

Next, we will introduce some examples of using curl.

1. Use HTTP proxy

To use an HTTP proxy with cURL, you can specify the address and port of the proxy server via the "--proxy" option. For example:

curl --proxy

This will use a proxy server named "" and port "8080" to access "".

2. Use SOCKS proxy

cURL also supports accessing resources through SOCKS proxies. You can specify the address and port of the SOCKS proxy server using the "--socks5" option. For example:

curl --socks5 socks5://

This will use a SOCKS5 proxy server named and port "1080" to access ``.

3. Authentication proxy

Sometimes, proxy servers require username and password for authentication. Here we take lunaproxy as an example. You can use the "-U" option to specify the user name and password. For example:

curl -x -U "user-username:password"

This will access through the proxy server `` using the provided username and password.

How to install curl

Under Windows systems, you can download the curl installation package for Windows from curl's official website. Choose the 32-bit or 64-bit version according to your computer system, and then follow the installation wizard's instructions to install.

During the installation process, you need to add the curl execution file path to the environment variable so that the curl command can be used anywhere.

In addition, you also need to create a new CURL_HOME environment variable and set its value to the path of the curl execution file. Finally, add the CURL_HOME variable information to the PATH variable to ensure that the curl command can be found by the system.

Under Linux systems, you can use the following command to install curl:

Open a terminal and use the following command to obtain the curl installation package:

sudo apt-get update

sudo apt-get install curl

Wait for the installation to complete.

Additionally, if you want to compile and install curl from source, you can follow these steps:

Get the curl source code package. Source code packages can be downloaded from curl's official website or other trusted sources. For example, use the wget command:

cssCopy code


Unzip the source code package:

tar -zxvf curl-7.17.1.tar.gz

Enter the unzipped directory:

cd curl-7.17.1

Configure installation options. Run the following command in the unzipped directory, specifying the installation directory and other options:

./configure --prefix=/usr/local/curl

Compile the source code:


Installation and compilation results:

make install

curl parameter command query

Open the command prompt and enter the command: curl -help

You will see a command list, as shown in the figure. Find the command corresponding to the proxy and choose to use it according to different needs.



Contact us with email

[email protected]

Customer Service
Hi there!
We're here to answer your questiona about LunaProxy.

How to use proxy?


Which countries have static proxies?


How to use proxies in third-party tools?


How long does it take to receive the proxy balance or get my new account activated after the payment?


Do you offer payment refunds?

Help Center

Please Contact Customer Service by Email

[email protected]

We will reply you via email within 24h