Can I bridge a TCP Client connect and output thru a TCP Server connection to a remote host via TLS?

We have both Connect SP devices and TS devices – in either case – here is our desire. We have another Digi TS that, when connected to its port 2101 (for us) it outputs a stream of sensor information (and feeds another downstream server via IP) … we want to “mirror” that feed to another server via TLS (thru the Internet) … so in effect we’d like to have a new Digi and configure it to “TCP Connect” to the other Digi’s Port 2021 and then relay all data thru the new Digi and out to an etxternal IP/Port via TLS.

Option 2 would be to “bridge” the serial input on the existing Digi (input in Port 1) out through say Port 3 and hook that up to the new Digi … but if we could just tap one digi into the other and relay that would be very neat.

I guess option 3 – is – anyone have a Python script that would do this we could run on the new Digi? Seems it can run Python apps?

Thanks!