通过使用前向纠错来提高高延迟有损链路上的网络质量的隧道。
单独使用时,UDPspeeder 仅改进 UDP 连接。不过,如果您同时使用UDPspeeder +任何基于UDP的VPN,您可以改善任何流量(包括TCP/UDP/ICMP),目前已确认支持OpenVPN/L2TP/ShadowVPN。
或者
假设您的服务器的本地网络有损。只需使用 UDPspeeder + 任何基于 UDP 的 VPN 与您的服务器建立 VPN 连接,通过此 VPN 连接访问您的服务器,那么您的连接质量将得到显着提高。通过精心调整的参数,您可以轻松地将 IP 或 UDP/ICMP 丢包率降低到 0.01% 以下。除了降低丢包率之外,UDPspeeder 还可以显着提高 TCP 延迟和 TCP 单线程下载速度。
UDPspeeder 维基
简体中文
在具有 100 毫秒延迟和双向 10% 数据包丢失的链路上进行测试
Linux主机(包括桌面Linux、Android手机/平板电脑、OpenWRT路由器或Raspberry PI)。
对于 Windows 和 MacOS 您可以在这个 7.5mb 虚拟机映像中运行 UDPspeeder。
UDPspeeder 使用 FEC(前向纠错)来降低丢包率,但代价是额外的带宽。 FEC 的算法称为 Reed-Solomon。
In coding theory, the Reed–Solomon code belongs to the class of non-binary cyclic error-correcting codes. The Reed–Solomon code is based on univariate polynomials over finite fields.
It is able to detect and correct multiple symbol errors. By adding t check symbols to the data, a Reed–Solomon code can detect any combination of up to t erroneous symbols, or correct up to ⌊t/2⌋ symbols. As an erasure code, it can correct up to t known erasures, or it can detect and correct combinations of errors and erasures. Reed–Solomon codes are also suitable as multiple-burst bit-error correcting codes, since a sequence of b + 1 consecutive bit errors can affect at most two symbols of size b. The choice of t is up to the designer of the code, and may be selected within wide limits.
检查维基百科以获取更多信息,https://en.wikipedia.org/wiki/Reed–Solomon_error_ Correction
从 https://github.com/wangyu-/UDPspeeder/releases 下载二进制版本
假设你的服务器ip是44.55.66.77,你有一个服务监听udp端口7777。
# Run at server side:
./speederv2 -s -l0.0.0.0:4096 -r 127.0.0.1:7777 -f20:10 -k " passwd "
# Run at client side
./speederv2 -c -l0.0.0.0:3333 -r44.55.66.77:4096 -f20:10 -k " passwd "
现在客户端连接UDP端口3333相当于连接服务器端7777端口,并且连接已经通过UDPspeeder增强了。
-f20:10
表示每20个原始数据包发送10个冗余数据包。
-k
启用简单的 XOR 加密
请参阅 UDPspeeder + openvpn 配置指南。
UDPspeeder V2
git version: 3e248b414c build date: Aug 5 2018 21:59:52
repository: https://github.com/wangyu-/UDPspeeder
usage:
run as client: ./this_program -c -l local_listen_ip:local_port -r server_ip:server_port [options]
run as server: ./this_program -s -l server_listen_ip:server_port -r remote_ip:remote_port [options]
common options, must be same on both sides:
-k,--key <string> key for simple xor encryption. if not set, xor is disabled
main options:
-f,--fec x:y forward error correction, send y redundant packets for every x packets
--timeout <number> how long could a packet be held in queue before doing fec, unit: ms, default: 8ms
--report <number> turn on send/recv report, and set a period for reporting, unit: s
advanced options:
--mode <number> fec-mode,available values: 0,1; mode 0(default) costs less bandwidth,no mtu problem.
mode 1 usually introduces less latency, but you have to care about mtu.
--mtu <number> mtu. for mode 0, the program will split packet to segment smaller than mtu value.
for mode 1, no packet will be split, the program just check if the mtu is exceed.
default value: 1250. you typically shouldnt change this value.
-q,--queue-len <number> fec queue len, only for mode 0, fec will be performed immediately after queue is full.
default value: 200.
-j,--jitter <number> simulated jitter. randomly delay first packet for 0~<number> ms, default value: 0.
do not use if you dont know what it means.
-i,--interval <number> scatter each fec group to a interval of <number> ms, to protect burst packet loss.
default value: 0. do not use if you dont know what it means.
-f,--fec x1:y1,x2:y2,.. similiar to -f/--fec above,fine-grained fec parameters,may help save bandwidth.
example: "-f 1:3,2:4,10:6,20:10". check repo for details
--random-drop <number> simulate packet loss, unit: 0.01%. default value: 0.
--disable-obscure <number> disable obscure, to save a bit bandwidth and cpu.
developer options:
--fifo <string> use a fifo(named pipe) for sending commands to the running program, so that you
can change fec encode parameters dynamically, check readme.md in repository for
supported commands.
-j ,--jitter jmin:jmax similiar to -j above, but create jitter randomly between jmin and jmax
-i,--interval imin:imax similiar to -i above, but scatter randomly between imin and imax
--decode-buf <number> size of buffer of fec decoder,u nit: packet, default: 2000
--fix-latency <number> try to stabilize latency, only for mode 0
--delay-capacity <number> max number of delayed packets
--disable-fec <number> completely disable fec, turn the program into a normal udp tunnel
--sock-buf <number> buf size for socket, >=10 and <=10240, unit: kbyte, default: 1024
log and help options:
--log-level <number> 0: never 1: fatal 2: error 3: warn
4: info (default) 5: debug 6: trace
--log-position enable file name, function name, line number in log
--disable-color disable log color
-h,--help print this help message
--fifo
选项使用 fifo(命名管道)向正在运行的程序发送命令。例如--fifo fifo.file
,您可以使用以下命令动态更改参数:
echo fec 19:9 > fifo.file
echo mtu 1100 > fifo.file
echo timeout 5 > fifo.file
echo queue-len 100 > fifo.file
echo mode 0 > fifo.file
检查维基以获取更多信息:
https://github.com/wangyu-/UDPspeeder/wiki
您还可以尝试tinyfecVPN,一个内置UDPspeeder功能的轻量级高性能VPN,repo:
https://github.com/wangyu-/tinyfecVPN
您可以将 udp2raw 与 UDPspeeder 一起使用,以在某些具有 UDP QoS(UDP 节流)的 ISP 上获得更好的速度,repo:
https://github.com/wangyu-/udp2raw-tunnel