Skip to content
This repository has been archived by the owner on Apr 5, 2023. It is now read-only.

gaultier/zorrent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zorrent

Experimental Zig torrent library and client example program.

Requires the lastest (HEAD) zig version.

$ git pull --recurse-submodules https://github.com/gaultier/zorrent.git
# Requires libcurl
$ zig build
$ ./zig-cache/bin/zorrent zig-bencode/input/OpenBSD_6.6_alpha_install66.iso-2019-10-16-1254.torrent
OpenBSD_6.6_alpha_install66.iso [1043/1043 260.70MiB/260.70MiB] 100.00%

# Run all tests
$ zig build test

ROADMAP

  • BEP-0003:
    • Download one file
    • Smart piece request based on the bitfield/have peer messages
    • Check pieces SHA1 hashes
    • Re-fetch piece if hash fails
    • Request pipelining
    • Support torrent with multiple files
    • Upload files (serve)
    • Save want state to continue downloading a file after a restart
    • Check hashes in parallel
    • Get peers from trackers in parallel
    • Pick up new peers while downloading from other peers
    • Notify tracker of events
    • Retry connecting to peers when disconnected
  • Multi-tracker (BEP-0012)
  • Compact peer list from tracker (BEP-0023)
  • Better download algorithm: get rarest pieces first
  • Fast extension (BEP-0006)
  • UDP
  • Extension messages
  • Local Service Discovery (BEP-0014)

About

Zig torrent library and client.

Topics

Resources

Stars

Watchers

Forks

Languages