Remote Networking for Online Games
After graduation, my classmates all went to different places to study and pursue their careers. They would occasionally play a game of Warcraft during holidays, but since they were in different provinces, it was a bit troublesome to connect to the LAN game.
During this period, I tried to use free networking tools, build my own transit server, and use Dandelion networking. Through comparison, I hope everyone can find a networking method that suits them.
EasyN2N Or N2N
Since I used EasyN2N at the beginning, the experience was pretty good, and I was able to learn some network knowledge from the relevant community.
However, since the transit server of EasyN2N is free, when everyone is using it, the transit server will be overloaded, resulting in high latency or even failure to connect. After graduating and returning to my hometown, the network there is poor, and I often get disconnected halfway through playing.
In addition, EasyN2N is often accidentally deleted by antivirus software, which may also cause disconnection in the middle of the game, so it is recommended to use it through the command line instead of using its own visualization tool.
For related usage, please refer to this article
Beirui Dandelion
Beirui Dandelion is a paid networking tool, free for up to 3 people. If you want to network with more than 3 people, you need to buy a package.
The free version of Beirui Dandelion cannot set the IP of the virtual LAN client. Some games, such as Warcraft, require packet capture and analysis. It can be found that client B cannot receive the UDP message broadcast by client A, so you have to use the network debugging assistant to assist in creating a room. The following are the specific steps:
Assume that there are two computers, A and B. The IP address of computer A is 172.16.3.130
, the IP address of computer B is 172.16.3.150
, and the
subnet mask is 255.255.252.0
.
- If computer B creates a room as the host, and computer A joins the room as the client
By capturing packets with Wireshark, it can be found that after computer B creates a room, it will continue to broadcast
f732100001000000010000000c000000
to udp port 6112. Due to limited time, the meaning of the message will not be analyzed.
When computer A scans the existing room, computer A will broadcast f72f1000505833571a00000000000000
to udp port 6112. Since A and B are not in the
same network segment, computer B cannot receive the broadcast of computer A, and A cannot know whether there is a room.
Next, we use the network debugging assistant to send a udp broadcast packet for scanning the room from computer A to computer B. Assume that the message msg (including the number of players, map information, etc.) is received.
Then, send the content of msg to computer A on computer B, and computer A can join the room.
Summary
If there are fewer clients to be networked, N2N and Beirui Dandelion are both low-cost networking methods.
If there are further needs, such as a large number of people in the room, or a more stable network is required, if the players are mainly concentrated in a few areas, you can consider building your own transit server. If the players are widely distributed, you can consider purchasing the Beirui Dandelion package.
Reference
2025-02-22 Update