Proxy layer 4 (tcp) - keycloak not responding

How to enable the proxy protocol on layer 4?
I have haproxy and on the same machine keycloak.
So in the keycloak logs I see 127.0.0.1 form the ha proxy.
When I enable send-proxy or send-proxy-v2 in ha proxy, keycloak does not accept any connection.
Is there some setting for the proxy protocol for layer 4?
Layer 7 (https) works, but not possible here.