News for hackers. Stuff that matters.

Ask HN: How does FaceTime do NAT Traversal?

I've been researching on several NAT Traversal algorithms for project I'm working on. I tried FaceTime on several routers with different NAT configurations and it seemed to work great but couldn't figure out the algorithm. Any help will be much appreciated.
( 4 comments | 7 points | on HN )
Re:Ask HN: How does FaceTime do NAT Traversal? by mryan on Saturday March 26, 2011 @09:38AM (#2372033)
STUN and TURN are listed in the open source protocols used by FaceTime [1], so it is probably one or both of those. There are probably a few more methods too, and it will just keep trying until it finds one that works on the current network.

[1] http://blog.imtc.org/index.php/2010/06/09/the-technology-beh...

Re:Ask HN: How does FaceTime do NAT Traversal? by st3fan on Saturday March 26, 2011 @10:49AM (#2372186)
STUN and TURN were already mentioned.

There is also Apple's own NAT-PMP which is more like UPnP but simpler. It can directly ask your (Apple) router to open a port and redirect it incoming traffic to a specific IP address on your local network.

https://secure.wikimedia.org/wikipedia/en/wiki/NAT_Port_Mapp...

I bet Apple also supports UPnP these days.

Re:Ask HN: How does FaceTime do NAT Traversal? by DanWaterworth on Saturday March 26, 2011 @08:51AM (#2371957)
The usual technique is 'UDP hole punching'.
Re:Ask HN: How does FaceTime do NAT Traversal? by rycs on Saturday March 26, 2011 @10:28AM (#2372139)
yeah, same thing Skype does, I would not be surprised if FaceTime does exactly that.