mirror of
https://github.com/cedar2025/hysteria.git
synced 2025-09-21 15:36:04 +00:00
feat: ignoreClientBandwidth
This commit is contained in:
21
core/internal/congestion/utils.go
Normal file
21
core/internal/congestion/utils.go
Normal file
@@ -0,0 +1,21 @@
|
||||
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(
|
||||
bbr.DefaultClock{},
|
||||
bbr.GetInitialPacketSize(conn.RemoteAddr()),
|
||||
bbr.InitialCongestionWindow*common.InitMaxDatagramSize,
|
||||
bbr.DefaultBBRMaxCongestionWindow*common.InitMaxDatagramSize,
|
||||
))
|
||||
}
|
||||
|
||||
func UseBrutal(conn quic.Connection, tx uint64) {
|
||||
conn.SetCongestionControl(brutal.NewBrutalSender(tx))
|
||||
}
|
Reference in New Issue
Block a user