Skip to main content

Architecture Overview

odirscan is currently a single-process application with a clear separation of concerns across packages. The architecture is designed for future evolution toward a distributed system.

Data Flow

Component Responsibilities

ComponentPackageRole
ScannerinternalCrawls directory listings and tags findings with HTTP metadata
Mullvadinternal/mullvadManages relay list, proxy selection, and VPN connectivity checks
ConfigconfigHolds all configuration structs with default constructors
MessagesmessagesDefines the request/response types exchanged between components
ModelmodelData types for scan findings and results
WebwebHTTP server with embedded SPA for browsing results

Design Decisions

  • colly for crawling -- Provides async collection, proxy switching, and request throttling out of the box.
  • Actor-like messages -- ScanRequestMessage, ScanResultMessage, and ScanFindingMessage decouple the caller from the scanner implementation, preparing for future RPC boundaries.
  • Embedded web UI -- The HTML dashboard is compiled into the binary via go:embed, eliminating runtime file dependencies.