On 12/10/2011 04:29 PM, Baptiste wrote:
> Hi,
> 
> There is an ACL for that: req_proto_http (and an alias exists: HTTP)
> you can choose you backend based on it's return:
> 
> tcp-request content inspect-delay 1s
> use_backend bk_http if HTTP
> use_backend bk_xml if !HTTP
> 

I am not sure how this should be configured.

I added to my conf file:

tcp-request content accept if !HTTP
tcp-request inspect-delay 1s
use_backend nodejs_flashpolicy_http if !HTTP

backend nodejs_flashpolicy
  mode tcp
  server node1 localhost:10843 maxconn 2000 check

backend nodejs_flashpolicy_http
  mode http
  option httplog
  server node1 localhost:10843 maxconn 2000 check

haproxy does not let me use_backend nodejs_flashpolicy in my frontend:

[ALERT] 345/074250 (26349) : Unable to use proxy 'nodejs_flashpolicy'
with wrong mode, required: http, has: tcp.

But now I realized that the connection is dropped by stunnel and does
not even get to haproxy. It seems that the best way would be to inspect
the data on ports 80 and 443 and if I get xml string (which is always
the same) then connect to appropriate service, otherwise use
stunnel/haproxy.

The problem is that I cannot find any software for linux that is capable
of doing so.

If you know any please share.

Many thanks,
Łukasz

Reply via email to