Start at this post
https://www.ultrahal.com/community/index.php?topic=4101.msg22452#msg22452 and grab the attachment. I think it only works from the same machine.
Basically you'll need another program to write into and read from the text boxes on the Hal server side (using DDE and handles for the text boxes, maybe with something like AutoIt) and communicate (TCP) to your remote client.
The file I attached is what I was using a few years (many years) back. I'm sorry, but I can't find the source code. You might be able to make it work, or copy enough of it to do it in python. I ran this on a local network, not over the internet, but it should be a good start.