mirror of
https://github.com/cmz0228/hysteria-dev.git
synced 2025-06-08 13:29:53 +00:00
19 lines
449 B
Go
19 lines
449 B
Go
package congestion
|
|
|
|
import (
|
|
"github.com/apernet/hysteria/core/internal/congestion/bbr"
|
|
"github.com/apernet/hysteria/core/internal/congestion/brutal"
|
|
"github.com/apernet/quic-go"
|
|
)
|
|
|
|
func UseBBR(conn quic.Connection) {
|
|
conn.SetCongestionControl(bbr.NewBbrSender(
|
|
bbr.DefaultClock{},
|
|
bbr.GetInitialPacketSize(conn.RemoteAddr()),
|
|
))
|
|
}
|
|
|
|
func UseBrutal(conn quic.Connection, tx uint64) {
|
|
conn.SetCongestionControl(brutal.NewBrutalSender(tx))
|
|
}
|