Link to project report : report
example scenario:
test file : pieces -> 1_to 100
peer1 : 1_to_200 port : 2001
peer2 : 800_to_1000 port : 2003
peer3 : 100_to_900 port : 2004
peer4 : 400_to_669 port : 2005
peer5 : 200_700 port : 2002
console output:
end of the download console output stats
compile jar using : mvn compile assembly:single
command to execute:
java -jar equi*.jar torrentFileName.torrent [-s or -f]
-s : used for secure downloading mode eq: limited number of requests to send and receive.
-f : used for fast downloading mode
detailed output is written to log.txt file in the jar directory.
scripts are in scriptsForTesting
example of use:
1-run opentracker
2-inside scriptsForTesting folder, run a script, for example ./scriptMultiClient.sh
, the script will create a file, generate it's torrent file from it and launch 5 aria2c instances, each with a specific range of pieces (can be used without opentracker to demonstrate strategies). The script will create
folders named peer_from
_to
with from = first piece (1-index based) and to = lastpiece (max is 1000), with each folder is used by one Aria2c
see the script file for more details and modifications.
IMPORTANT: change announce URL to opentracker url in -a http://..../announce
inside the script sh file.
the script creates both torrent file, and metainfo file, hence the script can be used for multiple machines without the need of copying any file, and also for testing in one machine.
3-run java -jar equi*.jar test /scriptsForTesting/test.torrent [-f ou -s]
see scripts for generating files and torrents Readme for more details about how i created the scripts and infos about their CLI arguments
scripts for generating files and torrents
docker build -t ot .
docker run -p 6969:6969 ot
access opentracker in http://localhost:6969/stats