/functorrent

A bit torrent client

Primary LanguageHaskellGNU General Public License v3.0GPL-3.0

A bittorrent client.

Build Status

Building

Functorrent can be build with Cabal sandbox or Nix.

Cabal sandbox

Sandboxes give you per project independent containers, just like Python's virtualenv.

$ git clone https://github.com/vu3rdd/functorrent && cd functorrent
$ cabal sandbox init
$ cabal install --only-dependencies --enable-tests
$ cabal build # binaries in ./dist/built/functorrent/*

Building with Nix

``$ nix-shell``` at the root of the source code repo should drop you into a shell which has all the package dependencies installed.

$ nix-shell --pure
[...]
[nix-shell] $ cabal configure && cabal build

Goals

Current Status

  • can decode torrent files (bencoding)
  • talk to the tracker and get the peer list
  • the `main' program takes a torrent file (in the local file system) as input and prints the {ip,port} for each peer, after talking to the tracker.

TODO

  • Test suite.
  • Peer protocol.
  • Get the file download working in the simplest possible way.
  • Concurrency (threads per peer)
  • other advanced features of Bit Torrent (like DHT).