Add UDP Like transport mode to snowflake

This commit is contained in:
Shelikhoo 2023-12-12 14:43:30 +00:00 committed by WofWca
parent fa122efb61
commit 457c4fbf15
8 changed files with 275 additions and 5 deletions

View file

@ -253,7 +253,7 @@ func (l *SnowflakeListener) acceptSessions(ln *kcp.Listener) error {
return err
}
// Permit coalescing the payloads of consecutive sends.
conn.SetStreamMode(true)
conn.SetStreamMode(false)
// 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(WindowSize, WindowSize)