[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [snowflake/master] Increase the KCP maximum window size



commit f908576c604e812c70e4b4ef8d12b5ebd55f3166
Author: Cecylia Bocovich <cohosh@xxxxxxxxxxxxxx>
Date:   Wed Dec 16 10:19:28 2020 -0500

    Increase the KCP maximum window size
---
 client/lib/snowflake.go | 3 +++
 server/server.go        | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/client/lib/snowflake.go b/client/lib/snowflake.go
index 10a2c0d..2ed51a1 100644
--- a/client/lib/snowflake.go
+++ b/client/lib/snowflake.go
@@ -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(
diff --git a/server/server.go b/server/server.go
index 1a53de7..3b263d0 100644
--- a/server/server.go
+++ b/server/server.go
@@ -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(

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits