HAProxy front/back end to handle both http/https and tcp traffic, how?

pfSense: 2.8.0
haproxy package: 0.63_10 (based on haproxy 2.9.14
Objective: to make custom/standalone derp server work on Unraid, as a container

I understand that the DERP server container requires both TCP passthrough and https traffic. So far I have defined a http/https frontend for all my applications running on my Unraid; and they are working fine, except DERP server on the same Unraid.

Has anyone successfully implemented DERP behind pfSense/HAProxy?

If no one has tried DERP server on such arrangement, could you shed some light how could I modify my haproxy setup to handle both https and TCP passthrough for my DERP server without affecting my other apps?

Thank you.
Note: I’ve tried DERP server on a cheap VPS without any reverse proxy in front of it, and it is working fine with my Headscale container on Unraid. So it is a matter of making haproxy setup right.