| Crates.io | smirrors |
| lib.rs | smirrors |
| version | 0.1.0 |
| created_at | 2025-11-15 18:32:48.219239+00 |
| updated_at | 2025-11-15 18:32:48.219239+00 |
| description | Automatic mirror list updater for Linux distributions |
| homepage | |
| repository | https://github.com/Aryagorjipour/smirrors |
| max_upload_size | |
| id | 1934648 |
| size | 508,849 |
Automatic mirror list updater for Linux distributions - Keep your package manager mirrors fast and up-to-date with zero effort.
SMirrors intelligently selects the fastest mirrors for your Linux distribution based on real-time download speed and latency tests. Run it once, or set it up as a background service to keep your mirrors optimized 24/7.
# Download latest release
curl -L https://github.com/Aryagorjipour/smirrors/releases/latest/download/smirrors-x86_64-linux.tar.gz | tar xz
# Install
sudo mv smirrors /usr/local/bin/
sudo chmod +x /usr/local/bin/smirrors
# Clone repository
git clone https://github.com/Aryagorjipour/smirrors.git
cd smirrors
# Build and install
cargo build --release
sudo cp target/release/smirrors /usr/local/bin/
# Initialize configuration
smirrors init
# Enable systemd service (optional)
sudo smirrors enable
smirrors test
sudo smirrors update
smirrors tui
sudo smirrors enable
| Command | Description |
|---|---|
smirrors test |
Test mirrors and show results (no changes) |
smirrors update |
Update mirror list with fastest mirrors |
smirrors list |
Display current mirrors |
smirrors tui |
Launch interactive TUI |
smirrors status |
Show service status and last update |
smirrors history |
View update history |
smirrors rollback |
Restore previous mirror configuration |
# Add static mirror for Docker
smirrors add --repo docker https://download.docker.com/linux/ubuntu
# Remove a mirror
smirrors remove https://old-mirror.example.com
# List static mirrors
smirrors list --static
# Edit configuration
smirrors config
# Set update interval
smirrors config set interval 2h
# Enable/disable specific distro handlers
smirrors config set distro.apt.enabled true
# Enable automatic updates
sudo smirrors enable
# Disable automatic updates
sudo smirrors disable
# Check service status
smirrors status
# View logs
journalctl -u smirrors -f
Configuration file: /etc/smirrors/config.toml or ~/.config/smirrors/config.toml
[general]
update_interval = "1h" # Auto-update interval
auto_update = true # Enable automatic updates
concurrent_tests = 10 # Parallel mirror tests
timeout = 10 # Test timeout in seconds
[testing]
speed_weight = 0.7 # Weight for download speed (0-1)
latency_weight = 0.3 # Weight for latency (0-1)
test_file_size = "1MB" # Size of test download
max_mirrors = 5 # Number of mirrors to include
[distro.apt]
enabled = true
sources_file = "/etc/apt/sources.list"
backup_dir = "/var/backups/smirrors"
[static_mirrors]
# Pin Docker mirror
docker = "https://download.docker.com/linux/ubuntu"
[logging]
level = "info" # debug, info, warn, error
format = "human" # human, json
file = "/var/log/smirrors.log"
[notifications]
enabled = false
on_failure = true
on_success = false
The TUI provides an interactive interface for:
Keyboard Shortcuts:
q - Quitt - Run testu - Update mirrorsh - Show historyc - Open configurationr - RollbackTab - Switch viewsEnter - Select/ConfirmEsc - Cancel/Back| Distribution | Package Manager | Status | Config Path |
|---|---|---|---|
| Debian/Ubuntu | APT | ✅ Full Support | /etc/apt/sources.list |
| Fedora/RHEL | DNF | ✅ Full Support | /etc/yum.repos.d/ |
| Arch Linux | Pacman | ✅ Full Support | /etc/pacman.d/mirrorlist |
| openSUSE | Zypper | ✅ Full Support | /etc/zypp/repos.d/ |
| Linux Mint | APT | ✅ Full Support | /etc/apt/sources.list |
| Manjaro | Pacman | ✅ Full Support | /etc/pacman.d/mirrorlist |
sudo access for integration tests# Development build
cargo build
# Release build
cargo build --release
# Run tests
cargo test
# Run with logging
RUST_LOG=debug cargo run -- test
src/core/ - Core mirror testing and update logicsrc/distro/ - Distribution-specific handlerssrc/tui/ - Terminal UI implementationsrc/service/ - Background service/daemonsrc/cli/ - Command-line interfacetests/ - Integration and unit testsContributions are welcome! Please read CONTRIBUTING.md for guidelines.
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)sudo privilegesReport security vulnerabilities to arygorji.pour@gmail.com
This project is licensed under the MIT License - see LICENSE file for details.
reflector (Arch), apt-select (Debian), and dnf fastest-mirrortokio, clap, ratatui, reqwest, serdeMade with ❤️ for the Linux community