Apt-get con torrent

Sabias que se pueden bajar los paquetes deb con apt mediante torrent? si esto gracias a un paquete que se llama debtorrent que es open source y liberado bajo los terminos de la licencia MIT.
Esto trae sus ventajas en cuanto al la carga que se aplica a  los servidores de repositorios como los de debian y los de ubuntu ya quenos permite descentralizar la carga de trafico y hacer una distribución mas inteligente de esta.

Para instalarlo:

#apt-get install debtorrent

Luego editamos /etc/apt/sources.list y agregamos nuestros repositorios a travez de torrennt (en mi caso uso sid y experimental)
donde host_server es el host donde instalamos el paquete el cual puede ser localhost si lo instalamos local, yo en mi caso lo instale en un servidor que uso como proxy.

deb debtorrent://host_server:9988/ftp.us.debian.org/debian sid main contrib non-free
deb debtorrent://host_server:9988/ftp.us.debian.org/debian experimental main contrib non-free

Para comprobar el funcionamiento podemos actualizar los paquetes y luego ir al log

#apt-get update

Obj debtorrent://192.168.10.1/ftp.us.debian.org/debian/ sid/main Translation-es
Obj http://ftp.us.debian.org experimental/main i386 Packages/DiffIndex
Obj http://ftp.us.debian.org experimental/contrib i386 Packages/DiffIndex
Obj debtorrent://192.168.10.1 experimental Release.gpg
Ign debtorrent://192.168.10.1/ftp.us.debian.org/debian/ sid/contrib Translation-en
Ign debtorrent://192.168.10.1/ftp.us.debian.org/debian/ sid/contrib Translation-es
Obj debtorrent://192.168.10.1 sid Release
Ign debtorrent://192.168.10.1/ftp.us.debian.org/debian/ sid/main Translation-en
Obj debtorrent://192.168.10.1 experimental Release
Ign debtorrent://192.168.10.1/ftp.us.debian.org/debian/ sid/non-free Translation-en
Ign debtorrent://192.168.10.1 sid/main i386 Packages/DiffIndex
Ign debtorrent://192.168.10.1 sid/contrib i386 Packages/DiffIndex
Ign debtorrent://192.168.10.1 sid/non-free i386 Packages/DiffIndex
Obj debtorrent://192.168.10.1 sid/main i386 Packages
Ign debtorrent://192.168.10.1/ftp.us.debian.org/debian/ sid/non-free Translation-es
Obj debtorrent://192.168.10.1 sid/contrib i386 Packages
Obj debtorrent://192.168.10.1 sid/non-free i386 Packages
Ign debtorrent://192.168.10.1 experimental/main i386 Packages/DiffIndex
Ign debtorrent://192.168.10.1 experimental/contrib i386 Packages/DiffIndex
Ign debtorrent://192.168.10.1/ftp.us.debian.org/debian/ experimental/contrib Translation-en
Ign debtorrent://192.168.10.1 experimental/non-free i386 Packages/DiffIndex
Obj debtorrent://192.168.10.1 experimental/main i386 Packages
Obj debtorrent://192.168.10.1 experimental/contrib i386 Packages
Ign debtorrent://192.168.10.1/ftp.us.debian.org/debian/ experimental/contrib Translation-es
Obj debtorrent://192.168.10.1 experimental/non-free i386 Packages
Ign debtorrent://192.168.10.1/ftp.us.debian.org/debian/ experimental/main Translation-en
Ign debtorrent://192.168.10.1/ftp.us.debian.org/debian/ experimental/main Translation-es
Ign debtorrent://192.168.10.1/ftp.us.debian.org/debian/ experimental/non-free Translation-en
Ign debtorrent://192.168.10.1/ftp.us.debian.org/debian/ experimental/non-free Translation-es
Descargados 2664B en 4min 27s (10B/s)

Como podemos ver claramente algunos indices se están descargando mediante el proxy torrent.

#tail -f /var/log/debtorrent/*

