1

In my application, both the server and client are hosted by myself, each client has a configuration which can configure the server it should connect, the communication is based on HTTP. Now, I get a requirement that the connect server of client should be able changed dynamically, but to change the server url configuration will require restart client which will take several minutes. So I want to add a proxy server between the clients and servers which can forward request from different client to different server by some rules.

I can not add a reverse proxy server as I can not distinguish the request from different client, because my proxy server will have only one domain name and I can not add parameter to the request URL of client.

But I can change the client to force it use proxy.

So my plan is set proxy for the clients, for each client, specify a unreal server url, the proxy server get the server url in the request and then forward request to a real server by rules.

Is there any server can do such things? and of cause, it will be better if can change rules without restart proxy server

Xilang
  • 1,513
  • 3
  • 18
  • 36

2 Answers2

1

I take this links from this good anwser, just right here in SO

all the credits to qyb2zm302 for this list, and i recommend you squid or nginx

reverse proxy software for HTTP (server side)

Community
  • 1
  • 1
Castro Roy
  • 7,623
  • 13
  • 63
  • 97
0

I think the use of the HTTP header X-Forwarded-For may help.

Yohann
  • 6,047
  • 3
  • 26
  • 33
  • However I am not able to add header to HTTP request. I can only config the server url and proxy server – Xilang May 11 '12 at 03:13