Are there any open source cross platform NAT punch throughs?

有没有开源的跨平台NAT穿透?


I haven't seen one, but you'll find more information than you require here:

http://www.enchantedage.com/node/8

It's not terribly hard to implement, just a bit of work.

There is code on the page that demonstrates this that builds on unix and windows, including both the server portion (the introducer) and the client portions. It doesn't list a license, but the author indicates in the readme that the technique is free, and re-implementing it from the information on the page and the source code example appears to be relatively easy.

The author appears to be the owner of the website enchantedage, so you can probably contact them directly for more information.


The best I've seen is UDT, which is a reliable UDP library that also includes a "rendezvous" connect mode that helps take care of the NAT punching. All you have to do is figure out the external IP address and port and somehow get it to the other client (and vice versa). Once you know that information, you both connect and bind at the same time (with rendezvous mode set) and it'll do its best to figure out the rest.


I haven't got an answer here I'm afraid, but I do know that a couple of years ago there was some research done in area that ended up spawning some IETF documents. The curious reader might already be familiar with these:

  • http://tools.ietf.org/html/draft-ietf-behave-rfc3489bis-18
  • http://tools.ietf.org/html/draft-ietf-behave-turn-13
  • possibly http://tools.ietf.org/html/draft-ietf-mmusic-ice-19
  • (...your-link-here: some research that I probably have missed)
  • 链接地址: http://www.djcxy.com/p/42386.html

    上一篇: ORM支持处理死锁

    下一篇: 有没有开源的跨平台NAT穿透?