Best practices for .Net WCF NAT Traversal
Asked Answered
H

1

6

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 behind 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!

Hungary answered 19/3, 2011 at 20:25 Comment(2)
A external server for handling the NAT-T is doable to you ?Serial
Yep - both clients have to auth with a 3rd party server so that's fine. I'm looking into TCP/IP hole punching now via multiple sockets on one port. WCF supports this out of the box so it may be a perfect solution. brynosaurus.com/pub/net/p2pnat Section 4.2 and msdn.microsoft.com/en-us/library/ms734772.aspxHungary
M
0

XMPP supports chat with NAT traversal, and there are several open-source clients for .NET. Use any XMPP server, such as OpenFire.

Maffa answered 19/6, 2012 at 23:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.