mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-05-08 14:13:22 +00:00
https://github.com/XTLS/Xray-core/issues/3547#issuecomment-3549896520 https://github.com/XTLS/Xray-core/issues/2635#issuecomment-3570871754
19 lines
463 B
Go
19 lines
463 B
Go
package congestion
|
|
|
|
import (
|
|
"github.com/apernet/quic-go"
|
|
"github.com/xtls/xray-core/transport/internet/hysteria/congestion/bbr"
|
|
"github.com/xtls/xray-core/transport/internet/hysteria/congestion/brutal"
|
|
)
|
|
|
|
func UseBBR(conn *quic.Conn) {
|
|
conn.SetCongestionControl(bbr.NewBbrSender(
|
|
bbr.DefaultClock{},
|
|
bbr.GetInitialPacketSize(conn.RemoteAddr()),
|
|
))
|
|
}
|
|
|
|
func UseBrutal(conn *quic.Conn, tx uint64) {
|
|
conn.SetCongestionControl(brutal.NewBrutalSender(tx))
|
|
}
|