SplitHTTP server: add ok padding (#3614)

This commit is contained in:
mmmray 2024-08-02 03:16:19 +02:00 committed by GitHub
parent 4c82ef8a1b
commit 4b7947cca9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 80 additions and 43 deletions

View file

@ -69,6 +69,17 @@ func (c *Config) GetNormalizedScMinPostsIntervalMs() RandRangeConfig {
return *c.ScMinPostsIntervalMs
}
func (c *Config) GetNormalizedResponseOkPadding() RandRangeConfig {
if c.ResponseOkPadding == nil || c.ResponseOkPadding.To == 0 {
return RandRangeConfig{
From: 100,
To: 1000,
}
}
return *c.ResponseOkPadding
}
func init() {
common.Must(internet.RegisterProtocolConfigCreator(protocolName, func() interface{} {
return new(Config)