mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 01:08:33 +00:00
SplitHTTP client: Add xmux (multiplex controller) for H3 & H2 (#3613)
https://github.com/XTLS/Xray-core/pull/3613#issuecomment-2351954957 Closes https://github.com/XTLS/Xray-core/issues/3560#issuecomment-2247495778 --------- Co-authored-by: mmmray <142015632+mmmray@users.noreply.github.com>
This commit is contained in:
parent
a931507dd6
commit
b1c6471eeb
9 changed files with 475 additions and 64 deletions
|
@ -105,6 +105,49 @@ func (c *Config) GetNormalizedXPaddingBytes() RandRangeConfig {
|
|||
return *c.XPaddingBytes
|
||||
}
|
||||
|
||||
func (m *Multiplexing) GetNormalizedCMaxReuseTimes() RandRangeConfig {
|
||||
if m.CMaxReuseTimes == nil {
|
||||
return RandRangeConfig{
|
||||
From: 0,
|
||||
To: 0,
|
||||
}
|
||||
}
|
||||
|
||||
return *m.CMaxReuseTimes
|
||||
}
|
||||
|
||||
func (m *Multiplexing) GetNormalizedCMaxLifetimeMs() RandRangeConfig {
|
||||
if m.CMaxLifetimeMs == nil || m.CMaxLifetimeMs.To == 0 {
|
||||
return RandRangeConfig{
|
||||
From: 0,
|
||||
To: 0,
|
||||
}
|
||||
}
|
||||
return *m.CMaxLifetimeMs
|
||||
}
|
||||
|
||||
func (m *Multiplexing) GetNormalizedMaxConnections() RandRangeConfig {
|
||||
if m.MaxConnections == nil {
|
||||
return RandRangeConfig{
|
||||
From: 0,
|
||||
To: 0,
|
||||
}
|
||||
}
|
||||
|
||||
return *m.MaxConnections
|
||||
}
|
||||
|
||||
func (m *Multiplexing) GetNormalizedMaxConcurrency() RandRangeConfig {
|
||||
if m.MaxConcurrency == nil {
|
||||
return RandRangeConfig{
|
||||
From: 0,
|
||||
To: 0,
|
||||
}
|
||||
}
|
||||
|
||||
return *m.MaxConcurrency
|
||||
}
|
||||
|
||||
func init() {
|
||||
common.Must(internet.RegisterProtocolConfigCreator(protocolName, func() interface{} {
|
||||
return new(Config)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue