I am aware that nginx can be configured to act as a load balancer, but I'm wondering if it is possible to load balance between proxies? Let's say I have multiple proxies running on localhost, and I want to use nginx to provide a single point of connection so that I can rotate between the proxies. I am trying to achieve something similar to the post [here](http://blog.databigbang.com/running-your-own-anonymous-rotating-proxies/), which is using HAProxy instead of nginx. I have the following `nginx.conf`:

```
events {  }

http {
    upstream proxies {
        server localhost:9998;
        server localhost:9999;
        server localhost:10000;
    }
    server {
        listen 8080;

        location / {
            proxy_pass http://proxies;
        }
    }
}

```

However, when I send a curl request like this:

```
curl http://icanhazip.com -x localhost:8080

```

It ignores the url, and I get a response similar to what I would expect if I had directly sent a request to one of the proxy servers like so:

```
curl localhost:9999

```

Of course, I did not really expect it to work, since there must be some option to tell nginx to treat the upstream servers as proxies themselves. However, I was not able to find how to do this after searching online.