Skip to main content

Proxy Rotation

odirscan distributes scan requests across multiple Mullvad SOCKS5 proxies using colly's round-robin proxy switcher.

How It Works

During scanner initialization:

  1. SelectProxies() returns a list of SOCKS5 proxy URLs (up to ProxyCount, default 50).
  2. These are passed to colly's proxy.RoundRobinProxySwitcher(), which creates a function that cycles through proxies on each request.
  3. The proxy function is set on the colly collector via SetProxyFunc().

Each HTTP request made by colly (both during Scan and Tag phases) uses the next proxy in the rotation.

Configuration

FieldDefaultEffect
ScannerConfig.ProxyCount50Maximum number of proxies in the rotation pool
ScannerConfig.MaxRelayWeight99Excludes relays with weight above this value
MullvadConfig.ProxyPort1080SOCKS5 port on each relay

Benefits

  • IP diversity -- Requests originate from many different exit IPs, reducing the chance of rate limiting.
  • Geographic distribution -- Relays span multiple countries and cities.
  • Automatic failover -- colly handles connection errors; the next request simply uses the next proxy in the rotation.

Concurrency

The scanner runs with colly.Async(true) and a configurable parallelism limit (default 32 concurrent requests). Combined with proxy rotation, this means up to 32 requests may be in flight simultaneously across different proxies.