Update quic-go

This commit is contained in:
世界
2023-09-19 18:29:16 +08:00
parent f05afcea39
commit 4068871d97
8 changed files with 28 additions and 277 deletions

View File

@@ -7,7 +7,6 @@ import (
"sync"
"github.com/sagernet/quic-go"
"github.com/sagernet/quic-go/congestion"
"github.com/sagernet/sing-box/adapter"
"github.com/sagernet/sing-box/common/tls"
C "github.com/sagernet/sing-box/constant"
@@ -15,6 +14,7 @@ import (
"github.com/sagernet/sing-box/option"
"github.com/sagernet/sing-box/transport/hysteria"
"github.com/sagernet/sing-quic"
hyCC "github.com/sagernet/sing-quic/hysteria2/congestion"
"github.com/sagernet/sing/common"
"github.com/sagernet/sing/common/auth"
E "github.com/sagernet/sing/common/exceptions"
@@ -221,7 +221,7 @@ func (h *Hysteria) accept(ctx context.Context, conn quic.Connection) error {
if err != nil {
return err
}
conn.SetCongestionControl(hysteria.NewBrutalSender(congestion.ByteCount(serverSendBPS)))
conn.SetCongestionControl(hyCC.NewBrutalSender(serverSendBPS))
go h.udpRecvLoop(conn)
for {
var stream quic.Stream