diff --git a/README.md b/README.md index 0377835..4dd3262 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,114 @@ # UDPspeeder -Network Speed-Up Tool. Boost your Connection on a High Lantency High Packet-Loss Link by using Forward Error Correction +Network Speed-Up Tool. Boost your Connection on a High Lantency High Packet-Loss Link by using Forward Error Correction. -When used independently,UDPspeeder speeds-up only udp connection.Nevertheless,if you used UDPspeeder + any UDP based VPN together,you can speed-up any traffic(include tcp/udp/icmp)。 +When used alone,UDPspeeder speeds-up only udp connection.Nevertheless,if you used UDPspeeder + any UDP-based VPN together,you can speed-up any traffic(include tcp/udp/icmp)。 + +![](/images/en/udpspeeder.PNG) + +or + +![image_vpn](/images/en/udpspeeder+openvpn.PNG) [简体中文](/doc/README.md) -# Support Platforms +# Efficacy +tested on a link with 100ms latency and 10% packet loss at both direction + +### Ping Packet Loss +![](/images/en/ping_compare3.PNG) + +### SCP Copy Speed +![](/images/en/scp_compare2.PNG) + +# Supported Platforms Linux host (including desktop Linux,Android phone/tablet,OpenWRT router,or Raspberry PI). -Windows and Mac support will be added in furture,before its done,you can run UDPspeeder inside [this](https://github.com/wangyu-/udp2raw-tunnel/releases/download/20170918.0/lede-17.01.2-x86_virtual_machine_image_with_udp2raw_pre_installed.zip) 7.5mb virtual machine image. - -# Effect +For Windows and MacOS You can run UDPspeeder inside [this](https://github.com/wangyu-/udp2raw-tunnel/releases/download/20170918.0/lede-17.01.2-x86_virtual_machine_image_with_udp2raw_pre_installed.zip) 7.5mb virtual machine image. # How does it work -UDPspeeder use (FEC)Forward Error Correction to defend again packet loss.It improves your connection at the cost of addtional bandwidth.The algorithm for FEC is Reed-Solomon. +UDPspeeder uses FEC(Forward Error Correction) to improve your connection's quality,at the cost of addtional bandwidth.The algorithm for FEC is called Reed-Solomon. -# Quick Start +### Reed-Solomon -todo..... +` +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. +` + +![](/images/en/rs.png) + +Check wikipedia for more info, https://en.wikipedia.org/wiki/Reed–Solomon_error_correction + +# Getting Started + +### Installing +Download binary release from https://github.com/wangyu-/UDPspeeder/releases + +### Running (speed-up UDP only) +Assume your server ip is 44.55.66.77, you have a service listening on udp port 7777. + +```bash +# Run at server side: +./speederv2 -s -l0.0.0.0:4096 -r 127.0.0.1:7777 -f20:10 + +# Run at client side +./speederv2 -c -l0.0.0.0:3333 -r44.55.66.77:4096 -f20:10 +``` + +Now connecting to UDP port 3333 at the client side is equivalent to connecting to port 7777 at the server side,and the connection is boosted by UDPspeeder. + +##### Note + +`-f20:10` means sending 10 redundant packets for every 20 original packets. + +# Advanced Topic +### Full Options +``` +UDPspeeder V2 +git version:f479ca2779 build date:Oct 19 2017 01:37:08 +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 option,must be same on both sides: + -k,--key 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 how long could a packet be held in queue before doing fec,unit: ms + --mode fec-mode,available values: 0,1 ; 0 cost less bandwidth,1 cost less latency + --report turn on send/recv report,and set a period for reporting,unit:s +advanced options: + --mtu 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 + -j,--jitter simulated jitter.randomly delay first packet for 0~ ms,default value:0. + do not use if you dont know what it means. + -i,--interval scatter each fec group to a interval of ms,to protect burst packet loss. + default value:0.do not use if you dont know what it means. + --random-drop simulate packet loss ,unit:0.01%. default value: 0 + --disable-obscure disable obscure,to save a bit bandwidth and cpu +developer options: + -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 + -q,--queue-len max fec queue len,only for mode 0 + --decode-buf size of buffer of fec decoder,unit:packet,default:2000 + --fix-latency try to stabilize latency,only for mode 0 + --delay-capacity max number of delayed packets + --disable-fec completely disable fec,turn the program into a normal udp tunnel + --sock-buf buf size for socket,>=10 and <=10240,unit:kbyte,default:1024 +log and help options: + --log-level 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 +``` +### Speed-Up any traffic with OpenVPN+UDPspeeder + +Check [UDPspeeder + openvpn config guide](/doc/udpspeeder_openvpn.md). diff --git a/doc/udpspeeder_openvpn.md b/doc/udpspeeder_openvpn.md new file mode 100644 index 0000000..7d58ee6 --- /dev/null +++ b/doc/udpspeeder_openvpn.md @@ -0,0 +1,86 @@ + +# UDPspeeder + openvpn config guide +![image_vpn](/images/en/udpspeeder+openvpn.PNG) + +# UDPspeeder command +#### run at server side +``` +./speederv2 -s -l0.0.0.0:8855 -r 127.0.0.1:7777 -f20:10 +``` +#### run at client side +assume server ip is 45.66.77.88 +``` +./speederv2 -c -l0.0.0.0:3333 -r 45.66.77.88:8855 -f20:10 +``` + +# openvpn config + +#### client side config +``` +client +dev tun100 +proto udp + +remote 127.0.0.1 3333 +resolv-retry infinite +nobind +persist-key +persist-tun + +ca /root/add-on/openvpn/ca.crt +cert /root/add-on/openvpn/client.crt +key /root/add-on/openvpn/client.key + +keepalive 3 20 +verb 3 +mute 20 + +comp-lzo no + +fragment 1200 ##### very important you can turn it up a bit. but,the lower the safer +mssfix 1200 ##### very important + +sndbuf 2000000 ##### important +rcvbuf 2000000 ##### important +txqueuelen 4000 ##### suggested +``` + + +#### server side config +``` +local 0.0.0.0 +port 7777 +proto udp +dev tun + +ca /etc/openvpn/easy-rsa/2.0/keys/ca.crt +cert /etc/openvpn/easy-rsa/2.0/keys/server.crt +key /etc/openvpn/easy-rsa/2.0/keys/server.key +dh /etc/openvpn/easy-rsa/2.0/keys/dh1024.pem + +server 10.222.2.0 255.255.255.0 +ifconfig 10.222.2.1 10.222.2.6 + +client-to-client +duplicate-cn +keepalive 10 60 + +max-clients 50 + +persist-key +persist-tun + +status /etc/openvpn/openvpn-status.log + +verb 3 +mute 20 + +comp-lzo no + +fragment 1200 ##### very important you can turn it up a bit. but,the lower the safer +mssfix 1200 ##### very important + +sndbuf 2000000 ##### important +rcvbuf 2000000 ##### important +txqueuelen 4000 ##### suggested +``` diff --git a/images/en/11 b/images/en/11 new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/images/en/11 @@ -0,0 +1 @@ + diff --git a/images/en/ping_compare2.png b/images/en/ping_compare2.png new file mode 100644 index 0000000..23f3213 Binary files /dev/null and b/images/en/ping_compare2.png differ diff --git a/images/en/ping_compare3.PNG b/images/en/ping_compare3.PNG new file mode 100644 index 0000000..7934e04 Binary files /dev/null and b/images/en/ping_compare3.PNG differ diff --git a/images/en/rs.png b/images/en/rs.png new file mode 100644 index 0000000..d64f3be Binary files /dev/null and b/images/en/rs.png differ diff --git a/images/en/scp_compare.PNG b/images/en/scp_compare.PNG new file mode 100644 index 0000000..26fd135 Binary files /dev/null and b/images/en/scp_compare.PNG differ diff --git a/images/en/scp_compare2.PNG b/images/en/scp_compare2.PNG new file mode 100644 index 0000000..10aa7b1 Binary files /dev/null and b/images/en/scp_compare2.PNG differ diff --git a/images/en/udpspeeder+openvpn.PNG b/images/en/udpspeeder+openvpn.PNG new file mode 100644 index 0000000..cd6a6c1 Binary files /dev/null and b/images/en/udpspeeder+openvpn.PNG differ diff --git a/images/en/udpspeeder.PNG b/images/en/udpspeeder.PNG new file mode 100644 index 0000000..2f34e47 Binary files /dev/null and b/images/en/udpspeeder.PNG differ