Skip to content

cj1128/tinyTorrent

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 

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.

Reference

About

πŸŽ‰ A tiny bittorrent client wirtten in TypeScript+Deno for learning.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published