commit a6051448e183eb10602f79d1ff71f0100d224c92 Author: Michael Ochmann Date: Fri Jan 3 00:46:52 2025 +0100 initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8eb12e8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +.idea +.vscode +.DS_Store + +config/opentracker.conf diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..4b30fd1 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "opentracker"] + path = opentracker + url = git://erdgeist.org/opentracker diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f6fa65a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +FROM alpine + +RUN apk add --no-cache \ + git \ + cvs \ + make \ + gcc \ + musl-dev \ + zlib-dev + +RUN cvs -d :pserver:cvs@cvs.fefe.de:/cvs -z9 co libowfat +WORKDIR /libowfat +RUN ls +RUN make +WORKDIR / +#RUN git clone git://erdgeist.org/opentracker +COPY opentracker opentracker +WORKDIR /opentracker +RUN make + +CMD /opentracker/opentracker -f /config/opentracker.conf diff --git a/config/opentracker.conf.sample b/config/opentracker.conf.sample new file mode 100644 index 0000000..db45122 --- /dev/null +++ b/config/opentracker.conf.sample @@ -0,0 +1,106 @@ +# opentracker config file +# + +# I) Address opentracker will listen on, using both, tcp AND udp family +# (note, that port 6969 is implicite if ommitted). +# +# If no listen option is given (here or on the command line), opentracker +# listens on 0.0.0.0:6969 tcp and udp. +# +# The next variable determines if udp sockets are handled in the event +# loop (set it to 0, the default) or are handled in blocking reads in +# dedicated worker threads. You have to set this value before the +# listen.tcp_udp or listen.udp statements before it takes effect, but you +# can re-set it for each listen statement. Normally you should keep it at +# the top of the config file. +# +# listen.udp.workers 4 +# +# listen.tcp_udp 0.0.0.0 +# listen.tcp_udp 192.168.0.1:80 +# listen.tcp_udp 10.0.0.5:6969 +# +# To only listen on tcp or udp family ports, list them this way: +# +# listen.tcp 0.0.0.0 +# listen.udp 192.168.0.1:6969 +# +# Note, that using 0.0.0.0 for udp sockets may yield surprising results. +# An answer packet sent on that socket will not necessarily have the +# source address that the requesting client may expect, but any address +# on that interface. +# + +# II) If opentracker runs in a non-open mode, point it to files containing +# all torrent hashes that it will serve (shell option -w) +# +# access.whitelist /path/to/whitelist +# +# or, if opentracker was compiled to allow blacklisting (shell option -b) +# +# access.blacklist ./blacklist +# +# It is pointless and hence not possible to compile black AND white +# listing, so choose one of those options at compile time. File format +# is straight forward: "\n\n..." +# +# If you do not want to grant anyone access to your stats, enable the +# WANT_RESTRICT_STATS option in Makefile and bless the ip addresses +# allowed to fetch stats here. +# +# access.stats 192.168.0.23 +# +# There is another way of hiding your stats. You can obfuscate the path +# to them. Normally it is located at /stats but you can configure it to +# appear anywhere on your tracker. +# +# access.stats_path stats + +# III) Live sync uses udp multicast packets to keep a cluster of opentrackers +# synchronized. This option tells opentracker which port to listen for +# incoming live sync packets. The ip address tells opentracker, on which +# interface to join the multicast group, those packets will arrive. +# (shell option -i 192.168.0.1 -s 9696), port 9696 is default. +# +# livesync.cluster.listen 192.168.0.1:9696 +# +# Note that two udp sockets will be opened. One on ip address 0.0.0.0 +# port 9696, that will join the multicast group 224.0.42.23 for incoming +# udp packets and one on ip address 192.168.0.1 port 9696 for outgoing +# udp packets. +# +# As of now one and only one ip address must be given, if opentracker +# was built with the WANT_SYNC_LIVE feature. +# + +# IV) Sync between trackers running in a cluster is restricted to packets +# coming from trusted ip addresses. While source ip verification is far +# from perfect, the authors of opentracker trust in the correct +# application of tunnels, filters and LAN setups (shell option -A). +# +# livesync.cluster.node_ip 192.168.0.4 +# livesync.cluster.node_ip 192.168.0.5 +# livesync.cluster.node_ip 192.168.0.6 +# +# This is the admin ip address for old style (HTTP based) asynchronus +# tracker syncing. +# +# batchsync.cluster.admin_ip 10.1.1.1 +# + +# V) Control privilege drop behaviour. +# Put in the directory opentracker will chroot/chdir to. All black/white +# list files must be put in that directory (shell option -d). +# +# +# tracker.rootdir /usr/local/etc/opentracker +# +# Tell opentracker which user to setuid to. +# +# tracker.user nobody +# + +# VI) opentracker can be told to answer to a "GET / HTTP"-request with a +# redirect to another location (shell option -r). +# +# tracker.redirect_url https://your.tracker.local/ diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..1b6f8da --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,9 @@ +version: "3" + +services: + opentracker: + build: . + ports: + - 6969:6969 + volumes: + - ./config:/config diff --git a/opentracker b/opentracker new file mode 160000 index 0000000..c854b3d --- /dev/null +++ b/opentracker @@ -0,0 +1 @@ +Subproject commit c854b3db9bf620e86481acfcc9fc31eba64bc8e6