tags:

views:

124

answers:

1

I'm writing an application in C# that uses proxies. The proxies are sending the HTTP_X_FORWARDED_FOR during HTTP requests, and this is unwanted behavior.

I am extending the Interop.SHDocVw axWebBrowser (aka Internet Explorer) control right now, but can take another approach if needed for this problem.

Is there some way to suppress this header... can this be done in code, on the proxy server, or not at all?

+1  A: 

The proxy server, between your C# client and web site, is adding that HTTP_X_FORWARDED_FOR header.

So, You cannot suppress that on C# client.

But if you have control on proxy server, there should be a setting to turn it off.

For example in squid, following could work.

header_access X_Forwarded_For deny all

Or

You may try to find different proxy services, which does not send your ip address.

S.Mark