Introduction to the open source UDP acceleration tool UDPspeeder

I found three good tools on github today. This article first introduces UDP acceleration tools.

This tool has a Client->Server structure. The data packets processed by this tool can effectively reduce the UDP packet loss rate. The principle is to use the FEC algorithm. The disadvantage is that the traffic has increased. With 1.5 times the traffic, the 10% packet loss rate can be reduced to less than one ten thousandth. This algorithm is very good for playing DOTA and Warcraft in the battle platform.

FEC: It is a forward error correction technology. The sender sends the data to be sent together with a certain redundant error correction code, and the receiver performs error detection on the received data according to the error correction code. If an error is found, The receiver performs error correction. FEC algorithm is widely used in video transmission.

The principle of the official document has been very clear, please refer to the following documents:

https://github.com/wangyu-/UDPspeeder/blob/branch_libev/doc/README.zh-cn.md

 

 

An error will be reported when compiling:

g++   -o speederv2          -I. main.cpp log.cpp common.cpp lib/fec.cpp lib/rs.cpp packet.cpp delay_manager.cpp fd_manager.cpp connection.cpp fec_manager.cpp misc.cpp tunnel_client.cpp tunnel_server.cpp my_ev.cpp -isystem libev  -std=c++11   -Wall -Wextra -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers  -lrt -ggdb -static -O2
/usr/bin/ld: cannot find -lrt
/usr/bin/ld: cannot find -lstdc++
/usr/bin/ld: cannot find -lm
/usr/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status
make: *** [makefile:29: all] Error 1

The reason is that there is a -static parameter. Modify the makefile and remove the -static parameter to compile successfully.

test:

./speederv2 -s -l 0.0.0.0:4096 -r 127.0.0.1:7777             -f 20:10  -k "123456"

./speederv2 -c -l 0.0.0.0:3333 -r 172.19.112.178:4096   -f 20:10  -k "123456"

The next step is to simulate sending a UDP packet to port 3333 of the Client. The Client will transfer the UDP packet to port 4096 of the server, and the server will send it to port 7777 after processing.

You can execute echo "hello"> /dev/udp/127.0.0.1/3333 on this machine to simulate the sending of UDP packets. If it is not this machine, you need to use socat for port forwarding. This tool supports tcp/udp data forwarding.

 

socat project

socat project address: http://www.dest-unreach.org/socat/

Source code download: http://www.dest-unreach.org/socat/download/

 

Guess you like

Origin blog.csdn.net/langeldep/article/details/113613382