1. Mechiel Lukkien
  2. torrent

Overview

HTTPS SSH
# status

in development.  don't expect things to work yet.

fwiw, it *does* appear to work though at the moment, at least at a
basic level... I tested a torrent download as confirmation that the
udp tracker support is working and it completed with no
issues. -sandbender


# intro

this package contains a bittorrent peer (for downloading and uploading
files), tools for verifying torrents & printing information about
torrents, a bittorrent tracker for use with a http server, and a
program for creating torrent files.


# install

this package depends on "http", "web" and "util".

to install, bind/symlink/include a mkconfig (e.g. from your inferno
install), and:

	mk install

when building from within inferno, insert SYSHOST=Inferno and ROOT=
in the mk invocations to override the values in the mkconfig.


# latest

the latest version can be found at

    http://www.ueber.net/code/r/torrent


# licence & author

all files are in the public domain.  this code has been written by
mechiel lukkien, reachable at mechiel@ueber.net or mechiel@xs4all.nl.

udp tracker support added by Rudy X. Desjardins, reachable at rudy at
sandbenders dot ca.


# todo

## wm/torrent: 

- is there a race in reading Qpeers?  e.g. that an old read is happening after a seek 0 for restarting?  e.g. due to a slow kill?  i've seen an error about a bad line from Qpeers...
- available bar is not smoothly/correctly filled.  probably best to only show non-seeders in it.  availbar seems to pieces with overlap, on the edges of the piece.  figure out how to fill the panel with the bars (and thus bars themselves) in x direction.  catch resizes and recreate the bars with new width.
- make torrent/peer send events on removal of bad peers?  and remove them from our list.  or at least reserve the peerevent message for it.  clear stale entries from badpeers list.
- could show dns names instead of/along ip addresses.

## torrent/peer

- once all mechanisms are implemented and features settle down, make all the accounting less cpu intensive.  torrent/peer takes lots of cpu now.

- allow downloading of a subset of files, perhaps with priority
- implement rarest-first scheme?
- handle multiple torrent files at once?  allows for better use of bandwidth
- support magnet uri's? (bep 9)
- http seeding (bep 17 and/or bep 19)

## torrent/track

- make search for a peer (given ip & port) less inefficient.
- might add scraping.
- might be a bit smarter about which peers to send to a peer.  e.g. not itself, make randomizing cheaper, let peers that are done (left=0) not connect to each other.