mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-11-16 19:56:51 +08:00
fix: tuic server's MaxIncomingStreams
This commit is contained in:
parent
faf7a20295
commit
6776ec538f
|
@ -18,6 +18,8 @@ import (
|
||||||
"github.com/Dreamacro/clash/transport/tuic"
|
"github.com/Dreamacro/clash/transport/tuic"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const ServerMaxIncomingStreams = (1 << 32) - 1
|
||||||
|
|
||||||
type Listener struct {
|
type Listener struct {
|
||||||
closed bool
|
closed bool
|
||||||
config LC.TuicServer
|
config LC.TuicServer
|
||||||
|
@ -47,8 +49,8 @@ func New(config LC.TuicServer, tcpIn chan<- C.ConnContext, udpIn chan<- C.Packet
|
||||||
}
|
}
|
||||||
quicConfig := &quic.Config{
|
quicConfig := &quic.Config{
|
||||||
MaxIdleTimeout: time.Duration(config.MaxIdleTime) * time.Millisecond,
|
MaxIdleTimeout: time.Duration(config.MaxIdleTime) * time.Millisecond,
|
||||||
MaxIncomingStreams: 1 >> 32,
|
MaxIncomingStreams: ServerMaxIncomingStreams,
|
||||||
MaxIncomingUniStreams: 1 >> 32,
|
MaxIncomingUniStreams: ServerMaxIncomingStreams,
|
||||||
EnableDatagrams: true,
|
EnableDatagrams: true,
|
||||||
}
|
}
|
||||||
quicConfig.InitialStreamReceiveWindow = tuic.DefaultStreamReceiveWindow / 10
|
quicConfig.InitialStreamReceiveWindow = tuic.DefaultStreamReceiveWindow / 10
|
||||||
|
|
Loading…
Reference in New Issue
Block a user