I've got multiple game servers TCP ports on my single host machine. The goal is to have users be able to connect to server1.domain.net and have their directed based on that subdomain. My first instinct wrote the following but then I realised that TCP traffic isn't going to have any header to read. Using HAProxy 1.5.8. I tried doing this same thing using multiple backends, use_backend and full ACL lines but got the same result (understandably).
listen game-listener
bind x.x.x.x:22222
mode tcp
use-server server1 if { hdr(host) -i server1.domain.net }
use-server server2 if { hdr(host) -i server2.domain.net }
server server1 localhost:22201 check
server server2 localhost:22202 check
Is there a check like hdr(host) that I can use for TCP connections? Or am I doing it right and the game just isn't playing nice?
Thanks!