建立代理连接(客户端/服务器均位于 NAT 后面)
我想让代理服务器在 NAT 后面运行。 (好吧,我可以在路由器中配置端口转发,但我立即想要它!)。
假设 A 希望使用运行代理服务器的 B。 A/B 位于具有 NAT 的路由器后面。那么现在怎么办? A 调用服务器 S 让他知道他想要与 B 建立代理连接,而 B 已经告诉 S 他已准备好连接。 因此,S 以某种方式交换 IP/端口,以便 A/B 可以发送 UDP 包来获得连接(打洞)。
到现在为止我还对吗?
我读过 STUN (http://www.codeproject.com/KB/cs/STUN_client .aspx)但是后台给定的 IP / 端口到底对我有什么帮助!? A/B 是否需要准确地交换来自 STUN 服务器的数据并通过此端口打一个 UPD 洞?我不这么认为。
我真的非常感谢您对我的帮助!因为我的研究现在需要很长时间。我花了 30 多个小时来获取信息,但至少没有想出一个想法!
也确实需要其他/更好的解决方案:)请帮助我。 首选语言 C#。
I want to get a PROXY Server getting to run behind NAT. (Ok I can configure the Port forwarding in the router, but I want it instantly!).
So lets say A wants use Bs running proxy server. A / B are behind a router with NAT. So what now? A calls up the Server S to let him know that he wants a Proxy connection to B while B did already tell S that he is ready to connect.
So S exchages somehow the IPs / Ports so that A / B can send UDP Packages to get a connection (hole punshing).
Am I right till now?
Ive read abou STUN (http://www.codeproject.com/KB/cs/STUN_client.aspx) but how the hell does me the backgiven IP / Port help me!? Does A / B need to exchange exactly those from the STUN Server and make a UPD hole Punsh through this Port!? I dont think so.
I would really apricieate a lot for helping me! Because my research, for this takes now friking to long. Id spend more than 30h to get Information and didnt come up with at least a idea!
Also other / better solutions are truly wanted :) Please help me guys.
Prefered language C#.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在 Practical JXTA II 书中编写了有关 NAT 遍历的章节,该书可在 Scribd 上在线阅读。它描述了可用的不同技术。这可能是您项目的一个很好的起点。
I have written a chapter about NAT traversal in the Practical JXTA II book available online for reading at Scribd. It describes the different techniques available. It could be a good starting point for your project.