wintermute:/home/daedalus# tail -f /var/log/debtorrent/*
==> /var/log/debtorrent/apt-access.log <== 192.168.10.166 - - [05/Oct/2010:23:31:09] "GET /ftp.us.debian.org/debian/dists/sid/main/binary-i386/Packages.bz2 DEBTORRENT/0.2" 304 0 "-" "Debian APT-DEBTORRENT/0.2 (0.2)" 192.168.10.166 - - [05/Oct/2010:23:31:09] "GET /ftp.us.debian.org/debian/dists/sid/non-free/i18n/Translation-es.bz2 DEBTORRENT/0.2" 404 329 "-" "Debian APT-DEBTORRENT/0.2 (0.2)" 192.168.10.166 - - [05/Oct/2010:23:31:59] "GET /ftp.us.debian.org/debian/dists/sid/contrib/binary-i386/Packages.bz2 DEBTORRENT/0.2" 304 0 "-" "Debian APT-DEBTORRENT/0.2 (0.2)" 192.168.10.166 - - [05/Oct/2010:23:32:33] "GET /ftp.us.debian.org/debian/dists/sid/non-free/binary-i386/Packages.bz2 DEBTORRENT/0.2" 304 0 "-" "Debian APT-DEBTORRENT/0.2 (0.2)" 192.168.10.166 - - [05/Oct/2010:23:32:33] "GET /ftp.us.debian.org/debian/dists/experimental/main/binary-i386/Packages.diff/Index DEBTORRENT/0.2" 404 65 "-" "Debian APT-DEBTORRENT/0.2 (0.2)" 192.168.10.166 - - [05/Oct/2010:23:32:55] "GET /ftp.us.debian.org/debian/dists/sid/Release.gpg DEBTORRENT/0.2" 304 0 "-" "Debian APT-DEBTORRENT/0.2 (0.2)" 192.168.10.166 - - [05/Oct/2010:23:33:01] "GET /ftp.us.debian.org/debian/dists/sid/main/i18n/Translation-es.bz2 DEBTORRENT/0.2" 304 0 "-" "Debian APT-DEBTORRENT/0.2 (0.2)" 192.168.10.166 - - [05/Oct/2010:23:33:10] "GET /ftp.us.debian.org/debian/dists/experimental/Release.gpg DEBTORRENT/0.2" 304 0 "-" "Debian APT-DEBTORRENT/0.2 (0.2)" 192.168.10.166 - - [05/Oct/2010:23:33:10] "GET /ftp.us.debian.org/debian/dists/sid/contrib/i18n/Translation-en.bz2 DEBTORRENT/0.2" 404 328 "-" "Debian APT-DEBTORRENT/0.2 (0.2)" 192.168.10.166 - - [05/Oct/2010:23:33:17] "GET /ftp.us.debian.org/debian/dists/sid/contrib/i18n/Translation-es.bz2 DEBTORRENT/0.2" 404 328 "-" "Debian APT-DEBTORRENT/0.2 (0.2)" ==> /var/log/debtorrent/debtorrent-client.log <== 2010-10-05 23:33:10,756 MainThread DebTorrent.HTTPCache INFO cache miss: /var/cache/debtorrent/ftp.us.debian.org/debian/dists/experimental/main/i18n/Translation-en.bz2 2010-10-05 23:33:10,757 MainThread DebTorrent.HTTPHandler INFO 12: DEBTORRENT GET /ftp.us.debian.org/debian/dists/experimental/main/i18n/Translation-es.bz2 DEBTORRENT/0.2 2010-10-05 23:33:10,762 MainThread DebTorrent.HTTPCache INFO cache miss: /var/cache/debtorrent/ftp.us.debian.org/debian/dists/experimental/main/i18n/Translation-es.bz2 2010-10-05 23:33:10,763 MainThread DebTorrent.HTTPHandler INFO 13: DEBTORRENT GET /ftp.us.debian.org/debian/dists/experimental/non-free/i18n/Translation-en.bz2 DEBTORRENT/0.2 2010-10-05 23:33:10,765 MainThread DebTorrent.HTTPCache INFO cache miss: /var/cache/debtorrent/ftp.us.debian.org/debian/dists/experimental/non-free/i18n/Translation-en.bz2 2010-10-05 23:33:10,770 MainThread DebTorrent.HTTPHandler INFO 14: DEBTORRENT GET /ftp.us.debian.org/debian/dists/experimental/non-free/i18n/Translation-es.bz2 DEBTORRENT/0.2 2010-10-05 23:33:10,772 MainThread DebTorrent.HTTPCache INFO cache miss: /var/cache/debtorrent/ftp.us.debian.org/debian/dists/experimental/non-free/i18n/Translation-es.bz2 2010-10-05 23:33:17,219 MainThread DebTorrent.HTTPCache INFO download completed for: http://ftp.us.debian.org/debian/dists/sid/contrib/i18n/Translation-es.bz2 2010-10-05 23:33:17,220 MainThread DebTorrent.HTTPHandler INFO sending response: DEBTORRENT 404 Not Found (328 bytes){'content-type': 'text/html; charset=iso-8859-1', 'Server': 'DebTorrent/T-0.1.9'} 2010-10-05 23:33:17,227 MainThread DebTorrent.HTTPHandler INFO 15: DEBTORRENT GET /ftp.us.debian.org/debian/dists/sid/Release DEBTORRENT/0.2 2010-10-05 23:33:23,222 MainThread DebTorrent.HTTPCache INFO cache up to date and so is request: /var/cache/debtorrent/ftp.us.debian.org/debian/dists/sid/Release ==> /var/log/debtorrent/apt-access.log <== 192.168.10.166 - - [05/Oct/2010:23:33:24] "GET /ftp.us.debian.org/debian/dists/sid/Release DEBTORRENT/0.2" 304 0 "-" "Debian APT-DEBTORRENT/0.2 (0.2)" ==> /var/log/debtorrent/debtorrent-client.log <== 2010-10-05 23:33:24,102 MainThread DebTorrent.HTTPHandler INFO sending response: DEBTORRENT 304 Not Modified (0 bytes){'Pragma': 'no-cache', 'Server': 'DebTorrent/T-0.1.9'} 2010-10-05 23:33:24,119 MainThread DebTorrent.HTTPCache INFO download completed for: http://ftp.us.debian.org/debian/dists/sid/main/i18n/Translation-en.bz2 2010-10-05 23:33:24,120 MainThread DebTorrent.HTTPHandler INFO sending response: DEBTORRENT 404 Not Found (325 bytes){'content-type': 'text/html; charset=iso-8859-1', 'Server': 'DebTorrent/T-0.1.9'} 2010-10-05 23:33:24,127 MainThread DebTorrent.HTTPHandler INFO 16: DEBTORRENT GET /ftp.us.debian.org/debian/dists/experimental/Release DEBTORRENT/0.2 2010-10-05 23:33:31,402 MainThread DebTorrent.HTTPCache INFO cache up to date and so is request: /var/cache/debtorrent/ftp.us.debian.org/debian/dists/experimental/Release ==> /var/log/debtorrent/apt-access.log <== 192.168.10.166 - - [05/Oct/2010:23:33:24] "GET /ftp.us.debian.org/debian/dists/sid/main/i18n/Translation-en.bz2 DEBTORRENT/0.2" 404 325 "-" "Debian APT-DEBTORRENT/0.2 (0.2)" 192.168.10.166 - - [05/Oct/2010:23:33:32] "GET /ftp.us.debian.org/debian/dists/experimental/Release DEBTORRENT/0.2" 304 0 "-" "Debian APT-DEBTORRENT/0.2 (0.2)" ==> /var/log/debtorrent/debtorrent-client.log <== 2010-10-05 23:33:32,294 MainThread DebTorrent.HTTPHandler INFO sending response: DEBTORRENT 304 Not Modified (0 bytes){'Pragma': 'no-cache', 'Server': 'DebTorrent/T-0.1.9'} 2010-10-05 23:33:32,311 MainThread DebTorrent.HTTPCache INFO download completed for: http://ftp.us.debian.org/debian/dists/sid/non-free/i18n/Translation-en.bz2 2010-10-05 23:33:32,312 MainThread DebTorrent.HTTPHandler INFO sending response: DEBTORRENT 404 Not Found (329 bytes){'content-type': 'text/html; charset=iso-8859-1', 'Server': 'DebTorrent/T-0.1.9'} 2010-10-05 23:33:32,316 MainThread DebTorrent.HTTPHandler INFO 17: DEBTORRENT GET /ftp.us.debian.org/debian/dists/sid/main/binary-i386/Packages.diff/Index DEBTORRENT/0.2 2010-10-05 23:33:32,323 MainThread DebTorrent.HTTPHandler INFO sending response: DEBTORRENT 404 Not Found (65 bytes){'Content-Type': 'text/plain', 'Pragma': 'no-cache', 'Server': 'DebTorrent/T-0.1.9'} 2010-10-05 23:33:32,324 MainThread DebTorrent.HTTPHandler INFO 18: DEBTORRENT GET /ftp.us.debian.org/debian/dists/sid/contrib/binary-i386/Packages.diff/Index DEBTORRENT/0.2 2010-10-05 23:33:32,326 MainThread DebTorrent.HTTPHandler INFO sending response: DEBTORRENT 404 Not Found (65 bytes){'Content-Type': 'text/plain', 'Pragma': 'no-cache', 'Server': 'DebTorrent/T-0.1.9'} 2010-10-05 23:33:32,327 MainThread DebTorrent.HTTPHandler INFO 19: DEBTORRENT GET /ftp.us.debian.org/debian/dists/sid/non-free/binary-i386/Packages.diff/Index DEBTORRENT/0.2 2010-10-05 23:33:32,337 MainThread DebTorrent.HTTPHandler INFO sending response: DEBTORRENT 404 Not Found (65 bytes){'Content-Type': 'text/plain', 'Pragma': 'no-cache', 'Server': 'DebTorrent/T-0.1.9'} 2010-10-05 23:33:32,367 MainThread DebTorrent.HTTPHandler INFO 20: DEBTORRENT GET /ftp.us.debian.org/debian/dists/sid/main/binary-i386/Packages.bz2 DEBTORRENT/0.2 2010-10-05 23:33:39,458 MainThread DebTorrent.HTTPCache INFO cache up to date and so is request: /var/cache/debtorrent/ftp.us.debian.org/debian/dists/sid/main/binary-i386/Packages.bz2

También tenemos una linda interfaz web que podemos acceder para ver estadisticas al http://host_servidor:9988

Bookmark and Share

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *