Apt-P2P: a peer-to-peer proxy for apt downloads

Goal

Similar to DebTorrent, 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.

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.

FAQ

Requirements

To run the full program (e.g. to actually download something):

  • Python 2.4 or higher
  • Twisted 2.4 or higher
  • python-apt 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 2.4 or higher

Development Status

This project has seen several releases, as seen on the source package page of the Debian project. The code is reasonably stable and bug free.

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, or come and find me in the DebTorrent IRC channel (#debtorrent on OFTC). If you think you've found a bug in the program, please let me know.

The Code

The latest code for the project is currently hosted in a Git repository. It is publicly readable, and there are instructions there for downloading the code. It is originally based on the khashmir implementation of the kademlia DHT. All of the networking is handled by the Twisted and Twisted Web2 libraries. Dealing with apt's repository files is handled by python-apt, the code for which is based on that of the apt-proxy program. There is also a description of the protocol available, as well as an api for the code.

Other Documentation (all PDFs)

  • The motivation paper written back when it was called apt-dht.
  • An abstract for the concept behind apt-p2p, accepted to SIGCOMM 2008.
  • The poster presented at SIGCOMM 2008.
  • A paper accepted to INFOCOM 2009.
  • The presentation for the paper, given at INFOCOM 2009.