Search code examples
phpcurlproxylibcurlcurl-multi

cURL using multiple proxies in a chain


Is it possible to chain multiple proxies in a single request using cURL?

For example: start cURL -> proxy1 -> proxy2 -> destination address

Can this be achieved using cURL?


Solution

  • A proxy is by definition a middle man. Software running and doing work between the client and the server. The client asks the proxy which then it turn asks the server.

    "Chained" proxies would then imply that a first proxy would ask a second proxy, but as the client asks the proxy to do its request it cannot be the job of the client to ask the second proxy, but it must be the first proxy's task.

    Alas: sure, if you have a proxy A that you setup to talk to another proxy B, and you tell curl to use proxy A then certainly the chained proxies will be used. I don't even see what curl could do to NOT work with it...