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!
$ deno run --allow-read --allow-net --allow-write src/main.ts <file.torrent> -- --debug # enable debug log
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.