in the network card a random search: asp.net client IP
Many pages can be searched, and the code provided is basically similar to the following:
Copy Code code as follows:
if (request.servervariables["Http_via"]!= null)
return request.servervariables["Http_x_forwarded_for"]. Split (new char[] {', '}) [0];
Else
return request.servervariables["REMOTE_ADDR"];
The Http_via and http_x_forwarded_for in the above code are obtained from the header submitted by the client, and in normal HTTP interactions, REMOTE_ADDR cannot be forged (note),
So if a Web site is through the above code to obtain IP, then we simply set up in the header Http_via and x_forwarded_for, you can achieve the purpose of fake IP, you can use Firefox plug-in "Modify Headers" to test, Use it to add headers
Note: In fact, REMOTE_ADDR can also be forged, but will cause the normal reception of data, such as writing a letter, the sender to write a false address, it is certainly impossible to receive the reply of the other person