mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-25 06:36:05 +03:00
XMUX: Change to non-infinity-reuse default values (#3919)
This commit is contained in:
parent
86257531ee
commit
897521defd
@ -243,7 +243,10 @@ type Xmux struct {
|
|||||||
|
|
||||||
func splithttpNewRandRangeConfig(input *Int32Range) *splithttp.RandRangeConfig {
|
func splithttpNewRandRangeConfig(input *Int32Range) *splithttp.RandRangeConfig {
|
||||||
if input == nil {
|
if input == nil {
|
||||||
return nil
|
return &splithttp.RandRangeConfig{
|
||||||
|
From: 0,
|
||||||
|
To: 0,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return &splithttp.RandRangeConfig{
|
return &splithttp.RandRangeConfig{
|
||||||
@ -275,6 +278,16 @@ func (c *SplitHTTPConfig) Build() (proto.Message, error) {
|
|||||||
CMaxLifetimeMs: splithttpNewRandRangeConfig(c.Xmux.CMaxLifetimeMs),
|
CMaxLifetimeMs: splithttpNewRandRangeConfig(c.Xmux.CMaxLifetimeMs),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if muxProtobuf.MaxConcurrency.To == 0 &&
|
||||||
|
muxProtobuf.MaxConnections.To == 0 &&
|
||||||
|
muxProtobuf.CMaxReuseTimes.To == 0 &&
|
||||||
|
muxProtobuf.CMaxLifetimeMs.To == 0 {
|
||||||
|
muxProtobuf.MaxConcurrency.From = 16
|
||||||
|
muxProtobuf.MaxConcurrency.To = 32
|
||||||
|
muxProtobuf.CMaxReuseTimes.From = 64
|
||||||
|
muxProtobuf.CMaxReuseTimes.To = 128
|
||||||
|
}
|
||||||
|
|
||||||
config := &splithttp.Config{
|
config := &splithttp.Config{
|
||||||
Path: c.Path,
|
Path: c.Path,
|
||||||
Host: c.Host,
|
Host: c.Host,
|
||||||
|
Loading…
Reference in New Issue
Block a user