Limiting multiple IP connections per SNI in HAProxy

Hi everyone,

I’m currently using HAProxy with wildcard SNI, and each user connects with their own unique SNI. I’m looking to implement a connection limit where:

Only one IP can be connected to the server per SNI at a time.
If a second IP tries to connect using the same SNI while the first IP is still connected, it should be denied.
After the current IP disconnects, no other IP should be able to connect with the same SNI for at least one minute (essentially creating a cooldown period before another IP can reuse the SNI).

Is this possible to achieve with HAProxy, and if so, what would be the best approach? I’d appreciate any guidance or example configurations.

Thank you!

not sure about HAProxy, maybe something like xdp-tools/xdp-sni at master · vincentmli/xdp-tools · GitHub could be modified to achieve that.