Files
Operation-Blue-Laminate-v2/BlueLaminate/BlueLaminate.Core/Options/SweepOptions.cs
bob dc7c3f99ae Add cs.money worker stack with per-worker IPRoyal residential proxy
Brings up the pull-model scraper: the .NET C2 hands skin+wear jobs to Python nodriver workers that scrape cs.money and post results back, plus the supporting Core/EFCore data model, migrations, and docker-compose orchestration.

IPRoyal proxying lets workers scale horizontally with a distinct residential exit IP each: every worker process mints its own sticky session at startup, and an in-process forwarding proxy injects the gateway auth so Chromium talks only to an auth-free localhost endpoint (zero CDP). On a Cloudflare challenge a worker rotates to a fresh session/IP and re-warms. Verified end-to-end against live IPRoyal: distinct US residential exits per worker and IP rotation on demand.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 15:03:53 -05:00

37 lines
1.4 KiB
C#

namespace BlueLaminate.Core.Options;
/// <summary>
/// Pacing configuration for the listing sweeps, bound from the <c>Sweep</c>
/// configuration section. Controls how the sweep throttles itself between API
/// pages so it stays under CSFloat's rate limit. Defaults preserve the original
/// hard-coded behaviour.
/// </summary>
public sealed class SweepOptions
{
public const string SectionName = "Sweep";
/// <summary>
/// Base courtesy delay between pages, applied even when the rate-limit bucket
/// looks healthy so we never hammer the API at a fixed cadence.
/// </summary>
public TimeSpan PageDelay { get; set; } = TimeSpan.FromSeconds(5);
/// <summary>
/// Upper bound on the random jitter added to <see cref="PageDelay"/>; the
/// spread keeps request timing from being perfectly regular.
/// </summary>
public TimeSpan MaxJitter { get; set; } = TimeSpan.FromSeconds(3);
/// <summary>
/// Pace before the rate-limit bucket is fully empty by this many requests, so
/// a slightly-stale counter can't tip us into a 429.
/// </summary>
public int RateLimitSafetyMargin { get; set; } = 2;
/// <summary>
/// Fallback wait when the bucket is exhausted but the API didn't report a usable
/// reset time. Guarantees we never fire a request at zero remaining.
/// </summary>
public TimeSpan RateLimitCooldown { get; set; } = TimeSpan.FromSeconds(60);
}