WebSocket PHP Cloudflare Issue

Hello,
I have a PHP socket server that manages a messaging system. The security of my site is handled by Cloudflare, and a tunnel has been created to connect the base server to the final site. However, I’m encountering an issue trying to pass my socket through this tunnel. I’m not sure if this is the correct approach, but I added a public hostname, allowing me to add a subdomain to my site to internally connect my socket to the right port via a client-usable URL.

When I connect with JavaScript, the connection is established, but my socket doesn’t echo anything, even though it should notify me when someone connects. When I stop the PHP program, the socket closes on the client side, indicating that the connection seems to be established nonetheless. I had tested my socket locally on a MAMP, and it worked perfectly.

This doesn’t seem very logical to me. Do you have a solution to my problem?
Thanks in advance.