Add brutal debug option for Hysteria2

This commit is contained in:
世界
2023-10-08 12:45:15 +08:00
parent a6d815d3c5
commit 2a9e5c9634
9 changed files with 42 additions and 18 deletions

View File

@@ -221,7 +221,7 @@ func (h *Hysteria) accept(ctx context.Context, conn quic.Connection) error {
if err != nil {
return err
}
conn.SetCongestionControl(hyCC.NewBrutalSender(serverSendBPS))
conn.SetCongestionControl(hyCC.NewBrutalSender(serverSendBPS, false, nil))
go h.udpRecvLoop(conn)
for {
var stream quic.Stream

View File

@@ -89,6 +89,7 @@ func NewHysteria2(ctx context.Context, router adapter.Router, logger log.Context
service, err := hysteria2.NewService[int](hysteria2.ServiceOptions{
Context: ctx,
Logger: logger,
BrutalDebug: options.BrutalDebug,
SendBPS: uint64(options.UpMbps * hysteria.MbpsToBps),
ReceiveBPS: uint64(options.DownMbps * hysteria.MbpsToBps),
SalamanderPassword: salamanderPassword,