Are there any open source cross platform NAT punch throughs?

主宰稳场 提交于 2019-12-03 09:53:29

问题


Are there any open source cross platform NAT punch throughs?


回答1:


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.




回答2:


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.




回答3:


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)


来源:https://stackoverflow.com/questions/595490/are-there-any-open-source-cross-platform-nat-punch-throughs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!