in a scenario like
A--->proxy --------proxy<---B
|
S
(S is the server) unless making the proxies aware about how your application manages TCP ports, both A & B can open a socket towards S, but A and S cannot open sockets to B (as B and S cannot open to A).
Who is outside a proxies doesn't have free reachability of what is inside.
That's what proxies are for.
You should take care of this fact, when designing this kind of apps.
Also, check that the port/address of the server isn't filtered by the proxies for some reasons.