You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 6, 2024. It is now read-only.
That means each packet from the OS will be at most 1500. Combined with the fact that each read from the go-tun2socks stack only gets us one packet (eycorsican/go-tun2socks#149), that means we do very short writes to the network. This adds overhead to uploads, does more CPU iterations and wastes the larger 16KiB write buffers we allocate.
The MTU for the LWIP stack is currently set at 1500: https://github.com/eycorsican/go-tun2socks/blob/ca0c721c0d65844e43f8b0f090d72d5e9f313515/core/lwip.go#L169
That means each packet from the OS will be at most 1500. Combined with the fact that each read from the go-tun2socks stack only gets us one packet (eycorsican/go-tun2socks#149), that means we do very short writes to the network. This adds overhead to uploads, does more CPU iterations and wastes the larger 16KiB write buffers we allocate.
We should increase the LWIP MTU to 16KiB, since that's the maximum Shadowsocks payload size (https://shadowsocks.org/en/wiki/AEAD-Ciphers.html).
/cc @bemasc @alalamav
The text was updated successfully, but these errors were encountered: