TinyTorrent
A tiny bittorrent client written in typescript for learning.
For details, check my blog post tinyTorrent: δ»ε€΄εδΈδΈͺ Deno η BitTorrent δΈθ½½ε¨.
NOTE: This is a leech client, it doesn't upload any data to peers!
Usage
$ deno run --allow-read --allow-net --allow-write src/main.ts <file.torrent> -- --debug # enable debug log
Create a local test torrent file
First, install and run bittorrent-tracker.
$ yarn add bittorrent-tracker
$ ./node_modules/.bin/bittorrent-tracker --http
Tracker is running with the url: http://localhost:8000/announce
.
Second, install Folx.
Select File -> Create Torrent File
to create a torrent, add above url as the tracker url.
Now we have a test torrent file that can be downloaded by our client.