Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

what happens when the peer is behind NAT? you need to be able to use TCP Hole Punching


Even if the peer isn't behind a NAT (or on IPv6), you still need to pass the firewall, which won't let incoming packets through. This can be solved by simply connecting from both ends simultaneously, (first attempt fails but opens the fw, second attempt in the other direction succeeds)

You only need hole punching if both peers are behind a NAT (TCP hole punching is substantially more complex and fragile than UDP). You can reduce the need for hole punching if you complicate the signaling protocol (eg "please dial me at <addr>").

That said, bittorrent is quite resilient to NATs in practice, because since it's many-to-many, chances are even NATed clients will find many non-NATed clients.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: