mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 11:42:24 -05:00
[feature] make nollamas difficulty configurable (#4119)
Makes the NoLLaMas proof-of-work scraper deterrence difficulty configurable. Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4119 Co-authored-by: kim <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>
This commit is contained in:
parent
1f0c261fd2
commit
4c96e2571d
11 changed files with 161 additions and 75 deletions
|
|
@ -162,9 +162,8 @@ func testDefaults() config.Configuration {
|
|||
SyslogAddress: "localhost:514",
|
||||
|
||||
Advanced: config.AdvancedConfig{
|
||||
CookiesSamesite: "lax",
|
||||
SenderMultiplier: 0, // 1 sender only, regardless of CPU
|
||||
ScraperDeterrence: envBool("GTS_ADVANCED_SCRAPER_DETERRENCE", false),
|
||||
CookiesSamesite: "lax",
|
||||
SenderMultiplier: 0, // 1 sender only, regardless of CPU
|
||||
|
||||
RateLimit: config.RateLimitConfig{
|
||||
Requests: 0, // disabled
|
||||
|
|
@ -173,6 +172,11 @@ func testDefaults() config.Configuration {
|
|||
Throttling: config.ThrottlingConfig{
|
||||
Multiplier: 0, // disabled
|
||||
},
|
||||
|
||||
ScraperDeterrence: config.ScraperDeterrenceConfig{
|
||||
Enabled: envBool("GTS_ADVANCED_SCRAPER_DETERRENCE_ENABLED", false),
|
||||
Difficulty: uint8(envInt("GTS_ADVANCED_SCRAPER_DETERRENCE_DIFFICULTY", 4)), //nolint
|
||||
},
|
||||
},
|
||||
|
||||
SoftwareVersion: "0.0.0-testrig",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue