How does Skype work without port forwarding?

后端 未结 4 1715
孤独总比滥情好
孤独总比滥情好 2020-11-29 16:44

I am designing a p2p application which works on port 30000. My router is not UPnP so I required to forward a port to router. But Sk

相关标签:
4条回答
  • 2020-11-29 17:25

    You have to use an intermediary server, and initiate communication from the client side. As Yossarian mentioned, from that point one possibility is UDP hole punching. Depending on the type of application (and whether it's truly P2P or not) you might keep the go-between server in place the entire time.

    0 讨论(0)
  • 2020-11-29 17:29

    UDP hole punching is (one) of ways how to traverse through the NAT.

    0 讨论(0)
  • 2020-11-29 17:34

    Skype works in a very interesting way. From what I've read (and this is a while ago) it works as follows:

    • Skype server maintains a list of all users and IPs.
    • Skype user A wants to speak to user B
    • Skype user A sends a network packet to user B's IP address and waits for a response. (user B never gets this packet).
    • Skype user A notifies server of IP/port combination on which it is waiting for a response
    • Server notifies user B to send a response to user A on the specified port
    • A connection is made.

    This is probably over simplified but last I checked, this is how it works. (Someone correct me if I'm wrong).

    Edit: fixed bullet issue

    0 讨论(0)
  • 2020-11-29 17:48

    Skype uses another peers as intermediate point when direct connection is not possible.

    i.e. Peer A wants to connect to peer B, but peer B has all ports closed, then communication is initiated through peer C which has open ports.

    0 讨论(0)
提交回复
热议问题