Implement v2 of Proxy protocol based on TCP

One of our service hosted in the on-prem datacenter and it requires to forward the client IP address to the backend pool servers. So I would like to implement the v2 of proxy protocol based on TCP Layer 4 header using iRules.

I went through this link but it has only v1 implementation: Proxy Protocol Initiator - Community CodeShare - DevCentral - An F5 Technical Community

Appreciate the help in advance.