穿过代理服务器取远程用户真实IP地址

if(Request.ServerVariables["HTTP_VIA"]!=null){  
string user_IP=Request.ServerVariables["HTTP_X_FORWARDED_FOR"].ToString();  
}else{  
string user_IP=Request.ServerVariables["REMOTE_ADDR"].ToString();  
} 


原文地址:https://www.cnblogs.com/dyllove98/p/3132314.html