Skip to content

CortexFoundation/torrentfs

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
 
 
 
 
cmd
 
 
 
 
 
 
 
 
rlp
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Torrentfs

Torrentfs is a elastic file system, you can pull or push any files by following torrentfs protocol anywhere, anytime

Import

go get github.com/CortexFoundation/torrentfs

How to use

https://github.com/CortexFoundation/torrentfs.git
cd torrentfs
make

Create torrent file by 4k pieces

./build/bin/torrent-create workspace/data -p=4096 > workspace/test-torrent

Load info hash from torrent file

./build/bin/torrent-magnet < workspace/test-torrent
magnet:?xt=urn:btih:9196320d998fdab966bcb3a08f3f087e1f993c12&dn=data&tr=udp%3A%2F%2Ftracker.cortexlabs.ai%3A5008

Seed file to dht

mkdir -p mnt/9196320d998fdab966bcb3a08f3f087e1f993c12/data
cp workspace/test-torrent mnt/9196320d998fdab966bcb3a08f3f087e1f993c12/torrent
cp -r workspace/data/* mnt/9196320d998fdab966bcb3a08f3f087e1f993c12/data
./build/bin/seeding -dataDir=mnt

Download file

./build/bin/torrent download 'infohash:9196320d998fdab966bcb3a08f3f087e1f993c12'

How to test your network for torrent ?

./build/bin/torrent download 'ih:6b75cc1354495ec763a6b295ee407ea864a0c292'
./build/bin/torrent download 'ih:b2f5b0036877be22c6101bdfa5f2c7927fc35ef8'
./build/bin/torrent download 'ih:5a49fed84aaf368cbf472cc06e42f93a93d92db5'
./build/bin/torrent download 'ih:1f1706fa53ce0723ba1c577418b222acbfa5a200'
./build/bin/torrent download 'ih:3f1f6c007e8da3e16f7c3378a20a746e70f1c2b0'

downloaded ALL the torrents !!!!!!!!!!!!!!!!!!!

Server running

#216

Seeding or Sharing

#224

Special thanks

Anacrolix BitTorrent client package and utilities