If the network already supports NAT64 I would use CLAT running on the system. That way you don't need LD_PRELOAD.
I started to look into CLAT and really didn't want to have to go through the hassle of a whole new virtual interface with routes etc, when one single app can't just pass a couple different args to connect().
I actually had thought about trying to write something exactly like this myself.
I'm glad to learn it already exists.