Open frodoe7 opened 4 years ago
Also , check this question on SOF : https://stackoverflow.com/questions/60791255/direct-communication-from-a-remote-server-to-application-in-my-device
This isn't really a question about this library; it's about connectivity. The library doesn't do anything different depending on where it's run. I've been running it for years both locally and on VPSes.
I also added my DigitalOcean server public ip to my TWS trusted IPs
If TWS runs on the DO server, you need to add your client's public IP to the TWS trusted IPs list, not your DO server's IP.
Anyway, that's an insecure setup. I wouldn't trust TWS's SSL. They make it optional to begin with, which is patently stupid.
A secure setup is to only allow TWS to accept connections from localhost, then setup port forwarding on your PC using ssh -nNT -L 7497:localhost:7497 <yourServerIp>
. That way you don't need to open port 7497 on the server; only the SSH port (which you should change to a random number above 1024 for additional security).
Also, you probably want to run Gateway v972 (not later because IB fucked it up and it disconnects every day) on the server, and use IBC Alpha to keep it running indefinitely.
here's my codes
in localhost and it works well
here , it's hosted in DigitalOcean server
it does not work in this case , my TWS are configured to receive from external IPs, not only the localhost (I also added my DigitalOcean server public ip to my TWS trusted IPs)
DigitalOcean blocks all the ports by default (except 80) , I also opened 7497 but still the same issue