fix: reworked BBR to replace the broken old one

This commit is contained in:
Toby
2023-09-29 22:18:24 -07:00
parent 8faaf3b2e8
commit 844e94d6ca
16 changed files with 1737 additions and 948 deletions

View File

@@ -3,16 +3,13 @@ package congestion
import (
"github.com/apernet/hysteria/core/internal/congestion/bbr"
"github.com/apernet/hysteria/core/internal/congestion/brutal"
"github.com/apernet/hysteria/core/internal/congestion/common"
"github.com/apernet/quic-go"
)
func UseBBR(conn quic.Connection) {
conn.SetCongestionControl(bbr.NewBBRSender(
conn.SetCongestionControl(bbr.NewBbrSender(
bbr.DefaultClock{},
bbr.GetInitialPacketSize(conn.RemoteAddr()),
bbr.InitialCongestionWindow*common.InitMaxDatagramSize,
bbr.DefaultBBRMaxCongestionWindow*common.InitMaxDatagramSize,
))
}