xtaci / kcptun

A Quantum-Safe Secure Tunnel based on QPP, KCP, FEC, and N:M multiplexing.
MIT License
13.91k stars 2.54k forks source link

Feature Request: Dynamic RECV/SEND Window (Stop D.O.S,) #682

Open akumaburn opened 5 years ago

akumaburn commented 5 years ago

Currently KCPTUN uses a fixed recv/send window for UDP which is fine for ensuring maximum traffic but actually results in a Denial-Of-Service attack on the ISP side for UDP traffic if the discrepancy between the Server's and Client's connection is great, in this case server handles 500mbit/s + very easily but the client is barely capable of 49Mbit/s which means that the additional packets are basically just a UDP denial of service flood.

Statistics using nload:

Amplified

Instead of using a fixed size if KCPTun could start with a default size and then negotiate a larger or lower size (on an interval) as is needed based off of incoming traffic statistics, less packets would be wasted.

I'm thinking this is a priority because my VPS provider actually suspended my service due to this unintended effect of KCPTun.

Thanks for consideration.

xtaci commented 5 years ago

it's been discussed many times, dynamic window is susceptible to packet loss, planed packet drop on given connection will make this software useless.