0
mirror of https://github.com/XTLS/Xray-core.git synced 2025-06-12 11:29:36 +03:00

SplitHTTP client: Add minUploadInterval (#3592)

This commit is contained in:
mmmray
2024-07-27 14:52:36 +02:00
committed by GitHub
parent 7cf5ee8afd
commit 8a4217fdf5
6 changed files with 188 additions and 25 deletions

View File

@ -231,6 +231,7 @@ type SplitHTTPConfig struct {
Headers map[string]string `json:"headers"`
MaxConcurrentUploads int32 `json:"maxConcurrentUploads"`
MaxUploadSize int32 `json:"maxUploadSize"`
MinUploadIntervalMs Int32Range `json:"minUploadIntervalMs"`
}
// Build implements Buildable.
@ -249,6 +250,10 @@ func (c *SplitHTTPConfig) Build() (proto.Message, error) {
Header: c.Headers,
MaxConcurrentUploads: c.MaxConcurrentUploads,
MaxUploadSize: c.MaxUploadSize,
MinUploadIntervalMs: &splithttp.RandRangeConfig{
From: c.MinUploadIntervalMs.From,
To: c.MinUploadIntervalMs.To,
},
}
return config, nil
}