Hi, Baptiste! But i just test with this and found no use.
Regards Jinge On 2013-7-11, at 下午5:35, Baptiste <bed...@gmail.com> wrote: > Hi Jinge, > > Could you update your source statement to: > source 0.0.0.0 usesrc clientip > > And let us know if that fixed your issue. > > Baptiste > > > On Thu, Jul 11, 2013 at 11:25 AM, jinge <altman87...@gmail.com> wrote: >> Hi,all! >> >> We use HAproxy for our web system. And there is a statement if not HTTP will >> go backend Direct.Which is client-side transparent proxying. Here is the >> configure. But we found that the Direct backend not working. Is anyone can >> tell me. Are there any problem in my configure? Or should there any turning >> on my FreeBSD. >> >> global >> pidfile /var/run/haproxy.pid >> maxconn 200000 >> maxpipes 50000 >> daemon >> stats socket /tmp/haproxy.sock >> nbproc 4 >> spread-checks 5 >> tune.rcvbuf.client 16384 >> tune.rcvbuf.server 16384 >> tune.sndbuf.client 32768 >> tune.sndbuf.server 16384 >> >> defaults >> #TCP SECTION >> maxconn 200000 >> backlog 32768 >> timeout connect 5s >> timeout client 60s >> timeout server 60s >> timeout queue 60s >> timeout check 10s >> timeout http-request 15s >> timeout http-keep-alive 1s >> timeout tunnel 3600s >> option tcpka >> >> >> #HTTP SECTION >> hash-type consistent >> option accept-invalid-http-request >> option accept-invalid-http-response >> option redispatch >> option http-server-close >> option http-pretend-keepalive >> retries 2 >> option httplog >> no option checkcache >> >> #SYSTEM SECTION >> option dontlog-normal >> option dontlognull >> option log-separate-errors >> >> >> ######### frontend ############## >> frontend tcp-in >> bind :2222 >> mode tcp >> log global >> option tcplog >> >> tcp-request inspect-delay 30s >> tcp-request content accept if HTTP >> >> use_backend NginxCluster if HTTP >> default_backend Direct >> >> backend NginxCluster >> mode http >> option abortonclose >> balance uri whole >> log global >> source 0.0.0.0 >> server ngx1 192.168.10.1:80 weight 20 check inter 5s maxconn 10000 >> server ngx2 192.168.10.2:80 weight 20 check inter 5s maxconn 10000 >> server ngx3 192.168.10.3:80 weight 20 check inter 5s maxconn 10000 >> >> backend Direct >> mode tcp >> log global >> option tcplog >> no option httpclose >> no option http-server-close >> no option accept-invalid-http-response >> no option http-pretend-keepalive >> option transparent >> >> >> >> >> >> >> >> >> Regards >> Jinge >> >> >>