编写可以监听http请求的桌面客户端
我想编写一个桌面客户端来监听某个端口上的http请求。 即使托管文件的用户位于防火墙后面,如何才能完成此操作?有没有一种方法可以在不涉及服务器端的情况下以某种方式将连接从一个客户端隧道连接到另一个客户端?或者也许只是涉及服务器端进行某种重定向? (没有代理可以完成吗?)
I would like to write a desktop client that listens to http requests on some port.
How can it be done even though the user that hosts the files is behind a firewall? Is there a way to somehow tunnel the connection from one client to another without involving the server side? Or maybe just involve the server side for some kind of redirect? (Can it be done without a proxy?)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
UDT 有一种防火墙友好的交会方法,可让您连接两台位于防火墙后面的主机。
然而,两端主机需要就时间和端口号达成一致,并且它们应该大约在同一时间发送连接启动数据包。
理论上,HTTP 可以在 UDT 之上实现(而不是 TCP)。
请参阅 UDT 的文档和论文(均可在其网站上找到)以获取更多信息。
UDT has a rendezvous method which is firewall friendly and lets you connect two hosts both of which are behind firewall.
However, the two end hosts need to agree on a time and port number and they should send connection initiation packets at about the same time.
In theory, HTTP can be implemented on top of UDT (instead of TCP).
Look at UDT's documentations and papers (all available on its website) for more info.