fix: tuic server's MaxIncomingStreams
This commit is contained in:
parent
421c91a58c
commit
37eca8af24
1 changed files with 4 additions and 2 deletions
|
@ -18,6 +18,8 @@ import (
|
|||
"github.com/Dreamacro/clash/transport/tuic"
|
||||
)
|
||||
|
||||
const ServerMaxIncomingStreams = (1 << 32) - 1
|
||||
|
||||
type Listener struct {
|
||||
closed bool
|
||||
config LC.TuicServer
|
||||
|
@ -47,8 +49,8 @@ func New(config LC.TuicServer, tcpIn chan<- C.ConnContext, udpIn chan<- C.Packet
|
|||
}
|
||||
quicConfig := &quic.Config{
|
||||
MaxIdleTimeout: time.Duration(config.MaxIdleTime) * time.Millisecond,
|
||||
MaxIncomingStreams: 1 >> 32,
|
||||
MaxIncomingUniStreams: 1 >> 32,
|
||||
MaxIncomingStreams: ServerMaxIncomingStreams,
|
||||
MaxIncomingUniStreams: ServerMaxIncomingStreams,
|
||||
EnableDatagrams: true,
|
||||
}
|
||||
quicConfig.InitialStreamReceiveWindow = tuic.DefaultStreamReceiveWindow / 10
|
||||
|
|
Loading…
Reference in a new issue