summaryrefslogtreecommitdiff
path: root/testrig/config.go
diff options
context:
space:
mode:
authorLibravatar kim <grufwub@gmail.com>2025-05-07 11:59:39 +0000
committerLibravatar kim <gruf@noreply.codeberg.org>2025-05-07 11:59:39 +0000
commit4c96e2571db177377e6346359ccec7cf1b8299cb (patch)
tree1f3a9259a4a9491b1efb392265c508295917e94a /testrig/config.go
parent[bugfix] Fix indentation on multi-line alt text in web view (#4149) (diff)
downloadgotosocial-4c96e2571db177377e6346359ccec7cf1b8299cb.tar.xz
[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>
Diffstat (limited to 'testrig/config.go')
-rw-r--r--testrig/config.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/testrig/config.go b/testrig/config.go
index eb85bd3bc..3e949ed89 100644
--- a/testrig/config.go
+++ b/testrig/config.go
@@ -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",