Greetings,

On 09/07/2016 10:48 AM, Long Ma wrote:

HI haproxy:

         My haproxy version is 1.6.

         And I use haproxy before my game_server on tcp mode

         Client on A(172.16.77.32)

         HaProxy and game_server on B (172.16.77.37)

         Config file is:

When I use client connect to game_server through haproxy , everything is ok, but in my game_server I find the connection remote ip is 172.16.77.37 not 172.16.77.32

The question is how can I get original ip though haproxy on tcp mode


I see your using send-proxy there; does the software in question understand the PROXY protocol (http://www.haproxy.org/download/1.6/doc/proxy-protocol.txt)? If so, it should be able to use the client IP address it gets from that.

If you don't want to go that route, you could use full transparent proxying mode (see https://cbonte.github.io/haproxy-dconv/1.6/configuration.html#4.2-source); but for that to work properly you will need to ensure your network setup works with that.

- Chad

Best Regards

Long Ma

=====================================================

百纳(武汉)信息技术有限公司

游戏后台开发马龙

TEL:18616693720

QQ:363419410

ADD:武汉市光谷大道77号光谷金融港A2栋2楼


Reply via email to