-
Notifications
You must be signed in to change notification settings - Fork 2
/
README-i2p.txt
120 lines (99 loc) · 4.68 KB
/
README-i2p.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
DEPRECATED
----------
This I2P fork is DEPRECATED as of 2023-11.
Please use https://github.com/r4sas/opentracker-i2p
which is rewritten and rebased on the latest (2021) opentracker code.
R4SAS's version supports compact responses (only) which
reduces memory and outbound bandwidth use by more than 90%
compared to this version.
=================================
i2p-opentracker
mods and notes by zzz March 2008
=================================
SOURCE
------
This is based on the opentracker code pulled from CVS March 2008.
The most recent change in CVS as of the date pulled was Feb. 4, 2008.
See README for the CVS archive location.
The website, by the way, is http://erdgeist.org/arts/software/opentracker/ .
LICENSE
-------
opentracker is beerware, libowfat is GPL, and zzz's mods are beerware too.
No warranty, use at your own risk.
BUILDING
--------
You still need the libowfat library.
See README or just do:
cvs -d :pserver:[email protected]:/cvs -z9 co libowfat
cd libowfat
make
cd ../i2p.i2p-opentracker
make
Debian/Ubuntu users can build an opentracker package with the following:
apt-get install libowfat-dev zlib1g-dev build-essential fakeroot
cd i2p.i2p-opentracker
dpkg-buildpackage -B -uc -us
RUNNING
-------
Create an HTTP server tunnel pointing to localhost port 6969
./opentracker &
There are no configuration files, there is no logging, and there is not any
output. It is possible to specify desired configuration options, such as:
./opentracker -r http://youreepsite.i2p -p 20289 &
This would set the Opentracker's homepage to youreepsite.i2p and the port to 20289.
See ./opentracker -help for more info.
Verify that it's working by using a browser to go to http://your-tracker-name.i2p/stats.
Make a torrent in i2psnark (see below) and start it.
After it announces, verify with http://your-tracker-name.i2p/stats?mode=top5
See man page in debian/i2p-opentracker.1 for command line options.
TESTED/UNTESTED
---------------
Tested with i2psnark and Robert.
Not tested with i2p-bt, i2prufus, Azureus.
CHANGES FOR I2P
---------------
Almost all the changes are in ot_http.c, trackerclient.h, and trackerclient.c.
- Changed IP storage from 4 bytes to 534 bytes (Base64 dest + ".i2p")
- Store and return 20 byte peer_id since i2psnark checks for a match
- Check only the dest for a match, port and id are ignored for matching
- So the in-memory size is 558 bytes per peer, not 8.
- Rather than returning the (standard) list of dictionaries
containing (peerid, ip, port) for each peer.
opentracker returned a flat byte string of length 6*n (compact format).
I2psnark expects the non-compact format, a
list of dictionaries. So fixed it up to do that. (trackerclient.c)
An I2P compact format has since been defined but is unimplemented here.
- Don't deliver a peer's own dest to it (would hose i2psnark because it doesn't check)
- Increase output buffer size, reduce default and max numwant
- Changed default ip binding from 0.0.0.0 to 127.0.0.1
- Change interval from 30m with randomization to fixed 35m (i2psnark does randomization)
- Changed client timeout from 30s to 60s (I think)
- Disabled UDP and ifdef'ed it out, probably wasn't worth the effort though
NOTES
-----
Since there's essentially no documentation for opentracker, here's some notes:
- Announce url can be anything starting with "/a" or "/" - /announce.php works fine
- Stats url is /stats
additional stats with /stats?mode=xxxx, modes are:
peer, conn, top5, scrp, torr, fscr, tcp4, udp4,
s24s, tpbs, herr, startstop, toraddrem, vers, busy
see ot_http.c for details
- Scraping seems to work with /sc?info_hash=... but a full scrape (without ?info_hash)
looks to be disallowed.
- Full scrapes are available with /scrape%20HTTP/?format={bin,ben,url,txt} ,
although all the formats look binary encoded to me, so maybe that isn't right.
- Syncing disabled
POSSIBLE IMPROVEMENTS
---------------------
- Could un-Base64 before storage to save about 128 bytes per peer
- The timeouts in trackerlogic.h may need further adjustment - no documentation though
The tracker seems to forget about peers really quickly, not sure
exactly which timeout to tweak, or if I broke something.
- Have it respond to HEAD requests so eepsite trackers can find it
- Have it respond with something besides 404 Not Found to a 'home page' request,
e.g. "this is an open tracker, you can't store torrents here"
- Full scrapes are pretty slow, perhaps they should be disabled...
on the other hand, you could make a pretty html scrape output
and make it be the 'home page'.
- 'make' doesn't seem to rebuild correctly if you change a .h file - do a 'make clean' first
- Add compact format support (needs base64 and sha256 library)