TCP负载均衡如何获取客户端真实IP

用NGINX做的TCP负载均衡,无法获取到客户端真实IP,有朋友有什么好的解决方案吗?或者用其他什么负载均衡
软件能做到TCP负载均衡获取到客户端真实的IP?
是TCP协议的负载均衡,不是HTTP协议的负载均衡。

nginx是基于http转发的,可以配置在转发的http头里带上
https://www.baidu.com/s?wd=nginx%20client%20ip

或者用lvs,基于ip包转发的
https://www.baidu.com/s?wd=lvs%20client%20ip

http://blog.csdn.net/zhuwei_clark/article/details/52687870

location / {

   proxy_pass myproxy;

   proxy_set_header Host $host;

** proxy_set_header X-Real-IP $remote_addr;**

** proxy_set_header REMOTE-HOST $remote_addr;**

** proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;**
}

location / {
proxy_pass http://localhost:8000;

Forward the user's IP address to Rails

proxy_set_header X-Real-IP $remote_addr;

needed for HTTPS

proxy_set_header X_FORWARDED_PROTO https;

proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_redirect off;
}
用F5硬件也可以解决这个问题

yishang huida de ren ,dou shi xiazi ma ????tcptcptcp