Re: Remote Desktop - Logmein / Team Viewer
you need a broker service.
Fairly simple theory. mostly all modern firewalls are stateful.
So your client behind the firewall is keeping a connection alive lets assume on port 80. (because that's mostly allowed).
Your client keeps the connection open to the logmein server.
when you say you want to connect rather than just serving a service found and keep polling response the logmein server will respond with a ok serve content message, your host will then send screen refresh information. the servers response dictates mouse movements.
The computer that you use to control your remote host has the screen refresh information relayed from the logmein server, and relays your mouse/keyboard commands it receives to the remote host via the reply port that was negotiated when the remote host opened the original connection.
Of course this means that you need complete trust of the broker service, because you're implicitly sending all your keyboard strokes (passwords etc) to them, and your remote host is sending all screen refresh data through them also.
I would suggest that you start the investigation by creating a telnet server, or message server as a proof of concept so that you're sending very simple and very short messages. brokered by the third party server that you'd need to create.
I didn’t fight my way to the top of the food chain to be a vegetarian…
Im sick of people saying 'dont waste paper'. If trees wanted to live, they'd all carry guns.
"The inherent vice of capitalism is the unequal sharing of blessings; The inherent vice of socialism is the equal sharing of miseries."