# mirrors **Repository Path**: mirrorshq/mirrors ## Basic Information - **Project Name**: mirrors - **Description**: A Linux daemon for serving massive amounts of mirror sites using plugin-based architecture. - **Primary Language**: Unknown - **License**: GPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2022-03-27 - **Last Updated**: 2026-03-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Mirrors A Linux daemon for serving massive amounts of mirror sites using plugin-based architecture. ## Features - **Plugin-based Architecture**: Each mirror site is managed through a plugin with initializer, updater, and maintainer executables - **Automated Scheduling**: Supports interval-based and cron-based update schedules with retry logic - **Web Management Interface**: Built with Vue.js/Vite, provides authentication and mirror site management - **HTTP API**: RESTful API for accessing mirror site information - **Storage Backends**: Supports PostgreSQL, Neo4j, and MongoDB for data storage - **Zero-conf Discovery**: Uses Avahi (mDNS) for service advertisement - **Progress Tracking**: Plugin processes communicate progress/status via Unix domain sockets - **Multi-user Support**: PAM-based authentication for the web interface ## Architecture ``` ┌─────────────────────────────────────────────┐ │ McDaemon │ │ │ │ ┌─────────────┐ ┌─────────────────────┐ │ │ │ Advertiser │ │ McUpdater │ │ │ │ (HTTP API) │ │ (Mirror Site Jobs) │ │ │ └─────────────┘ └─────────────────────┘ │ │ │ │ ┌─────────────────────┐ ┌─────────────┐ │ │ │ McMirrorSiteFactory│ │ Storage │ │ │ │ Runner │ │ (Multi) │ │ │ └─────────────────────┘ └─────────────┘ │ │ │ └─────────────────────────────────────────────┘ │ ▼ ┌─────────────────┐ ┌─────────────────┐ │ Plugin Process │ │ Plugin Process │ │ (Updater) │ │ (Factory) │ └─────────────────┘ └─────────────────┘ ``` ## Requirements - Python 3.6+ - Linux (POSIX) - GLib with asyncio support - PostgreSQL / Neo4j / MongoDB (optional, for storage) ## Installation ```bash python3 setup.py install ``` ## Configuration The daemon reads configuration from `/etc/mirrors/main.json`: ```json { "listenIp": "0.0.0.0", "mainPort": 8080, "logLevel": "INFO", "country": "CN", "location": "Beijing" } ``` ## Development ### Frontend (Web UI) ```bash cd web npm install npm run dev ``` ### Plugin Development Plugins communicate with the daemon via Unix domain sockets: - Updater socket: `/run/mirrors/updater.socket` - Factory socket: `/run/mirrors/factory.socket` Use the `mirrors.plugin` library for Python plugins: ```python from mirrors.plugin import ApiClient with ApiClient() as client: client.progress_changed(50) client.error_occured("error message") ``` ## License GPLv3 License ## Author Fpemud