TCP duplication, best solution?

Hi,
I have one device that talks with cloud, but I have opportunity to intercept traffic by assigning “cloud” target to HA in that device settings. As I don’t want to lose cloud functionality, I am thinking about proxying all stuff that comes from that device to “cloud”. Device itself can not handle two connections.
Can you suggest some integration that implements similar flow to look into?