Performance focused BitTorrent tracker supporting HTTP, UDP, IPv4 and IPv6.
Try Trakx for yourself! These instances are hosted on Oracles always free tier.
Status | Protocol | Address |
---|---|---|
✅Ok | IPv4 UDP | udp://u4.trakx.crim.ist:1337 |
✅Ok | IPv6 UDP | udp://u6.trakx.crim.ist:1337 |
IPv4 HTTP | http://h4.trakx.crim.ist/announce |
|
IPv6 HTTP | http://h6.trakx.crim.ist/announce |
HTTP trackers are deprecated due to TCPs high load. Use UDP trackers for reliable uptime.
Go 1.19+ required.
git clone https://github.com/crimist/trakx && cd trakx
# install to go bin
go install .
trakx status # generates configuration
# or build
go build .
./trakx status # generates configuration
See configuration and netdata setup.
The configuration file can be found at ~/.config/trakx/trakx.yaml
.
You'll have to run the trakx controller at least once to generate this file.
Config settings can be overwritten with environment variables:
$ cat trakx.yaml
...
loglevel = error
...
$ TRAKX_LOGLEVEL=DEBUG trakx run
2022-01-16T19:52:25.627-0800 DEBUG Debug level enabled, debug panics are on
...
Trakx attempts to load the config file from the following directories in order:
.
~/.config/trakx/
You can modify the default configuration and files served by the webserver in the tracker/config/embeded/
folder.
NOTE: Trakx webserver will only serve files at their full path. dmca
will 404, dmca.html
will 200.
To bind to privileged ports I recommend using CAP_NET_BIND_SERVICE
. More information can be found here.
$ sudo setcap 'cap_net_bind_service=+ep' ./trakx
$ TRAKX_TRACKER_HTTP_PORT=80 ./trakx run
2022-04-05T16:18:05.847-0700 INFO HTTP tracker enabled {"port": 80}
Warning: install.sh
will overwrite go_expvar.conf
. If you are using other expvar programs with netdata manually merge the two files.
- Run
/etc/netdata/edit-config python.d.conf
, changego_expvar
toyes
. - Customize the url in
netdata/expvar.conf
if needed. - Install netdata plugins with
cd netdata; ./install.sh
.
Trakx takes advantage of Go's build tags to target different use cases.
The fast
tag will build Trakx without IP, seed, and leech metrics which will reduce cpu and memory usage.
The heroku
tag will build trakx for app engines. This means the executable will immediately run the tracker rather than provide the daemon controller behavior included in the regular CLI build.
Feel free to customize the tags to suit whichever app engine you prefer in engine_entry.go.
The following metrics were collected on Heroku free tier running an HTTP tracker with the fast
tag disabled.
Heroku dashboard:
Database stats:
Flamegraph:
Trakx has been optimized to use a little CPU time as possible. In most cases, almost all CPU time will be spent handing (negotiating/send/recv) connections, especially for TCP (HTTP).
Trakx has also been optimized to use minimal memory and is mostly limited by the go GC. In this example the GC runs every 2 minutes (the forced GC period) at this level of traffic. The inuse_space
delta from GC is 7.5% meaning this collection frequency would be sustained at GOGC=8
.