Increase the KCP maximum window size

This commit is contained in:
Cecylia Bocovich 2020-12-16 10:19:28 -05:00
parent 8ec8a7cb63
commit f908576c60
2 changed files with 6 additions and 0 deletions

View file

@ -69,6 +69,9 @@ func newSession(snowflakes SnowflakeCollector) (net.PacketConn, *smux.Session, e
}
// Permit coalescing the payloads of consecutive sends.
conn.SetStreamMode(true)
// Set the maximum send and receive window sizes to a high number
// Removes KCP bottlenecks: https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/issues/40026
conn.SetWindowSize(65535, 65535)
// Disable the dynamic congestion window (limit only by the
// maximum of local and remote static windows).
conn.SetNoDelay(

View file

@ -338,6 +338,9 @@ func acceptSessions(ln *kcp.Listener) error {
}
// Permit coalescing the payloads of consecutive sends.
conn.SetStreamMode(true)
// Set the maximum send and receive window sizes to a high number
// Removes KCP bottlenecks: https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/issues/40026
conn.SetWindowSize(65535, 65535)
// Disable the dynamic congestion window (limit only by the
// maximum of local and remote static windows).
conn.SetNoDelay(