网络流量操纵(虚拟 LAN)

发布于 2024-07-26 02:10:32 字数 387 浏览 5 评论 0原文

我有兴趣了解更多有关操纵网络流量以通过互联网利用仅限 LAN 的程序(在本例中为游戏)的信息。

已经存在多个程序可以执行此操作(HamachiGArena),但我有兴趣了解他们如何处理这个问题以及如何从一开始就构建它。

显然你需要捕获流量 - 对于 Windows,我听说过 WinPCap 似乎能够满足我的需要,尽管我需要进一步研究它。

我正在寻找的是文章、常识,甚至是可以告诉我从哪里开始、做什么等的书籍。谢谢。

I am interested in learning more about manipulating network traffic to utilize LAN only programs (games in this case) over the internet.

There already exists several programs that does this (Hamachi, GArena), but I am interested in learning how they approach this and how to build this from the start up.

Obviously you need to capture the traffic - for Windows, I've heard mention of WinPCap which seems to be able to do what I need, though I need to study it further.

What I'm looking for are articles, general knowledge and even books that can show me where to start, what to do, etc. Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

风流物 2024-08-02 02:10:32

听起来您想通过广域网隧道传输现有的局域网协议。 这是虚拟专用网络的另一种说法。 我会尝试设置一个现有的,使用支持此类功能的路由器,或者将其设置在例如Linux机器上。

您只需找到一些有关 VPN/IP 隧道的材料即可。
它们的工作原理通常非常简单(但当您包含身份验证和加密时,会变得更加复杂。
基本原理很简单:

  • 创建一个服务器和一个客户端,它们可以通过 Internet 进行通信,同时可以访问两端的 LAN。
  • 捕获 LAN 上的流量,将所述数据包放入例如 UDP 数据包中,然后通过互联网将其发送到另一端。
  • 收到数据包时,获取UDP数据包的数据,即对方的IP数据包,在本地局域网上发送出去。
  • 处理上述数据包中的 IP 地址以适合本地 LAN。

更长的故事有点长,您的软件必须充当透明路由器,和/或 LAN PC 必须配置特定的 IP 路由才能到达另一端。

您还可以使用许多其他技巧。 例如,编写一个设备驱动程序,伪装成网卡来完成上述几点,引诱它在本地 LAN 上发送的操作系统,但实际上设备驱动程序会封装数据包并将其发送到另一个 LAN 上的可到达的盒子。

It sounds like you'd want to tunnel an existing lan protocol over a wan. Which is another way of saying Virtual Private Network. I'd try to set up an existing one, using a router supporting such a feature, or setting it up on e.g. a linux box.

Simply you need to find some materials on VPNs/IP tunneling.
How they work is usually very simple(but more complex when you include authentication and encryption.
The basics are pretty much:

  • Create a server and a client that can talk together over the Internet while having access to the LAN on both ends.
  • Capture the traffic on the LAN, Place said packet inside e.g. an UDP packet and send it over the Internet to the other side.
  • WHen receiving a packet, Get the data of the UDP packet, which is the IP packet from the other end, send it out on the local LAN.
  • Manipulate the IP addresses in the above packet to fit the local LAN.

The longer story is a bit longer, your software would have to act as a transparent router, and/or the LAN PCs would have to be configured with a specific IP route to reach the other end.

And there's many other tricks you could do. E.g. write a device driver that poses as network card that does the above points, luring the OS that it's sending out on the local LAN, but in reality the device driver encapsulates the packets and sends it to a reachable box on another LAN.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文