65 lines
1.2 KiB
Markdown
65 lines
1.2 KiB
Markdown
# storrent
|
|
|
|
A BitTorrent client with a 9P filesystem interface.
|
|
|
|
## Dependencies
|
|
|
|
- plan9port
|
|
|
|
## Features
|
|
|
|
- DHT for peer discovery
|
|
- μTP transport
|
|
- 9P control interface
|
|
|
|
## Build
|
|
|
|
go build
|
|
|
|
## Run
|
|
|
|
./storrent -dht 6881 -utp 6882 -dir ./download -addr :5640 &
|
|
9pfuse localhost:5640 /mnt/storrent
|
|
|
|
## Usage
|
|
|
|
Interact via files:
|
|
|
|
echo 'add /path/to/file.torrent' > /mnt/storrent/ctl
|
|
cat /mnt/storrent/list
|
|
cat /mnt/storrent/torrents/0/progress
|
|
|
|
Torrent control commands (write to `torrents/<id>/ctl`):
|
|
|
|
start start downloading
|
|
stop stop torrent
|
|
seed start seeding
|
|
remove remove torrent
|
|
peer <addr> add peer manually
|
|
|
|
Status files in `torrents/<id>/`:
|
|
|
|
name torrent name
|
|
state current state
|
|
progress download progress
|
|
size total size
|
|
down bytes downloaded
|
|
up bytes uploaded
|
|
pieces piece info
|
|
peers connected peers
|
|
|
|
## TODO
|
|
|
|
- μTP congestion control
|
|
- ReadAt for streaming and seeding while downloading
|
|
|
|
## Packages
|
|
|
|
bencode/ bencode encoding/decoding
|
|
bt/ BitTorrent protocol messages
|
|
client/ torrent management
|
|
dht/ DHT implementation
|
|
fs/ 9P filesystem
|
|
metainfo/ .torrent file parsing
|
|
utp/ uTP transport
|