Testing

From AnomoWiki

Jump to: navigation, search

Contents

Port fowarding

If you plan on testing over the internet, you must have your ports forwarded properly. For the tracker, the default is port 5555 and for the clients, the port range is 6881-6889. Configure your router accordingly.

The rest of this file uses localhost, just replace this with the domain or IP you wish to use if you are doing transfers over the internet.

Get the source

There are several ways to do this, If you want to submit a one-off patch or just want to try out the bleeding-edge build, then download the latest tarball

If you plan on working on Anomos for a while then you should use git.

mkdir ~/anomos cd ~/anomos git clone http://anomos.info/git/anomos.git anomos.git

  1. to get the latest changes in the repository

cd anomos.git git pull

The initial clone might take a few minutes, and you'll only be able to pull since it's over HTTP.

Any changes you make to the source can be submitted in diff format by email to patches@anomos.info. Check out the man page for git-format-patch, if you feel like making things really easy for us.

Get the test scripts

Save these files in your ~/anomos directory and make them executable (chmod u+x)

runtracker.sh port=5555 python $HOME/anomos/anomos.git/bttrack.py --port $port --dfile $HOME/anomos/anomos.git/dstate --logfile $HOME/anomos/anomos.git/tracker.log --data_dir $HOME/anomos/anomos.git/

seeder.sh (Edited 8/11/2008)

peer.sh (Edited 8/11/2008)

Run Tracker, Generate Key

runtracker will start the tracker. The first time you've run the script the tracker will generate its RSA key (and save it in ~/anomos/crypto/tracker-(pub|pvt).pem) and prompt you for a password to use with it. You'll be prompted for this password each time you start the tracker. By default the tracker runs on port 5555, but you can specify a different port if you'd like.

./runtracker.sh [-p port]

Added Notes: 1)This script needs python-m2crypto installed. 2)Make sure you add the data_dir environment variable in runtracker.sh or the tracker will stop and dump an error. python $HOME/anomos/anomos.git/bttrack.py --port $port --dfile $HOME/anomos/anomos.git/dstate --logfile $HOME/anomos/anomos.git/tracker.log --data_dir $HOME/anomos/anomos.git/

Starting the runtracker will create the tracker.log file, dstate file and the crypto directory. The crypto director contains the following files: randpool.dat tracker-pvt.pem tracker-pub.pem 3)Reconfigure the firewall to open the ports 5555 and the port range 6881:6889 at the UDP and TCP level. 4)Restart the firewall.

Make Torrent

Make a torrent file for the tracker to serve. (You'll need to start a seeder before others can download it.)

python $HOME/anomos/anomos.git/btmaketorrent.py http://localhost:5555/announce $HOME/anomos/crypto/tracker-pub.pem <somefile>

If you don't have the pubkey PEM but the tracker is running, it should automatically get the key from the tracker, so this code will also work.

python $HOME/anomos/anomos.git/btmaketorrent.py http://localhost:5555/announce <somefile>

Alternatively, you can use the GUI to create single or multi-file torrents.

Make Seeder

./seeder.sh torrentfile identity

Torrent file is the name of the file you generated in the previous step, identity is any string you'd like to use as the name of this client locally. Each peer or seeder on your local machine must have a unique identity.


Make Relayer(s)

./seeder.sh torrentfile differentidentity

Same as above, but these seeders will act as relayers as well as peers. Each peer or seeder on your local machine must have a unique identity. [edit] Make Peer

./peer.sh torrentfile identity

This is the actual downloader and should be run in a directory which doesn't have the file being seeded in it already. Retrieved from "http://wiki.anomos.info/wiki/Testing"

Personal tools