# Apt-P2P: a peer-to-peer proxy for apt downloads ### Goal Similar to [DebTorrent][10], Apt-P2P will act as a proxy between apt requests and a debian repository server, downloading any requested files from peers (if possible), but falling back to a direct HTTP download. Unlike DebTorrent, Apt-P2P will be simple, efficient, and fast. [10]: http://debtorrent.alioth.debian.org/ ### Features * Downloads from peers, increasing the available bandwidth to the user * Reduces the bandwidth requirements needed to setup a repository of packages * Seamlessly integrates with the current APT tool * Automatically falls back to downloading from an HTTP mirror when peers are not available * Builds on other already existing tools where possible * Fast and requires limited CPU and memory * Will try to download any file it can find a hash for from peers (including Packages.bz2, Sources.gz, ...) This software is open-source and is released at no charge under the terms of the [GPL v2 license][20]. [20]: http://www.opensource.org/licenses/gpl-license.php [[FAQ]] ### Requirements To run the full program (e.g. to actually download something): * Python 2.4 or higher * [Twisted][30] 2.4 or higher - including [Twisted Web2][40] 0.2 or higher * [python-apt][50] 0.6.20 or higher * An APT-based package management system (such as Debian distributions have) If you just want to run the DHT part of the program (e.g. to provide a bootstrap node), then you only need: * Python 2.4 or higher * [Twisted][30] 2.4 or higher [30]: http://twistedmatrix.com/trac/ [40]: http://twistedmatrix.com/trac/wiki/TwistedWeb2 [50]: http://packages.debian.org/unstable/python/python-apt ### Development Status This project has seen several releases, as seen on the [source package page][55] of the Debian project. The code is reasonably stable and bug free. [55]: http://packages.qa.debian.org/a/apt-p2p.html ### Installing There are detailed instructions on how to [[Install]] the Apt-P2P program. If you have any trouble using the program, you can [email me][60], or come and find me in the DebTorrent IRC channel (`#debtorrent` on [OFTC][70]). If you think you've found a bug in the program, please let me know. [60]: mailto:camrdale@gmail.com [70]: http://irc.oftc.net ### The Code The latest code for the project is currently hosted in a [Git repository][80]. It is publicly readable, and there are instructions there for downloading the code. It is originally based on the [khashmir][85] implementation of the [kademlia DHT][90]. All of the networking is handled by the [Twisted][30] and [Twisted Web2][40] libraries. Dealing with apt's repository files is handled by [python-apt][50], the code for which is based on that of the [apt-proxy program][100]. There is also a description of the [[protocol]] available, as well as an [api for the code](api/). [80]: http://git.camrdale.org/?p=apt-p2p.git;a=summary [85]: http://khashmir.sourceforge.net/ [90]: http://en.wikipedia.org/wiki/Kademlia [100]: http://apt-proxy.sourceforge.net/ ### Other Documentation (all PDFs) * The [motivation paper][110] written back when it was called apt-dht. * An [abstract][120] for the concept behind apt-p2p, accepted to SIGCOMM 2008. * The [poster][130] presented at SIGCOMM 2008. * A [paper][140] accepted to INFOCOM 2009. * The [presentation][150] for the paper, given at INFOCOM 2009. [110]: motivation.pdf [120]: /Resume/abstract.pdf [130]: SigcommPoster.pdf [140]: /Resume/apt-p2p.pdf [150]: presentation.pdf