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

Commit

Permalink
update readme; change default torrents path; add index page
Browse files Browse the repository at this point in the history
  • Loading branch information
shurikk committed Jun 1, 2011
1 parent a00ea91 commit 2c88f86
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 27 deletions.
5 changes: 3 additions & 2 deletions .gitignore
@@ -1,4 +1,5 @@
doc
*.gem
Gemfile.lock
var
#Gemfile.lock
tmp
config
19 changes: 0 additions & 19 deletions Gemfile.lock

This file was deleted.

21 changes: 17 additions & 4 deletions README.md
Expand Up @@ -6,12 +6,25 @@ Simple [BitTorrent](http://bittorrent.org/) tracker using [Sinatra](http://www.s
Implemented: [BEP 3](http://bittorrent.org/beps/bep_0003.html), [BEP 23](http://bittorrent.org/beps/bep_0023.html)


Thoughts
--------

In general idea is to run multiple torrent trackers (for redundancy) + fancy
command line torrent clients that know how to share .torrent files with each
other as a bittorrent based storage that is somewhat similar to [amazon S3](https://s3.amazonaws.com/)
and others.


Installation
------------

$ git clone
$ bundle install
$ rackup -p 8888

running on localhost, port 8888, using rack

$ git clone git://github.com/shurikk/bttrack.git
$ cd bttrack ; bundle install
$ bundle exec rackup -p 8888

or create a .torrent file and use http://btrack.heroku.com/announce as announce URL


License
Expand Down
13 changes: 12 additions & 1 deletion bttrack.rb
Expand Up @@ -20,7 +20,8 @@ def req
end

get '/' do

@version = `cat VERSION`
erb :index
end

get '/announce' do
Expand Down Expand Up @@ -49,3 +50,13 @@ def req
req.info_hash.scrape).bencode
end

__END__
@@ layout
<html>
<body>
<%= yield %>
</body>
</html>

@@ index
bttrack version <%= @version %>
4 changes: 3 additions & 1 deletion lib/bttrack/config.rb
@@ -1,5 +1,7 @@

# config defaults
# create $BTTRACK_ROOT/config/config.rb to override defaults

CONF = {
:compact => true,
:allow_ip_override => false,
Expand All @@ -9,5 +11,5 @@
:default_peers => 50,
:scrape_interval => 10,
:max_peers => 200,
:db_dir => "#{File.dirname(File.expand_path(__FILE__))}/../../var/torrents"
:db_dir => "#{$BTTRACK_ROOT}/tmp/torrents"
}

0 comments on commit 2c88f86

Please sign in to comment.