Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm wondering how skype can send files directly to users that are usually behind a firewall? How does this work since I need to develop something similar where one local webserver (behind a firewall) needs to be able to send/stream files directly to another identical one?

I understand there needs to be some kind of publicly accessible central server through which both discover each other, and I plan to have that one, but how does the direct connection happen after that?


share|improve this question

closed as off topic by Nifle, Renan, Mokubai, Canadian Luke, Diogo Aug 2 '12 at 20:16

Questions on Super User are expected to relate to computer software or computer hardware within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

Thanks, that's great! Hopefully, i can find a Python library to simplify this. Cheers! – Rok Aug 2 '12 at 12:48
up vote 9 down vote accepted

Skype does not rely on a server to send files per se. Skype uses a technique called hole punching to allow communication behind two restrictive firewalls. In essence, it will open a communication channel, thus "punching a hole" through the local firewall, which the other Skype client can use to transfer data.

Skype's communication is almost entirely based on peer-to-peer, therefore no centralized server is needed for the actual data transfer. It however needs a supernode to make the initial communication.

A NAT router therefore keeps tables of which internal computer has communicated with which external computer and which ports the two have used. The trick used by VoIP software consists of persuading the firewall that a connection has been established, to which it should allocate subsequent incoming data packets.

So, basically, the communication looks like this:

share|improve this answer

Not the answer you're looking for? Browse other questions tagged .