I'm looking for suggestions or a solution for peer-to-peer NAT traversal in .Net. Say I have a chat application and two clients need to connect but both are behin开发者_运维问答d NAT:
For home scenarios, uPNP is probably ok since only a cable modem or consumer router is involved. But what about corporate environments where uPNP isn't possible?
I'm familiar with UDP hole-punching which is OK for handshaking but I'd rather not rely on it for transmitting real application data.
I also looked into IPv6 and Teredo but I'm not confident that every client would have IPv6 availability, and it's a bit confusing as to all the Teredo requirements (servers, relays, etc.)
It's 2011 and IM/Chat clients have been around for a decade and then some - so I gotta believe this issue has been resolved many times over. Can anyone recommend best practices i this area? Thanks in advance!
XMPP supports chat with NAT traversal, and there are several open-source clients for .NET. Use any XMPP server, such as OpenFire.
精彩评论