Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cgzones/apt-cacher-rs
proxy cache for Debian package mirrors
https://github.com/cgzones/apt-cacher-rs
apt cache debian packages proxy rust
Last synced: 6 days ago
JSON representation
proxy cache for Debian package mirrors
- Host: GitHub
- URL: https://github.com/cgzones/apt-cacher-rs
- Owner: cgzones
- License: mit
- Created: 2025-01-19T14:49:06.000Z (7 days ago)
- Default Branch: main
- Last Pushed: 2025-01-19T15:19:15.000Z (7 days ago)
- Last Synced: 2025-01-19T15:39:22.682Z (7 days ago)
- Topics: apt, cache, debian, packages, proxy, rust
- Language: Rust
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# apt-cacher-rs
[![Version info](https://img.shields.io/crates/v/apt-cacher-rs.svg)](https://crates.io/crates/apt-cacher-rs)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE?raw=true)`apt-cacher-rs` is a simple caching proxy daemon for Debian style repositories.
It is inspired by and an alternative to [`apt-cacher`](https://salsa.debian.org/LeePen/apt-cacher) and [`apt-cacher-ng`](https://www.unix-ag.uni-kl.de/~bloch/acng/).## How to use
First install `apt-cacher-rs` on a network local system.
To automatically manage the daemon via systemd an example [service file](apt-cacher-rs.service) is included.
Then add the following configuration file on every client system that should utilize the proxy:*/etc/apt/apt.conf.d/30proxy*
```
Acquire::http::Proxy "http://:3142/";
```If your sources contain HTTPS repositories you like to cache as well, change their URL schema to *http://* to cache their packages.
Note that connections from the client to the proxy are unencrypted (but all packages are by default verified by `apt(8)` after download to have a valid GPG signature).## Web interface
`apt-cacher-rs` contains a minimal web interface for some statistics at *`http://:3142/`*, and important logs can be viewed at *`http://:3142/logs`*.
## Cleanup
Packages in the cache that are no longer referenced by any known upstream repository are pruned every 24h, unless they have been downloaded less than 3 days ago.
The list of known upstream repositories is gathered by inspecting proxied package list requests (i.e. by *apt update*).
The cleanup can also be manually triggered by sending the signal `USR1` to the `apt-cacher-rs` process.## Security
The proxy interface should not be made public available to the internet or completely untrusted clients.
That could lead to Denial of Service issues, like congesting the network traffic or exhausting the filesystem's capacity.## License
[MIT License](LICENSE?raw=true)