mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 05:11:19 -04:00
add kcp setting adjustment SNOWFLAKE_TEST_KCP_FAST3MODE
This commit is contained in:
parent
93d303b47b
commit
ad5edd3f01
2 changed files with 18 additions and 0 deletions
|
@ -41,6 +41,7 @@ import (
|
|||
"log"
|
||||
"net"
|
||||
"net/http"
|
||||
"os"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
|
@ -265,6 +266,14 @@ func (l *SnowflakeListener) acceptSessions(ln *kcp.Listener) error {
|
|||
0, // default resend
|
||||
1, // nc=1 => congestion window off
|
||||
)
|
||||
if os.Getenv("SNOWFLAKE_TEST_KCP_FAST3MODE") == "1" {
|
||||
conn.SetNoDelay(
|
||||
1,
|
||||
10,
|
||||
2,
|
||||
1,
|
||||
)
|
||||
}
|
||||
go func() {
|
||||
defer conn.Close()
|
||||
err := l.acceptStreams(conn)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue